diff --git a/advanced.js b/advanced.js index 1c78bec46..0e8c0e10c 100644 --- a/advanced.js +++ b/advanced.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var Jh=Object.create;var $s=Object.defineProperty;var $h=Object.getOwnPropertyDescriptor;var Qh=Object.getOwnPropertyNames;var Xh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var Zh=(i,e,t)=>e in i?$s(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),zr=(i,e)=>{for(var t in e)$s(i,t,{get:e[t],enumerable:!0})},e6=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Qh(e))!Yh.call(i,r)&&r!==t&&$s(i,r,{get:()=>e[r],enumerable:!(n=$h(e,r))||n.enumerable});return i};var An=(i,e,t)=>(t=i!=null?Jh(Xh(i)):{},e6(e||!i||!i.__esModule?$s(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(Zh(i,typeof e!="symbol"?e+"":e,t),t);var Jp=ie(()=>{});var yl=ie(($p,pl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Jp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[k]|=h<>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);else if(x==="le")for(w=0,k=0;w>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)A=o(u,y,w)<=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8}this._strip()};function d(C,u,y,x){for(var w=0,k=0,h=Math.min(C.length,y),A=u;A=49?k=g-49+10:g>=17?k=g-17+10:k=g,t(g>=0&&k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,k=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),k!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(k!==0&&(x=k.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),k=x||Math.max(1,w);t(w<=k,"byte array longer than desired length"),t(k>0,"Requested array length <= 0");var h=v(u,k),A=y==="le"?"LE":"BE";return this["_toArrayLike"+A](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,k=0,h=0;k>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x=0&&(u[x--]=A>>8&255),x>=0&&(u[x--]=A>>16&255),h===6?(x>=0&&(u[x--]=A>>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var k=0,h=0;h>>26;for(;k!==0&&h>>26;if(this.length=x.length,k!==0)this.words[this.length]=k,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,k;x>0?(w=this,k=u):(w=u,k=this);for(var h=0,A=0;A>26,this.words[A]=y&67108863;for(;h!==0&&A>26,this.words[A]=y&67108863;if(h===0&&A>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,k=u.words[P]|0,h=w*k+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,k=y.words,h=x.words,A=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,pt=w[3]|0,Z=pt&8191,de=pt>>>13,Gi=w[4]|0,Pe=Gi&8191,Ne=Gi>>>13,zi=w[5]|0,De=zi&8191,Oe=zi>>>13,Wi=w[6]|0,Be=Wi&8191,Fe=Wi>>>13,Ki=w[7]|0,Le=Ki&8191,Ue=Ki>>>13,Ji=w[8]|0,je=Ji&8191,Ve=Ji>>>13,$i=w[9]|0,He=$i&8191,qe=$i>>>13,Qi=k[0]|0,Ge=Qi&8191,ze=Qi>>>13,Xi=k[1]|0,We=Xi&8191,Ke=Xi>>>13,Yi=k[2]|0,Je=Yi&8191,$e=Yi>>>13,Zi=k[3]|0,Qe=Zi&8191,Xe=Zi>>>13,er=k[4]|0,Ye=er&8191,Ze=er>>>13,tr=k[5]|0,et=tr&8191,tt=tr>>>13,nr=k[6]|0,nt=nr&8191,it=nr>>>13,ir=k[7]|0,rt=ir&8191,at=ir>>>13,rr=k[8]|0,st=rr&8191,ot=rr>>>13,ar=k[9]|0,ut=ar&8191,lt=ar>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,Ge),l=Math.imul(f,ze),l=l+Math.imul(P,Ge)|0,m=Math.imul(P,ze);var wi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,g=Math.imul(j,Ge),l=Math.imul(j,ze),l=l+Math.imul(K,Ge)|0,m=Math.imul(K,ze),g=g+Math.imul(f,We)|0,l=l+Math.imul(f,Ke)|0,l=l+Math.imul(P,We)|0,m=m+Math.imul(P,Ke)|0;var _i=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(X,Ge),l=Math.imul(X,ze),l=l+Math.imul(Q,Ge)|0,m=Math.imul(Q,ze),g=g+Math.imul(j,We)|0,l=l+Math.imul(j,Ke)|0,l=l+Math.imul(K,We)|0,m=m+Math.imul(K,Ke)|0,g=g+Math.imul(f,Je)|0,l=l+Math.imul(f,$e)|0,l=l+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var Ai=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,g=Math.imul(Z,Ge),l=Math.imul(Z,ze),l=l+Math.imul(de,Ge)|0,m=Math.imul(de,ze),g=g+Math.imul(X,We)|0,l=l+Math.imul(X,Ke)|0,l=l+Math.imul(Q,We)|0,m=m+Math.imul(Q,Ke)|0,g=g+Math.imul(j,Je)|0,l=l+Math.imul(j,$e)|0,l=l+Math.imul(K,Je)|0,m=m+Math.imul(K,$e)|0,g=g+Math.imul(f,Qe)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Qe)|0,m=m+Math.imul(P,Xe)|0;var ki=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,g=Math.imul(Pe,Ge),l=Math.imul(Pe,ze),l=l+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul(Z,We)|0,l=l+Math.imul(Z,Ke)|0,l=l+Math.imul(de,We)|0,m=m+Math.imul(de,Ke)|0,g=g+Math.imul(X,Je)|0,l=l+Math.imul(X,$e)|0,l=l+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(j,Qe)|0,l=l+Math.imul(j,Xe)|0,l=l+Math.imul(K,Qe)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Ze)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Ze)|0;var Mi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,g=Math.imul(De,Ge),l=Math.imul(De,ze),l=l+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,We)|0,l=l+Math.imul(Pe,Ke)|0,l=l+Math.imul(Ne,We)|0,m=m+Math.imul(Ne,Ke)|0,g=g+Math.imul(Z,Je)|0,l=l+Math.imul(Z,$e)|0,l=l+Math.imul(de,Je)|0,m=m+Math.imul(de,$e)|0,g=g+Math.imul(X,Qe)|0,l=l+Math.imul(X,Xe)|0,l=l+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(j,Ye)|0,l=l+Math.imul(j,Ze)|0,l=l+Math.imul(K,Ye)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(f,et)|0,l=l+Math.imul(f,tt)|0,l=l+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Xu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(Be,Ge),l=Math.imul(Be,ze),l=l+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,We)|0,l=l+Math.imul(De,Ke)|0,l=l+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Ke)|0,g=g+Math.imul(Pe,Je)|0,l=l+Math.imul(Pe,$e)|0,l=l+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul(Z,Qe)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Qe)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(X,Ye)|0,l=l+Math.imul(X,Ze)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(j,et)|0,l=l+Math.imul(j,tt)|0,l=l+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(f,nt)|0,l=l+Math.imul(f,it)|0,l=l+Math.imul(P,nt)|0,m=m+Math.imul(P,it)|0;var Yu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(Le,Ge),l=Math.imul(Le,ze),l=l+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,We)|0,l=l+Math.imul(Be,Ke)|0,l=l+Math.imul(Fe,We)|0,m=m+Math.imul(Fe,Ke)|0,g=g+Math.imul(De,Je)|0,l=l+Math.imul(De,$e)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,l=l+Math.imul(Pe,Xe)|0,l=l+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Ze)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Ze)|0,g=g+Math.imul(X,et)|0,l=l+Math.imul(X,tt)|0,l=l+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(j,nt)|0,l=l+Math.imul(j,it)|0,l=l+Math.imul(K,nt)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(f,rt)|0,l=l+Math.imul(f,at)|0,l=l+Math.imul(P,rt)|0,m=m+Math.imul(P,at)|0;var Zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(je,Ge),l=Math.imul(je,ze),l=l+Math.imul(Ve,Ge)|0,m=Math.imul(Ve,ze),g=g+Math.imul(Le,We)|0,l=l+Math.imul(Le,Ke)|0,l=l+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Ke)|0,g=g+Math.imul(Be,Je)|0,l=l+Math.imul(Be,$e)|0,l=l+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,l=l+Math.imul(De,Xe)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,l=l+Math.imul(Pe,Ze)|0,l=l+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul(Z,et)|0,l=l+Math.imul(Z,tt)|0,l=l+Math.imul(de,et)|0,m=m+Math.imul(de,tt)|0,g=g+Math.imul(X,nt)|0,l=l+Math.imul(X,it)|0,l=l+Math.imul(Q,nt)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(j,rt)|0,l=l+Math.imul(j,at)|0,l=l+Math.imul(K,rt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(f,st)|0,l=l+Math.imul(f,ot)|0,l=l+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var el=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(He,Ge),l=Math.imul(He,ze),l=l+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(je,We)|0,l=l+Math.imul(je,Ke)|0,l=l+Math.imul(Ve,We)|0,m=m+Math.imul(Ve,Ke)|0,g=g+Math.imul(Le,Je)|0,l=l+Math.imul(Le,$e)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,l=l+Math.imul(Be,Xe)|0,l=l+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,l=l+Math.imul(De,Ze)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,l=l+Math.imul(Pe,tt)|0,l=l+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul(Z,nt)|0,l=l+Math.imul(Z,it)|0,l=l+Math.imul(de,nt)|0,m=m+Math.imul(de,it)|0,g=g+Math.imul(X,rt)|0,l=l+Math.imul(X,at)|0,l=l+Math.imul(Q,rt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(j,st)|0,l=l+Math.imul(j,ot)|0,l=l+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(f,ut)|0,l=l+Math.imul(f,lt)|0,l=l+Math.imul(P,ut)|0,m=m+Math.imul(P,lt)|0;var tl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(He,We),l=Math.imul(He,Ke),l=l+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(je,Je)|0,l=l+Math.imul(je,$e)|0,l=l+Math.imul(Ve,Je)|0,m=m+Math.imul(Ve,$e)|0,g=g+Math.imul(Le,Qe)|0,l=l+Math.imul(Le,Xe)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,l=l+Math.imul(Be,Ze)|0,l=l+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,l=l+Math.imul(De,tt)|0,l=l+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,l=l+Math.imul(Pe,it)|0,l=l+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,it)|0,g=g+Math.imul(Z,rt)|0,l=l+Math.imul(Z,at)|0,l=l+Math.imul(de,rt)|0,m=m+Math.imul(de,at)|0,g=g+Math.imul(X,st)|0,l=l+Math.imul(X,ot)|0,l=l+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(j,ut)|0,l=l+Math.imul(j,lt)|0,l=l+Math.imul(K,ut)|0,m=m+Math.imul(K,lt)|0;var nl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(He,Je),l=Math.imul(He,$e),l=l+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(je,Qe)|0,l=l+Math.imul(je,Xe)|0,l=l+Math.imul(Ve,Qe)|0,m=m+Math.imul(Ve,Xe)|0,g=g+Math.imul(Le,Ye)|0,l=l+Math.imul(Le,Ze)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,l=l+Math.imul(Be,tt)|0,l=l+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,l=l+Math.imul(De,it)|0,l=l+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,it)|0,g=g+Math.imul(Pe,rt)|0,l=l+Math.imul(Pe,at)|0,l=l+Math.imul(Ne,rt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul(Z,st)|0,l=l+Math.imul(Z,ot)|0,l=l+Math.imul(de,st)|0,m=m+Math.imul(de,ot)|0,g=g+Math.imul(X,ut)|0,l=l+Math.imul(X,lt)|0,l=l+Math.imul(Q,ut)|0,m=m+Math.imul(Q,lt)|0;var il=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,g=Math.imul(He,Qe),l=Math.imul(He,Xe),l=l+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(je,Ye)|0,l=l+Math.imul(je,Ze)|0,l=l+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Ze)|0,g=g+Math.imul(Le,et)|0,l=l+Math.imul(Le,tt)|0,l=l+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,l=l+Math.imul(Be,it)|0,l=l+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,it)|0,g=g+Math.imul(De,rt)|0,l=l+Math.imul(De,at)|0,l=l+Math.imul(Oe,rt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,st)|0,l=l+Math.imul(Pe,ot)|0,l=l+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul(Z,ut)|0,l=l+Math.imul(Z,lt)|0,l=l+Math.imul(de,ut)|0,m=m+Math.imul(de,lt)|0;var rl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(rl>>>26)|0,rl&=67108863,g=Math.imul(He,Ye),l=Math.imul(He,Ze),l=l+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(je,et)|0,l=l+Math.imul(je,tt)|0,l=l+Math.imul(Ve,et)|0,m=m+Math.imul(Ve,tt)|0,g=g+Math.imul(Le,nt)|0,l=l+Math.imul(Le,it)|0,l=l+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,it)|0,g=g+Math.imul(Be,rt)|0,l=l+Math.imul(Be,at)|0,l=l+Math.imul(Fe,rt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,st)|0,l=l+Math.imul(De,ot)|0,l=l+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,l=l+Math.imul(Pe,lt)|0,l=l+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,lt)|0;var al=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(al>>>26)|0,al&=67108863,g=Math.imul(He,et),l=Math.imul(He,tt),l=l+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(je,nt)|0,l=l+Math.imul(je,it)|0,l=l+Math.imul(Ve,nt)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Le,rt)|0,l=l+Math.imul(Le,at)|0,l=l+Math.imul(Ue,rt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,st)|0,l=l+Math.imul(Be,ot)|0,l=l+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,l=l+Math.imul(De,lt)|0,l=l+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,lt)|0;var sl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(sl>>>26)|0,sl&=67108863,g=Math.imul(He,nt),l=Math.imul(He,it),l=l+Math.imul(qe,nt)|0,m=Math.imul(qe,it),g=g+Math.imul(je,rt)|0,l=l+Math.imul(je,at)|0,l=l+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,at)|0,g=g+Math.imul(Le,st)|0,l=l+Math.imul(Le,ot)|0,l=l+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,l=l+Math.imul(Be,lt)|0,l=l+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,lt)|0;var ol=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ol>>>26)|0,ol&=67108863,g=Math.imul(He,rt),l=Math.imul(He,at),l=l+Math.imul(qe,rt)|0,m=Math.imul(qe,at),g=g+Math.imul(je,st)|0,l=l+Math.imul(je,ot)|0,l=l+Math.imul(Ve,st)|0,m=m+Math.imul(Ve,ot)|0,g=g+Math.imul(Le,ut)|0,l=l+Math.imul(Le,lt)|0,l=l+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,lt)|0;var ul=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ul>>>26)|0,ul&=67108863,g=Math.imul(He,st),l=Math.imul(He,ot),l=l+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(je,ut)|0,l=l+Math.imul(je,lt)|0,l=l+Math.imul(Ve,ut)|0,m=m+Math.imul(Ve,lt)|0;var ll=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ll>>>26)|0,ll&=67108863,g=Math.imul(He,ut),l=Math.imul(He,lt),l=l+Math.imul(qe,ut)|0,m=Math.imul(qe,lt);var dl=(A+g|0)+((l&8191)<<13)|0;return A=(m+(l>>>13)|0)+(dl>>>26)|0,dl&=67108863,h[0]=wi,h[1]=_i,h[2]=Ai,h[3]=ki,h[4]=Mi,h[5]=Xu,h[6]=Yu,h[7]=Zu,h[8]=el,h[9]=tl,h[10]=nl,h[11]=il,h[12]=rl,h[13]=al,h[14]=sl,h[15]=ol,h[16]=ul,h[17]=ll,h[18]=dl,A!==0&&(h[19]=A,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,k=0;k>>26)|0,w+=h>>>26,h&=67108863}y.words[k]=A,x=h,h=w}return x!==0?y.words[k]=x:y.length--,y._strip()}function H(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=H(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,k,h){for(var A=0;A>>1)k++;return 1<>>13,x[2*h+1]=k&8191,k=k>>>13;for(h=2*y;h>=26,x+=k/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,k;if(y!==0){var h=0;for(k=0;k>>26-y}h&&(this.words[k]=h,this.length++)}if(x!==0){for(k=this.length-1;k>=0;k--)this.words[k+x]=this.words[k];for(k=0;k=0);var w;y?w=(y-y%26)/26:w=0;var k=u%26,h=Math.min((u-k)/26,this.length),A=67108863^67108863>>>k<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-k|G>>>k,m=G&A}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[k+x]=h&67108863}for(;k>26,this.words[k+x]=h&67108863;if(A===0)return this._strip();for(t(A===-1),A=0,k=0;k>26,this.words[k]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),k=u,h=k.words[k.length-1]|0,A=this._countBits(h);x=26-A,x!==0&&(k=k.ushln(x),w.iushln(x),h=k.words[k.length-1]|0);var g=w.length-k.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[k.length+f]|0)*67108864+(w.words[k.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(k,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(k,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,k,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.iadd(u)),{div:w,mod:k}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.isub(u)),{div:h.div,mod:k}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),k=u.andln(1),h=x.cmp(w);return h<0||k===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,k=this.length-1;k>=0;k--)w=(x*w+(this.words[k]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var k=(this.words[w]|0)+x*67108864;this.words[w]=k/u|0,x=k%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=new r(0),A=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(l),k.isub(m)),w.iushrn(1),k.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||A.isOdd())&&(h.iadd(l),A.isub(m)),h.iushrn(1),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),k.isub(A)):(x.isub(y),h.isub(w),A.isub(k))}return{a:h,b:A,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,g=1;(y.words[0]&g)===0&&A<26;++A,g<<=1);if(A>0)for(y.iushrn(A);A-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)k.isOdd()&&k.iadd(h),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(k)):(x.isub(y),k.isub(w))}var G;return y.cmpn(1)===0?G=w:G=k,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var k=y.cmp(x);if(k<0){var h=y;y=x,x=h}else if(k===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,A&=67108863,this.words[h]=A}return k!==0&&(this.words[h]=k,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,k=u.words[x]|0;if(w!==k){wk&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new q(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),k=0;k>>22,h=A}h>>>=22,u.words[k-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=k,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),k=0;!w.isZero()&&w.andln(1)===0;)k++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),A=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(A)!==0;)l.redIAdd(A);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=k;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;k--){for(var m=y.words[k],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&A===0){g=0;continue}A<<=1,A|=f,g++,!(g!==x&&(k!==0||G!==0))&&(h=this.mul(h,w[A]),g=0,A=0)}l=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){q.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof pl>"u"||pl,$p)});var T0=ie((Bg,to)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof to=="object"&&to.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,K){return new l(f,P,K).update(j)[D]()}},$=function(f,P,D){return function(j,K,ee,X){return u["cshake"+f].update(j,K,ee,X)[D]()}},le=function(f,P,D){return function(j,K,ee,X){return u["kmac"+f].update(j,K,ee,X)[D]()}},T=function(f,P,D,j){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,K=this.byteCount,ee=f.length,X=this.blockCount,Q=0,pt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=j[X],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++j;return P?K.push(j):K.unshift(j),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,K=f.length;if(P)j=K;else for(var ee=0;ee=57344?j+=3:(X=65536+((X&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return j&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],j>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var pt=new Uint32Array(Q);ee>8&255,X[Q+2]=pt>>16&255,X[Q+3]=pt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,pt=P[K],X[Q]=pt&255,j>1&&(X[Q+1]=pt>>8&255),j>2&&(X[Q+2]=pt>>16&255)),X};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,K,ee,X,Q,pt,Z,de,Gi,Pe,Ne,zi,De,Oe,Wi,Be,Fe,Ki,Le,Ue,Ji,je,Ve,$i,He,qe,Qi,Ge,ze,Xi,We,Ke,Yi,Je,$e,Zi,Qe,Xe,er,Ye,Ze,tr,et,tt,nr,nt,it,ir,rt,at,rr,st,ot,ar,ut,lt,wi,_i,Ai,ki,Mi;for(j=0;j<48;j+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],X=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],pt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Gi=f[7]^f[17]^f[27]^f[37]^f[47],Pe=f[8]^f[18]^f[28]^f[38]^f[48],Ne=f[9]^f[19]^f[29]^f[39]^f[49],P=Pe^(X<<1|Q>>>31),D=Ne^(Q<<1|X>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(pt<<1|Z>>>31),D=ee^(Z<<1|pt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=X^(de<<1|Gi>>>31),D=Q^(Gi<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=pt^(Pe<<1|Ne>>>31),D=Z^(Ne<<1|Pe>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Gi^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,zi=f[0],De=f[1],tt=f[11]<<4|f[10]>>>28,nr=f[10]<<4|f[11]>>>28,qe=f[20]<<3|f[21]>>>29,Qi=f[21]<<3|f[20]>>>29,_i=f[31]<<9|f[30]>>>23,Ai=f[30]<<9|f[31]>>>23,Ye=f[40]<<18|f[41]>>>14,Ze=f[41]<<18|f[40]>>>14,Ke=f[2]<<1|f[3]>>>31,Yi=f[3]<<1|f[2]>>>31,Oe=f[13]<<12|f[12]>>>20,Wi=f[12]<<12|f[13]>>>20,nt=f[22]<<10|f[23]>>>22,it=f[23]<<10|f[22]>>>22,Ge=f[33]<<13|f[32]>>>19,ze=f[32]<<13|f[33]>>>19,ki=f[42]<<2|f[43]>>>30,Mi=f[43]<<2|f[42]>>>30,st=f[5]<<30|f[4]>>>2,ot=f[4]<<30|f[5]>>>2,Je=f[14]<<6|f[15]>>>26,$e=f[15]<<6|f[14]>>>26,Be=f[25]<<11|f[24]>>>21,Fe=f[24]<<11|f[25]>>>21,ir=f[34]<<15|f[35]>>>17,rt=f[35]<<15|f[34]>>>17,Xi=f[45]<<29|f[44]>>>3,We=f[44]<<29|f[45]>>>3,je=f[6]<<28|f[7]>>>4,Ve=f[7]<<28|f[6]>>>4,ar=f[17]<<23|f[16]>>>9,ut=f[16]<<23|f[17]>>>9,Zi=f[26]<<25|f[27]>>>7,Qe=f[27]<<25|f[26]>>>7,Ki=f[36]<<21|f[37]>>>11,Le=f[37]<<21|f[36]>>>11,at=f[47]<<24|f[46]>>>8,rr=f[46]<<24|f[47]>>>8,tr=f[8]<<27|f[9]>>>5,et=f[9]<<27|f[8]>>>5,$i=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,lt=f[29]<<7|f[28]>>>25,wi=f[28]<<7|f[29]>>>25,Xe=f[38]<<8|f[39]>>>24,er=f[39]<<8|f[38]>>>24,Ue=f[48]<<14|f[49]>>>18,Ji=f[49]<<14|f[48]>>>18,f[0]=zi^~Oe&Be,f[1]=De^~Wi&Fe,f[10]=je^~$i&qe,f[11]=Ve^~He&Qi,f[20]=Ke^~Je&Zi,f[21]=Yi^~$e&Qe,f[30]=tr^~tt&nt,f[31]=et^~nr&it,f[40]=st^~ar<,f[41]=ot^~ut&wi,f[2]=Oe^~Be&Ki,f[3]=Wi^~Fe&Le,f[12]=$i^~qe&Ge,f[13]=He^~Qi&ze,f[22]=Je^~Zi&Xe,f[23]=$e^~Qe&er,f[32]=tt^~nt&ir,f[33]=nr^~it&rt,f[42]=ar^~lt&_i,f[43]=ut^~wi&Ai,f[4]=Be^~Ki&Ue,f[5]=Fe^~Le&Ji,f[14]=qe^~Ge&Xi,f[15]=Qi^~ze&We,f[24]=Zi^~Xe&Ye,f[25]=Qe^~er&Ze,f[34]=nt^~ir&at,f[35]=it^~rt&rr,f[44]=lt^~_i&ki,f[45]=wi^~Ai&Mi,f[6]=Ki^~Ue&zi,f[7]=Le^~Ji&De,f[16]=Ge^~Xi&je,f[17]=ze^~We&Ve,f[26]=Xe^~Ye&Ke,f[27]=er^~Ze&Yi,f[36]=ir^~at&tr,f[37]=rt^~rr&et,f[46]=_i^~ki&st,f[47]=Ai^~Mi&ot,f[8]=Ue^~zi&Oe,f[9]=Ji^~De&Wi,f[18]=Xi^~je&$i,f[19]=We^~Ve&He,f[28]=Ye^~Ke&Je,f[29]=Ze^~Yi&$e,f[38]=at^~tr&tt,f[39]=rr^~et&nr,f[48]=ki^~st&ar,f[49]=Mi^~ot&ut,f[0]^=S[j],f[1]^=S[j+1]};if(s)to.exports=u;else{for(x=0;x{my.exports=fy;function fy(i,e){if(!i)throw new Error(e||"Assertion failed")}fy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var hy=ie((C3,Ul)=>{typeof Object.create=="function"?Ul.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ul.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Mn=ie(Re=>{"use strict";var a2=sa(),s2=hy();Re.inherits=s2;function o2(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function u2(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):o2(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Re.htonl=by;function d2(i,e){for(var t="",n=0;n>>0}return a}Re.join32=p2;function y2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Re.split32=y2;function c2(i,e){return i>>>e|i<<32-e}Re.rotr32=c2;function f2(i,e){return i<>>32-e}Re.rotl32=f2;function m2(i,e){return i+e>>>0}Re.sum32=m2;function h2(i,e,t){return i+e+t>>>0}Re.sum32_3=h2;function b2(i,e,t,n){return i+e+t+n>>>0}Re.sum32_4=b2;function x2(i,e,t,n,r){return i+e+t+n+r>>>0}Re.sum32_5=x2;function g2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Re.sum64=g2;function T2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Re.sum64_hi=T2;function v2(i,e,t,n){var r=e+n;return r>>>0}Re.sum64_lo=v2;function w2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Re.sum64_4_hi=w2;function _2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Re.sum64_4_lo=_2;function A2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Re.sum64_5_hi=A2;function k2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Re.sum64_5_lo=k2;function M2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Re.rotr64_hi=M2;function E2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.rotr64_lo=E2;function C2(i,e,t){return i>>>t}Re.shr64_hi=C2;function I2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.shr64_lo=I2});var oa=ie(vy=>{"use strict";var Ty=Mn(),S2=sa();function _o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}vy.BlockHash=_o;_o.prototype.update=function(e,t){if(e=Ty.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Ty.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var R2=Mn(),qn=R2.rotr32;function P2(i,e,t,n){if(i===0)return wy(e,t,n);if(i===1||i===3)return Ay(e,t,n);if(i===2)return _y(e,t,n)}di.ft_1=P2;function wy(i,e,t){return i&e^~i&t}di.ch32=wy;function _y(i,e,t){return i&e^i&t^e&t}di.maj32=_y;function Ay(i,e,t){return i^e^t}di.p32=Ay;function N2(i){return qn(i,2)^qn(i,13)^qn(i,22)}di.s0_256=N2;function D2(i){return qn(i,6)^qn(i,11)^qn(i,25)}di.s1_256=D2;function O2(i){return qn(i,7)^qn(i,18)^i>>>3}di.g0_256=O2;function B2(i){return qn(i,17)^qn(i,19)^i>>>10}di.g1_256=B2});var Ey=ie((P3,My)=>{"use strict";var ua=Mn(),F2=oa(),L2=jl(),Vl=ua.rotl32,es=ua.sum32,U2=ua.sum32_5,j2=L2.ft_1,ky=F2.BlockHash,V2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;ky.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ua.inherits(Gn,ky);My.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var la=Mn(),H2=oa(),da=jl(),q2=sa(),En=la.sum32,G2=la.sum32_4,z2=la.sum32_5,W2=da.ch32,K2=da.maj32,J2=da.s0_256,$2=da.s1_256,Q2=da.g0_256,X2=da.g1_256,Cy=H2.BlockHash,Y2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function zn(){if(!(this instanceof zn))return new zn;Cy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Y2,this.W=new Array(64)}la.inherits(zn,Cy);Iy.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var ql=Mn(),Sy=Hl();function pi(){if(!(this instanceof pi))return new pi;Sy.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ql.inherits(pi,Sy);Ry.exports=pi;pi.blockSize=512;pi.outSize=224;pi.hmacStrength=192;pi.padLength=64;pi.prototype._digest=function(e){return e==="hex"?ql.toHex32(this.h.slice(0,7),"big"):ql.split32(this.h.slice(0,7),"big")}});var Wl=ie((O3,By)=>{"use strict";var Qt=Mn(),Z2=oa(),eb=sa(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,Ny=Qt.shr64_hi,Dy=Qt.shr64_lo,Ri=Qt.sum64,Gl=Qt.sum64_hi,zl=Qt.sum64_lo,tb=Qt.sum64_4_hi,nb=Qt.sum64_4_lo,ib=Qt.sum64_5_hi,rb=Qt.sum64_5_lo,Oy=Z2.BlockHash,ab=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Cn(){if(!(this instanceof Cn))return new Cn;Oy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=ab,this.W=new Array(160)}Qt.inherits(Cn,Oy);By.exports=Cn;Cn.blockSize=1024;Cn.outSize=512;Cn.hmacStrength=192;Cn.padLength=128;Cn.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var Kl=Mn(),Fy=Wl();function yi(){if(!(this instanceof yi))return new yi;Fy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Kl.inherits(yi,Fy);Ly.exports=yi;yi.blockSize=1024;yi.outSize=384;yi.hmacStrength=192;yi.padLength=128;yi.prototype._digest=function(e){return e==="hex"?Kl.toHex32(this.h.slice(0,12),"big"):Kl.split32(this.h.slice(0,12),"big")}});var jy=ie(pa=>{"use strict";pa.sha1=Ey();pa.sha224=Py();pa.sha256=Hl();pa.sha384=Uy();pa.sha512=Wl()});var Wy=ie(zy=>{"use strict";var yr=Mn(),xb=oa(),Ao=yr.rotl32,Vy=yr.sum32,ts=yr.sum32_3,Hy=yr.sum32_4,Gy=xb.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;Gy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yr.inherits(Jn,Gy);zy.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Vy(Ao(Hy(n,qy(_,r,a,s),e[vb[_]+t],gb(_)),_b[_]),o);n=o,o=s,s=Ao(a,10),a=r,r=v,v=Vy(Ao(Hy(d,qy(79-_,p,c,b),e[wb[_]+t],Tb(_)),Ab[_]),I),d=I,I=b,b=Ao(c,10),c=p,p=v}v=ts(this.h[1],a,b),this.h[1]=ts(this.h[2],s,I),this.h[2]=ts(this.h[3],o,d),this.h[3]=ts(this.h[4],n,p),this.h[4]=ts(this.h[0],r,c),this.h[0]=v};Jn.prototype._digest=function(e){return e==="hex"?yr.toHex32(this.h,"little"):yr.split32(this.h,"little")};function qy(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function gb(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function Tb(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var vb=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],wb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],_b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ab=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Jy=ie((U3,Ky)=>{"use strict";var kb=Mn(),Mb=sa();function ya(i,e,t){if(!(this instanceof ya))return new ya(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(kb.toArray(e,t))}Ky.exports=ya;ya.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Mb(e.length<=this.blockSize);for(var t=e.length;t{var Rt=$y;Rt.utils=Mn();Rt.common=oa();Rt.sha=jy();Rt.ripemd=Wy();Rt.hmac=Jy();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var cd=ie((yd,_c)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var A=0;A255)return!1;return!0}function n(h,A){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return A&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,A,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),A.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:A}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+A[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var A=[],g=0;g>2,this._Ke[G][A%4]=m[A],this._Kd[h-G][A%4]=m[A];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var A=1;A>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var A=l/2+1;A>2,K=P%4,this._Ke[j][K]=m[A],this._Kd[h-j][K]=m[A++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var A=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[A][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var A=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^H[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[A][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var A=r(h.length),g=r(16),l=0;l=0;--A)this._counter[A]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,A){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",A instanceof u||(A=new u(A)),this._counter=A,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var A=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-A,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let k=S,h=L,A=O,g=U,l=H,m=E,G=J,f=$,P,D,j,K,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((k>>>2|k<<32-2)^(k>>>13|k<<32-13)^(k>>>22|k<<32-22))+(k&h^k&A^h&A)|0,f=G,G=m,m=l,l=g+K|0,g=A,A=h,h=k,k=K+ee|0;S=S+k|0,L=L+h|0,O=O+A|0,U=U+g|0,H=H+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&A(g)};if(!H)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof xd<"u"?kc.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(xd)});var Qc=ie((C4,$c)=>{"use strict";var Jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",_d={};for(ps=0;ps>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Kc(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=va(e)^n>>5}for(e=va(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=Kc(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=va(n)^s,r+=Jo.charAt(s)}for(a=0;a<6;++a)n=va(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=Jo.charAt(o)}return r}function Jc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=Kc(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function d5(){var i=Jc.apply(null,arguments);if(typeof i=="object")return i}function p5(i){var e=Jc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $o(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof Xd=="object"&&typeof Yd<"u"?Yd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(Xd,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var Zd=ie(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$dictionary=void 0;cu.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Os=ie((Vk,hm)=>{hm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var tp=ie(Ui=>{var ke=Os(),ep=()=>[{type:ke.RANGE,from:48,to:57}],bm=()=>[{type:ke.CHAR,value:95},{type:ke.RANGE,from:97,to:122},{type:ke.RANGE,from:65,to:90}].concat(ep()),xm=()=>[{type:ke.CHAR,value:9},{type:ke.CHAR,value:10},{type:ke.CHAR,value:11},{type:ke.CHAR,value:12},{type:ke.CHAR,value:13},{type:ke.CHAR,value:32},{type:ke.CHAR,value:160},{type:ke.CHAR,value:5760},{type:ke.RANGE,from:8192,to:8202},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233},{type:ke.CHAR,value:8239},{type:ke.CHAR,value:8287},{type:ke.CHAR,value:12288},{type:ke.CHAR,value:65279}],e1=()=>[{type:ke.CHAR,value:10},{type:ke.CHAR,value:13},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233}];Ui.words=()=>({type:ke.SET,set:bm(),not:!1});Ui.notWords=()=>({type:ke.SET,set:bm(),not:!0});Ui.ints=()=>({type:ke.SET,set:ep(),not:!1});Ui.notInts=()=>({type:ke.SET,set:ep(),not:!0});Ui.whitespace=()=>({type:ke.SET,set:xm(),not:!1});Ui.notWhitespace=()=>({type:ke.SET,set:xm(),not:!0});Ui.anyChar=()=>({type:ke.SET,set:e1(),not:!0})});var Tm=ie(Bs=>{var gm=Os(),Pa=tp(),t1="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",n1={0:0,t:9,n:10,v:11,f:12,r:13};Bs.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?t1.indexOf(d):n1[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Bs.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Pa.words());else if(r[2])t.push(Pa.ints());else if(r[3])t.push(Pa.whitespace());else if(r[4])t.push(Pa.notWords());else if(r[5])t.push(Pa.notInts());else if(r[6])t.push(Pa.notWhitespace());else if(r[7])t.push({type:gm.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:gm.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Bs.error(e,"Unterminated character class")};Bs.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var vm=ie(Fs=>{var fu=Os();Fs.wordBoundary=()=>({type:fu.POSITION,value:"b"});Fs.nonWordBoundary=()=>({type:fu.POSITION,value:"B"});Fs.begin=()=>({type:fu.POSITION,value:"^"});Fs.end=()=>({type:fu.POSITION,value:"$"})});var wm=ie((zk,np)=>{var Na=Tm(),bn=Os(),Ar=tp(),mu=vm();np.exports=i=>{var e=0,t,n,r={type:bn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Na.error(i,`Nothing to repeat at column ${O-1}`)},p=Na.strToChars(i);for(t=p.length;e{"use strict";var xn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new xn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};_m.exports=ji});var Mm=ie((Kk,km)=>{var hu=wm(),Ls=Am(),kr=hu.types;km.exports=class Us{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=hu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Us.prototype.max!=null?Us.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case kr.ROOT:case kr.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var i1=Mr&&Mr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.RandomGenerator=void 0;var r1=i1(Mm()),a1;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new r1.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(a1=Mr.RandomGenerator||(Mr.RandomGenerator={}))});var js=ie(Da=>{"use strict";var s1=Da&&Da.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Da,"__esModule",{value:!0});Da.TypeGuardError=void 0;var o1=function(i){s1(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Da.TypeGuardError=o1});var Cm=ie(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var u1=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};bu.$any=u1});var Im=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$every=void 0;var l1=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$guard=void 0;var d1=js(),p1=function(i){return function(e,t){if(e===!0)throw new d1.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};gu.$guard=p1});var Rm=ie(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_between=void 0;var y1=function(i,e,t){return e<=i&&i<=t};Tu.$is_between=y1});var Pm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_custom=void 0;var c1=Zd(),f1=function(i,e,t,n){var r,a=(r=c1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};vu.$is_custom=f1});var Nm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_date=void 0;var m1=function(i){return h1.test(i)};wu.$is_date=m1;var h1=/^(\d{4})-(\d{2})-(\d{2})$/});var Dm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_datetime=void 0;var b1=function(i){return!isNaN(new Date(i).getTime())};_u.$is_datetime=b1});var Om=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var x1=function(i){return g1.test(i)};Au.$is_email=x1;var g1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Bm=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_ipv4=void 0;var T1=function(i){return v1.test(i)};ku.$is_ipv4=T1;var v1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Fm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var w1=function(i){return _1.test(i)};Mu.$is_ipv6=w1;var _1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Lm=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_url=void 0;var A1=function(i){return k1.test(i)};Eu.$is_url=A1;var k1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Um=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_uuid=void 0;var M1=function(i){return E1.test(i)};Cu.$is_uuid=M1;var E1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var jm=ie(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$join=void 0;var C1=function(i){return I1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};Iu.$join=C1;var I1=function(i){return S1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},S1=function(i){return R1.has(i)},R1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Vm=ie(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$number=void 0;var P1=js(),N1=function(i){if(isFinite(i)===!1)throw new P1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Su.$number=N1});var Hm=ie(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$report=void 0;var D1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};Ru.$report=D1});var qm=ie(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$rest=void 0;var O1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Pu.$rest=O1});var Gm=ie(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$string=void 0;var B1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Nu.$string=B1});var zm=ie(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$tail=void 0;var F1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Du.$tail=F1});var $m=ie(Er=>{"use strict";var jt=Er&&Er.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:Q1.$number,string:Z1.$string,tail:ex.$tail,rest:Y1.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:L1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Wm.RandomGenerator,pick:Wm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Km.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(tx=Er.Namespace||(Er.Namespace={}))});var Qm=ie(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.MapUtil=void 0;var nx;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(nx=Vs.MapUtil||(Vs.MapUtil={}))});var Ym=ie(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ie(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var nh=ie(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0})});var rh=ie(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0})});var sh=ie(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0})});var uh=ie(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0})});var mp=ie(z=>{"use strict";var ix=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Cr=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ix(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Oa=Zd(),Me=$m(),rx=Qm();Cr(Ym(),z);Cr(eh(),z);Cr(nh(),z);Cr(rh(),z);Cr(sh(),z);Cr(uh(),z);Cr(js(),z);function ip(){ae("assert")}z.assert=ip;Object.assign(ip,Me.Namespace.assert("assert"));function rp(){ae("assertType")}z.assertType=rp;Object.assign(rp,Me.Namespace.assert("assertType"));function Ou(){ae("is")}z.is=Ou;Object.assign(Ou,Me.Namespace.assert("is"));function Bu(){ae("validate")}z.validate=Bu;Object.assign(Bu,Me.Namespace.validate());function ap(){ae("assertEquals")}z.assertEquals=ap;Object.assign(ap,Me.Namespace.assert("assertEquals"));function sp(){ae("equals")}z.equals=sp;Object.assign(sp,Me.Namespace.is());function op(){ae("validateEquals")}z.validateEquals=op;Object.assign(op,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Oa.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Oa.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=rx.MapUtil.take(Oa.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function ax(){ae("application")}z.application=ax;function up(){ae("assertParse")}z.assertParse=up;Object.assign(up,Me.Namespace.assert("assertParse"));function lp(){ae("isParse")}z.isParse=lp;Object.assign(lp,Ou);function dp(){ae("validateParse")}z.validateParse=dp;Object.assign(dp,Bu);function pp(){ae("stringify")}z.stringify=pp;Object.assign(pp,Me.Namespace.stringify("stringify"));function Fu(){ae("assertStringify")}z.assertStringify=Fu;Object.assign(Fu,Me.Namespace.assert("assertStringify"));Object.assign(Fu,Me.Namespace.stringify("assertStringify"));function Lu(){ae("isStringify")}z.isStringify=Lu;Object.assign(Lu,Me.Namespace.is());Object.assign(Lu,Me.Namespace.stringify("isStringify"));function Uu(){ae("validateStringify")}z.validateStringify=Uu;Object.assign(Uu,Me.Namespace.validate());Object.assign(Uu,Me.Namespace.stringify("validateStringify"));function sx(){ae("metadata")}z.metadata=sx;function yp(){ae("random")}z.random=yp;Object.assign(yp,Me.Namespace.random());function ox(){ae("literals")}z.literals=ox;function cp(){ae("clone")}z.clone=cp;Object.assign(cp,Me.Namespace.clone("clone"));function ju(){ae("assertClone")}z.assertClone=ju;Object.assign(ju,Me.Namespace.assert("assertClone"));Object.assign(ju,Me.Namespace.clone("assertClone"));function Vu(){ae("isClone")}z.isClone=Vu;Object.assign(Vu,Me.Namespace.is());Object.assign(Vu,Me.Namespace.clone("isClone"));function Hu(){ae("validateClone")}z.validateClone=Hu;Object.assign(Hu,Me.Namespace.validate());Object.assign(Hu,Me.Namespace.clone("validateClone"));function fp(){ae("prune")}z.prune=fp;Object.assign(fp,Me.Namespace.prune("prune"));function qu(){ae("assertPrune")}z.assertPrune=qu;Object.assign(qu,Me.Namespace.assert("assertPrune"));Object.assign(qu,Me.Namespace.prune("assertPrune"));function Gu(){ae("isPrune")}z.isPrune=Gu;Object.assign(Gu,Me.Namespace.is());Object.assign(Gu,Me.Namespace.prune("isPrune"));function zu(){ae("validatePrune")}z.validatePrune=zu;Object.assign(zu,Me.Namespace.prune("validatePrune"));Object.assign(zu,Me.Namespace.validate());function lh(){ae("createAssert")}z.createAssert=lh;Object.assign(lh,ip);function dh(){ae("createAssertType")}z.createAssertType=dh;Object.assign(dh,rp);function ph(){ae("createIs")}z.createIs=ph;Object.assign(ph,Ou);function yh(){ae("createValidate")}z.createValidate=yh;Object.assign(yh,Bu);function ch(){ae("createAssertEquals")}z.createAssertEquals=ch;Object.assign(ch,ap);function fh(){ae("createEquals")}z.createEquals=fh;Object.assign(fh,sp);function mh(){ae("createValidateEquals")}z.createValidateEquals=mh;Object.assign(mh,op);function hh(){ae("createIsParse")}z.createIsParse=hh;Object.assign(hh,lp);function bh(){ae("createAssertParse")}z.createAssertParse=bh;Object.assign(bh,up);function xh(){ae("createValidateParse")}z.createValidateParse=xh;Object.assign(xh,dp);function gh(){ae("createStringify")}z.createStringify=gh;Object.assign(gh,pp);function Th(){ae("createAssertStringify")}z.createAssertStringify=Th;Object.assign(Th,Fu);function vh(){ae("createIsStringify")}z.createIsStringify=vh;Object.assign(vh,Lu);function wh(){ae("createValidateStringify")}z.createValidateStringify=wh;Object.assign(wh,Uu);function _h(){ae("createRandom")}z.createRandom=_h;Object.assign(_h,yp);function Ah(){ae("createClone")}z.createClone=Ah;Object.assign(Ah,cp);function kh(){ae("createAssertClone")}z.createAssertClone=kh;Object.assign(kh,ju);function Mh(){ae("createIsClone")}z.createIsClone=Mh;Object.assign(Mh,Vu);function Eh(){ae("createValidateClone")}z.createValidateClone=Eh;Object.assign(Eh,Hu);function Ch(){ae("createPrune")}z.createPrune=Ch;Object.assign(Ch,fp);function Ih(){ae("createAssertPrune")}z.createAssertPrune=Ih;Object.assign(Ih,qu);function Sh(){ae("createIsPrune")}z.createIsPrune=Sh;Object.assign(Sh,Gu);function Rh(){ae("createValidatePrune")}z.createValidatePrune=Rh;Object.assign(Rh,zu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Nh=ie(gn=>{"use strict";var Ph=gn&&gn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),ux=gn&&gn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),lx=gn&&gn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Ph(e,i,t);return ux(e,i),e},dx=gn&&gn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ph(e,i,t)};Object.defineProperty(gn,"__esModule",{value:!0});var px=lx(mp());gn.default=px;dx(mp(),gn)});var Ld={};zr(Ld,{BaseContract:()=>fa,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hr,FixedNumber:()=>yt,Signer:()=>St,VoidSigner:()=>li,Wallet:()=>Sn,Wordlist:()=>hn,constants:()=>mt,errors:()=>Wt,getDefaultProvider:()=>su,logger:()=>Pf,providers:()=>ti,utils:()=>te,version:()=>uu,wordlists:()=>xr});var o0=An(yl());var Qp="logger/5.7.0";var Xp=!1,Yp=!1,Qs={debug:1,default:2,info:2,warning:3,error:4,off:5},Zp=Qs.default,cl=null;function t6(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var e0=t6(),fl;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(fl||(fl={}));var Wt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var t0="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Qs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Zp>Qs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(Yp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=t0[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),e0&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:e0})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return cl||(cl=new M(Qp)),cl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Xp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Yp=!!e,Xp=!!t}static setLogLevel(e){let t=Qs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Zp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=fl;var n0="bytes/5.7.0";var vt=new M(n0);function r0(i){return!!i.toHexString}function Wr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return Wr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ri(i){return re(i)&&!(i.length%2)||on(i)}function i0(i){return typeof i=="number"&&i==i&&i%1===0}function on(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!i0(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),Wr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),r0(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),Wr(n)}function Zt(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),Wr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var ml="0123456789abcdef";function W(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=ml[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),r0(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(on(i)){let t="0x";for(let n=0;n>4]+ml[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Nt(i){if(typeof i!="string")i=W(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ee(i,e,t){return typeof i!="string"?i=W(i):(!re(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=W(t).substring(2)}),e}function Un(i){let e=hl(W(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function hl(i){typeof i!="string"&&(i=W(i)),re(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function jn(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ri(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=sr(V(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=me(e.r,32),e.s==null||!re(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=me(e.s,32);let t=V(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(re(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Va(i){return i=jn(i),W(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Xs="bignumber/5.7.0";var Ha=o0.default.BN,ai=new M(Xs),bl={},a0=9007199254740991;function u0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||on(i))}var s0=!1,F=class{constructor(e,t){e!==bl&&ai.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ai.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?s0||(s0=!0,ai.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ai.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ai.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(bl,qa(e)):e.match(/^-?[0-9]+$/)?new F(bl,qa(new Ha(e))):ai.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=a0||e<=-a0)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return ai.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function qa(i){if(typeof i!="string")return qa(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ai.throwArgumentError("invalid hex","value",i),i=qa(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Kt(i){return F.from(qa(i))}function be(i){let e=F.from(i).toHexString();return e[0]==="-"?new Ha("-"+e.substring(3),16):new Ha(e.substring(2),16)}function un(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ai.throwError(i,M.errors.NUMERIC_FAULT,n)}function xl(i){return new Ha(i,36).toString(16)}function gl(i){return new Ha(i,16).toString(36)}var Vt=new M(Xs),Ga={},d0=F.from(0),p0=F.from(-1);function y0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,M.errors.NUMERIC_FAULT,r)}var za="0";for(;za.length<256;)za+=za;function Tl(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+za.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function Kr(i,e){e==null&&(e=0);let t=Tl(e);i=F.from(i);let n=i.lt(d0);n&&(i=i.mul(p0));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&y0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new si(Ga,t,n,r)}},yt=class{constructor(e,t,n,r){e!==Ga&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(l0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(l0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=yt.from("1"+za.substring(0,e),this.format),r=n6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return yt.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!u0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),yt.fromString(Kr(e,t),si.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=si.from(t),r=ln(e,n.decimals);!n.signed&&r.lt(d0)&&y0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=me(a,n.width/8));let s=Kr(r,n.decimals);return new yt(Ga,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=si.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=Kr(r,n.decimals);return new yt(Ga,a,s,n)}static from(e,t){if(typeof e=="string")return yt.fromString(e,t);if(on(e))return yt.fromBytes(e,t);try{return yt.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},l0=yt.from(1),n6=yt.from("0.5");var c0="properties/5.7.0";var i6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ys=new M(c0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function ft(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ce(i){return i6(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function Jr(i,e){(!i||typeof i!="object")&&Ys.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||Ys.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var r6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f0(i){if(i==null||r6[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tct(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ct(n))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ct(i){return a6(i)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var ge=new M(Vn),or={},m0={calldata:!0,memory:!0,storage:!0},s6={calldata:!0,memory:!0};function Zs(i,e){if(i==="bytes"||i==="string"){if(m0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&s6[e])return!0;return(m0[e]||e==="payable")&&ge.throwArgumentError("invalid modifier","name",e),!1}function o6(i,e){let t=i;function n(o){ge.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?dt.fromString(e,t):dt.fromObject(e)}static fromObject(e){return dt.isParamType(e)?e:new dt(or,{name:e.name||null,type:$r(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(dt.fromObject):null})}static fromString(e,t){function n(r){return dt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(o6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Wa(i,e){return d6(i).map(t=>dt.fromString(t,e))}var qt=class{constructor(e,t){e!==or&&ge.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),eo(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&ge.throwArgumentError("invalid event object","value",e);let t={name:Ka(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dt.fromObject):[],type:"event"};return new Ht(or,t)}static fromString(e){let t=e.match(Ja);t||ge.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:ge.warn("unknown modifier: "+r)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Wa(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function b0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&ge.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||ge.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function x0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function g0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ge.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e}var Dt=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&ge.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&ge.throwArgumentError("invalid constructor object","value",e);let t=g0(e);t.constant&&ge.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(or,n)}static fromString(e){let t={type:"constructor"};e=b0(e,t);let n=e.match(Ja);return(!n||n[1].trim()!=="constructor")&&ge.throwArgumentError("invalid constructor string","value",e),t.inputs=Wa(n[2].trim(),!1),x0(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&ge.throwArgumentError("invalid function object","value",e);let t=g0(e),n={type:e.type,name:Ka(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(dt.fromObject):[],outputs:e.outputs?e.outputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(or,n)}static fromString(e){let t={type:"function"};e=b0(e,t);let n=e.split(" returns ");n.length>2&&ge.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ja);if(r||ge.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&Ka(t.name),t.inputs=Wa(r[2],!1),x0(r[3].trim(),t),n.length>1){let a=n[1].match(Ja);(a[1].trim()!=""||a[3].trim()!="")&&ge.throwArgumentError("unexpected tokens","value",e),t.outputs=Wa(a[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function h0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&ge.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Ka(e.name),inputs:e.inputs?e.inputs.map(dt.fromObject):[]};return h0(new tn(or,t))}static fromString(e){let t={type:"error"},n=e.match(Ja);return n||ge.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Ka(t.name),t.inputs=Wa(n[2],!1),h0(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function $r(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var l6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ka(i){return(!i||!i.match(l6))&&ge.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ja=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function d6(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&vl.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},lr=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):lr.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:vl.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new lr(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var v0=An(T0());function ce(i){return"0x"+v0.default.keccak_256(V(i))}var no={};zr(no,{decode:()=>$a,encode:()=>oi});var w0="rlp/5.7.0";var Hn=new M(w0);function _0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function A0(i,e,t){let n=0;for(let r=0;re+1+n&&Hn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function E0(i,e){if(i.length===0&&Hn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&Hn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=A0(i,e+1,t);return e+1+t+n>i.length&&Hn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),k0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&Hn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),k0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&Hn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=A0(i,e+1,t);e+1+t+n>i.length&&Hn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=W(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&Hn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(i[e])}}function $a(i){let e=V(i),t=E0(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",i),t.result}var C0="address/5.7.0";var Ei=new M(C0);function I0(i){re(i,20)||Ei.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var p6=9007199254740991;function y6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var wl={};for(let i=0;i<10;i++)wl[String(i)]=String(i);for(let i=0;i<26;i++)wl[String.fromCharCode(65+i)]=String(10+i);var S0=Math.floor(y6(p6));function R0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>wl[n]).join("");for(;e.length>=S0;){let n=e.substring(0,S0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Ei.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=I0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Ei.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==R0(i)&&Ei.throwArgumentError("bad icap checksum","address",i),e=xl(i.substring(4));e.length<40;)e="0"+e;e=I0("0x"+e)}else Ei.throwArgumentError("invalid address","address",i);return e}function P0(i){try{return fe(i),!0}catch{}return!1}function N0(i){let e=gl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+R0("XE00"+e)+e}function dr(i){let e=null;try{e=fe(i.from)}catch{Ei.throwArgumentError("missing from address","transaction",i)}let t=Zt(V(F.from(i.nonce).toHexString()));return fe(Ee(ce(oi([e,t])),12))}function D0(i,e,t){return Nt(e)!==32&&Ei.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ei.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ee(ce(ye(["0xff",fe(i),e,t])),12))}var io=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var ro=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Xr=new M(Vn);function _l(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Xr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Xr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Xr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Xr.throwArgumentError("types/value length mismatch","tuple",t);let r=new ur(i.wordSize),a=new ur(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function Al(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var ao=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Xr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rpo,EtherSymbol:()=>U0,HashZero:()=>Zr,MaxInt256:()=>L0,MaxUint256:()=>fo,MinInt256:()=>F0,NegativeOne:()=>yo,One:()=>co,Two:()=>O0,WeiPerEther:()=>B0,Zero:()=>Yr});var po="0x0000000000000000000000000000000000000000";var yo=F.from(-1),Yr=F.from(0),co=F.from(1),O0=F.from(2),B0=F.from("1000000000000000000"),fo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),F0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),L0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Zr="0x0000000000000000000000000000000000000000000000000000000000000000";var U0="\u039E";var mo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=fo.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(co).mul(yo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Yr)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var j0="strings/5.7.0";var V0=new M(j0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Bt||(Bt={}));function c6(i,e,t,n,r){return V0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function H0(i,e,t,n,r){if(i===Bt.BAD_PREFIX||i===Bt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Bt.OVERRUN?t.length-e-1:0}function f6(i,e,t,n,r){return i===Bt.OVERLONG?(n.push(r),0):(n.push(65533),H0(i,e,t,n,r))}var ho=Object.freeze({error:c6,ignore:H0,replace:f6});function Ml(i,e){e==null&&(e=ho.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Bt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Bt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Bt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function Te(i,e=Gt.current){e!=Gt.current&&(V0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function kl(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function El(i,e){return'"'+Ml(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?kl(t):(t-=65536,kl((t>>10&1023)+55296)+kl((t&1023)+56320))}).join("")+'"'}function bo(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return bo(Ml(i,e))}function Ci(i,e=Gt.current){return Ml(Te(i,e))}function Cl(i){let e=Te(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Zr]).slice(0,32))}function Il(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function m6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function q0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Rl(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var h6=q0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),b6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),x6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],g6=Sl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),T6=Sl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),v6=Sl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",m6),w6=q0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function _6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function A6(i){return!!Rl(i,h6)}function k6(i){let e=Rl(i,x6);if(e)return[i+e.s];let t=g6[i];if(t)return t;let n=T6[i];if(n)return[i+n[0]];let r=v6[i];return r||null}function M6(i){return!!Rl(i,w6)}function Pl(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Ci(i);e=_6(e.map(n=>{if(b6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=k6(n);return r||[n]})),e=Ci(bo(e),Gt.NFKC),e.forEach(n=>{if(M6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(A6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=bo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var xo=class extends Qa{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Te(t))}decode(e){return Jt(super.decode(e))}};var pr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return _l(e,this.coders,t)}decode(e){return e.coerce(this.name,Al(e,this.coders))}};var go=new M(Vn),E6=new RegExp(/^bytes([0-9]*)$/),C6=new RegExp(/^(u?int)([0-9]*)$/),ea=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new io(e.name);case"bool":return new so(e.name);case"string":return new xo(e.name);case"bytes":return new oo(e.name);case"array":return new ao(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new pr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new lo(e.name)}let t=e.type.match(C6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&go.throwArgumentError("invalid "+t[1]+" bit length","param",e),new mo(n/8,t[1]==="int",e.name)}if(t=e.type.match(E6),t){let n=parseInt(t[1]);return(n===0||n>32)&&go.throwArgumentError("invalid bytes length","param",e),new uo(n,e.name)}return go.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new lr(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ur(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(dt.from(r)));return new pr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&go.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(dt.from(s))),r=new pr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(dt.from(s)));return new pr(r,"_").decode(this._getReader(V(t),n))}},Xa=new ea;function nn(i){return ce(Te(i))}var To="hash/5.7.0";var Nl={};zr(Nl,{decode:()=>ta,encode:()=>na});function ta(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function I6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function R6(i){let e=0;return()=>i[e++]}function W0(i){return R6(S6(i))}function P6(i){return i&1?~i>>1:i>>1}function N6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function K0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(B6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(F6(t,i))}return I6(z0(e))}function O6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function J0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function B6(i,e){let t=1+e(),n=e(),r=O6(e),a=J0(r.length,1+i,e);return z0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function F6(i,e){let t=1+e();return J0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function $0(i){let e=Ya(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Ya(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function Q0(){return W0(ta("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var vo=Q0(),L6=new Set(Ya(vo)),U6=new Set(Ya(vo)),j6=K0(vo),V6=$0(vo),X0=45,Y0=95;function Z0(i){return Ci(i)}function H6(i){return i.filter(e=>e!=65039)}function ey(i){for(let e of i.split(".")){let t=Z0(e);try{for(let n=t.lastIndexOf(Y0)-1;n>=0;n--)if(t[n]!==Y0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===X0&&t[3]===X0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function ty(i){return ey(q6(i,H6))}function q6(i,e){let t=Z0(i).reverse(),n=[];for(;t.length;){let r=z6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(L6.has(a)){n.push(a);continue}if(U6.has(a))continue;let s=j6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return ey(G6(String.fromCodePoint(...n)))}function G6(i){return i.normalize("NFC")}function z6(i,e){var t;let n=V6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var W6=new M(To),iy=new Uint8Array(32);iy.fill(0);function ny(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function Dl(i){let e=Te(ty(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(ny(e.slice(n))),t}function Ol(i){try{return Dl(i).length!==0}catch{}return!1}function Ii(i){typeof i!="string"&&W6.throwArgumentError("invalid ENS name; not a string","name",i);let e=iy,t=Dl(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function Za(i){return W(ye(Dl(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var ry=`Ethereum Signed Message: -`;function ia(i){return typeof i=="string"&&(i=Te(i)),ce(ye([Te(ry),Te(String(i.length)),i]))}var K6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ht=new M(To),uy=new Uint8Array(32);uy.fill(0);var J6=F.from(-1),ly=F.from(0),dy=F.from(1),$6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Q6(i){let e=V(i),t=e.length%32;return t?_t([e,uy.slice(t)]):W(e)}var X6=me(dy.toHexString(),32),Y6=me(ly.toHexString(),32),ay={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Bl=["name","version","chainId","verifyingContract","salt"];function sy(i){return function(e){return typeof e!="string"&&ht.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var Z6={name:sy("name"),version:sy("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function Fl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",i);let r=$6.mask(t?n-1:n),a=t?r.add(dy).mul(J6):ly;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&ht.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&ht.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&ht.throwArgumentError(`invalid length for ${i}`,"value",n),Q6(n)}}}switch(i){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?X6:Y6};case"bytes":return function(e){return ce(e)};case"string":return function(e){return nn(e)}}return null}function oy(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&ht.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Fl(c)&&(n[c]||ht.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?ht.throwArgumentError("missing primary type","types",e):a.length>1&&ht.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=oy(o,e[o])+d.map(p=>oy(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=Fl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),_t(s)}}return ht.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||ht.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Fl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):ht.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=ay[n];r||ht.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Bl.indexOf(n.name)-Bl.indexOf(r.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return ce(bt.encode(e,t,n))}static resolveNames(e,t,n,r){return K6(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let r={},a=[];Bl.forEach(d=>{let p=e[d];p!=null&&(r[d]=Z6[d](p),a.push({name:d,type:ay[d]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&ht.throwArgumentError("invalid string","value",p),p}return ht.throwArgumentError("unsupported type","type",d)})}}};var xt=new M(Vn);var ra=class extends en{},aa=class extends en{},Ll=class extends en{},ui=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},e2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function py(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Si=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ft(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){xt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){xt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&&xt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Xa}static getAddress(e){return fe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];xt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching function","name",n):r.length>1&&xt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];xt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching event","name",n):r.length>1&&xt.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Ht.fromString(e).format()];return t||xt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=ft(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}xt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching error","name",n):r.length>1&&xt.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ft(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ft(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=e2[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return xt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&xt.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?ce(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&xt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&xt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&&xt.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(dt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new ui({_isIndexed:!0,hash:null});else if(s[_])p[_]=new ui({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw py(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw py(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new aa({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ra({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Ll({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var yy="abstract-provider/5.7.0";var t2=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},n2=new M(yy),wo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){n2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return t2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var cy="abstract-signer/5.7.0";var kn=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},dn=new M(cy),i2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],r2=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){dn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)i2.indexOf(n)===-1&&dn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&dn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>kn(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&dn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?dn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&dn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&dn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):dn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(r2.indexOf(r.code)>=0)throw r;return dn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&dn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ce(t)})}_checkProvider(e){this.provider||dn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},li=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{dn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new li(this.address,e)}};var pe=An(yl()),$n=An(Jl());function ca(i,e,t){return t={path:e,exports:{},require:function(n,r){return Eb(n,r??t.path)}},i(t,t.exports),t.exports}function Eb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Yl=Xy;function Xy(i,e){if(!i)throw new Error(e||"Assertion failed")}Xy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=ca(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),Eo=rn.getNAF,Cb=rn.getJSF,Co=rn.assert;function Ni(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var cr=Ni;Ni.prototype.point=function(){throw new Error("Not implemented")};Ni.prototype.validate=function(){throw new Error("Not implemented")};Ni.prototype._fixedNafMul=function(e,t){Co(e.precomputed);var n=e._getDoubles(),r=Eo(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];Co(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Ni.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=Eo(n[v],s[v],this._bitLength),d[S]=Eo(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=Cb(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};cn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(i,e,t,n){cr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Zl(Pt,cr.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ko=ca(function(i,e){"use strict";var t=e;t.base=cr,t.short=Sb,t.mont=null,t.edwards=null}),Mo=ca(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new ko.short(o):o.type==="edwards"?this.curve=new ko.edwards(o):this.curve=new ko.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:$n.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:$n.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:$n.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:$n.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:$n.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:$n.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Pi(i){if(!(this instanceof Pi))return new Pi(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(i.entropy,i.entropyEnc||"hex"),t=In.toArray(i.nonce,i.nonceEnc||"hex"),n=In.toArray(i.pers,i.persEnc||"hex");Yl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Yy=Pi;Pi.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Pi.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=In.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var Rb=rn.assert;function Io(i,e){if(i instanceof Io)return i;this._importDER(i,e)||(Rb(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var So=Io;function Pb(){this.place=0}function $l(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Qy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Io.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Qy(t),n=Qy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];Ql(r,t.length),r=r.concat(t),r.push(2),Ql(r,n.length);var a=r.concat(n),s=[48];return Ql(s,a.length),s=s.concat(a),rn.encode(s,e)};var Nb=function(){throw new Error("unsupported")},Zy=rn.assert;function pn(i){if(!(this instanceof pn))return new pn(i);typeof i=="string"&&(Zy(Object.prototype.hasOwnProperty.call(Mo,i),"Unknown curve "+i),i=Mo[i]),i instanceof Mo.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var Db=pn;pn.prototype.keyPair=function(e){return new ed(this,e)};pn.prototype.keyFromPrivate=function(e,t){return ed.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return ed.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Yy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Nb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new Yy({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new So({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new So(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};pn.prototype.recoverPubKey=function(i,e,t,n){Zy((3&t)===t,"The recovery param is more than two bits"),e=new So(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};pn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new So(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var Ob=ca(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=ko,t.curves=Mo,t.ec=Db,t.eddsa=null}),ec=Ob.ec;var tc="signing-key/5.7.0";var nd=new M(tc),td=null;function Qn(){return td||(td=new ec("secp256k1")),td}var fn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&nd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Qn().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Qn().keyFromPublic(V(this.publicKey)),n=Qn().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&nd.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return jn({recoveryParam:r.recoveryParam,r:me("0x"+r.r.toString(16),32),s:me("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=Qn().keyFromPrivate(V(this.privateKey)),n=Qn().keyFromPublic(V(ns(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Ro(i,e){let t=jn(e),n={r:V(t.r),s:V(t.s)};return"0x"+Qn().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function ns(i,e){let t=V(i);if(t.length===32){let n=new fn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return nd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var nc="transactions/5.7.0";var Ut=new M(nc),Po;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Po||(Po={}));function rd(i){return i==="0x"?null:fe(i)}function Lt(i){return i==="0x"?Yr:F.from(i)}var Bb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Fb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(i){let e=ns(i);return fe(Ee(ce(Ee(e,1)),12))}function fr(i,e){return mn(Ro(V(i),e))}function an(i,e){let t=Zt(F.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function id(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),id(t[0],t[1])):id(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return id(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function ic(i){return sn(i).map(e=>[e.address,e.storageKeys])}function rc(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",ic(i.accessList||[])];if(e){let n=jn(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",oi(t)])}function ac(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",ic(i.accessList||[])];if(e){let n=jn(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",oi(t)])}function Lb(i,e){Jr(i,Fb);let t=[];Bb.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ri(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return oi(t);let r=jn(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(Zt(V(r.r))),t.push(Zt(V(r.s))),oi(t)}function is(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),Lb(i,e);switch(i.type){case 1:return ac(i,e);case 2:return rc(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function sc(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=me(e[1],32),i.s=me(e[2],32);try{let n=ce(t(i));i.from=fr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function Ub(i){let e=$a(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:rd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=ce(i),sc(r,e.slice(9),rc)),r}function jb(i){let e=$a(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:rd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=ce(i),sc(t,e.slice(8),ac)),t}function Vb(i){let e=$a(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:rd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(oi(r));try{t.from=fr(a,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function No(i){let e=V(i);if(e[0]>127)return Vb(e);switch(e[0]){case 1:return jb(e);case 2:return Ub(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var oc="contracts/5.7.0";var Di=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ie=new M(oc),Hb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Do(i,e){return Di(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Ie.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function rs(i,e,t){return Di(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>rs(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield Do(i,e):t.type==="tuple"?yield rs(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>rs(i,n,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Fo(i,e,t){return Di(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ce({override:Do(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Di(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=Do(i.provider,n.from));let r=yield Ce({args:rs(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ce(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Ie.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function qb(i,e){return function(...t){return Fo(i,e,t)}}function Gb(i,e){let t=i.signer||i.provider;return function(...n){return Di(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Fo(i,e,n);return yield t.estimateGas(r)})}}function lc(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ct(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function dc(i,e,t){let n=i.signer||i.provider;return function(...r){return Di(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Fo(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function zb(i,e){return function(...t){return Di(this,void 0,void 0,function*(){i.signer||Ie.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Fo(i,e,t),r=yield i.signer.sendTransaction(n);return lc(i,r),r})}}function uc(i,e,t){return e.constant?dc(i,e,t):zb(i,e)}function pc(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var mr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ad=class extends mr{constructor(){super("error",null)}},Oo=class extends mr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ie.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(pc(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Qr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Bo=class extends mr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},fa=class{constructor(e,t,n){B(this,"interface",ft(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Ie.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Do(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,uc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,uc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,dc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,qb(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Gb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return dr(e)}static getInterface(e){return Si.isInterface(e)?e:new Si(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new li(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ui.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ad);if(e==="event")return this._normalizeRunningEvent(new mr("event",null));if(e==="*")return this._normalizeRunningEvent(new Bo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Oo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Oo(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new mr(pc(t),t))}return this._normalizeRunningEvent(new Bo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ct(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends fa{},hr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:on(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Ie.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",ft(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!Hb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Di(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield rs(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=ft(this.constructor,"getContractAddress")(a),o=ft(this.constructor,"getContract")(s,this.interface,this.signer);return lc(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return dr(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Lo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(fi(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var Jh=Object.create;var $s=Object.defineProperty;var $h=Object.getOwnPropertyDescriptor;var Qh=Object.getOwnPropertyNames;var Xh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var Zh=(a,e,t)=>e in a?$s(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),zi=(a,e)=>{for(var t in e)$s(a,t,{get:e[t],enumerable:!0})},e6=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qh(e))!Yh.call(a,i)&&i!==t&&$s(a,i,{get:()=>e[i],enumerable:!(n=$h(e,i))||n.enumerable});return a};var kn=(a,e,t)=>(t=a!=null?Jh(Xh(a)):{},e6(e||!a||!a.__esModule?$s(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(Zh(a,typeof e!="symbol"?e+"":e,t),t);var Jp=ae(()=>{});var yd=ae(($p,pd)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Jp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,le=yt>>>13,Ga=w[4]|0,Ne=Ga&8191,De=Ga>>>13,za=w[5]|0,Oe=za&8191,Be=za>>>13,Wa=w[6]|0,Fe=Wa&8191,Le=Wa>>>13,Ka=w[7]|0,Ue=Ka&8191,Ve=Ka>>>13,Ja=w[8]|0,je=Ja&8191,He=Ja>>>13,$a=w[9]|0,qe=$a&8191,Ge=$a>>>13,Qa=A[0]|0,ze=Qa&8191,We=Qa>>>13,Xa=A[1]|0,Ke=Xa&8191,Je=Xa>>>13,Ya=A[2]|0,$e=Ya&8191,Qe=Ya>>>13,Za=A[3]|0,Xe=Za&8191,Ye=Za>>>13,ei=A[4]|0,Ze=ei&8191,et=ei>>>13,ti=A[5]|0,tt=ti&8191,nt=ti>>>13,ni=A[6]|0,at=ni&8191,it=ni>>>13,ai=A[7]|0,rt=ai&8191,st=ai>>>13,ii=A[8]|0,ot=ii&8191,ut=ii>>>13,ri=A[9]|0,dt=ri&8191,lt=ri>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var Aa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Ea=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var ld=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,h[0]=wa,h[1]=_a,h[2]=ka,h[3]=Aa,h[4]=Ea,h[5]=Xu,h[6]=Yu,h[7]=Zu,h[8]=ed,h[9]=td,h[10]=nd,h[11]=ad,h[12]=id,h[13]=rd,h[14]=sd,h[15]=od,h[16]=ud,h[17]=dd,h[18]=ld,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function M(I,u){this.x=I,this.y=u}M.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},M.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof pd>"u"||pd,$p)});var Ty=ae((tT,to)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof to=="object"&&to.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var M=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,yt=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var yt=new Uint32Array(Q);ee>8&255,X[Q+2]=yt>>16&255,X[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],X[Q]=yt&255,V>1&&(X[Q+1]=yt>>8&255),V>2&&(X[Q+2]=yt>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,yt,Z,le,Ga,Ne,De,za,Oe,Be,Wa,Fe,Le,Ka,Ue,Ve,Ja,je,He,$a,qe,Ge,Qa,ze,We,Xa,Ke,Je,Ya,$e,Qe,Za,Xe,Ye,ei,Ze,et,ti,tt,nt,ni,at,it,ai,rt,st,ii,ot,ut,ri,dt,lt,wa,_a,ka,Aa,Ea;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],Ga=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|Ga>>>31),D=Q^(Ga<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=Ga^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,za=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ni=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,Qa=c[21]<<3|c[20]>>>29,_a=c[31]<<9|c[30]>>>23,ka=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Ya=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,Wa=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,Aa=c[42]<<2|c[43]>>>30,Ea=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ai=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,Xa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ri=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Za=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,Ka=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ii=c[46]<<24|c[47]>>>8,ti=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,$a=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,wa=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,ei=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ja=c[49]<<14|c[48]>>>18,c[0]=za^~Be&Fe,c[1]=Oe^~Wa&Le,c[10]=je^~$a&Ge,c[11]=He^~qe&Qa,c[20]=Je^~$e&Za,c[21]=Ya^~Qe&Xe,c[30]=ti^~nt&at,c[31]=tt^~ni&it,c[40]=ot^~ri<,c[41]=ut^~dt&wa,c[2]=Be^~Fe&Ka,c[3]=Wa^~Le&Ue,c[12]=$a^~Ge&ze,c[13]=qe^~Qa&We,c[22]=$e^~Za&Ye,c[23]=Qe^~Xe&ei,c[32]=nt^~at&ai,c[33]=ni^~it&rt,c[42]=ri^~lt&_a,c[43]=dt^~wa&ka,c[4]=Fe^~Ka&Ve,c[5]=Le^~Ue&Ja,c[14]=Ge^~ze&Xa,c[15]=Qa^~We&Ke,c[24]=Za^~Ye&Ze,c[25]=Xe^~ei&et,c[34]=at^~ai&st,c[35]=it^~rt&ii,c[44]=lt^~_a&Aa,c[45]=wa^~ka&Ea,c[6]=Ka^~Ve&za,c[7]=Ue^~Ja&Oe,c[16]=ze^~Xa&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=ei^~et&Ya,c[36]=ai^~st&ti,c[37]=rt^~ii&tt,c[46]=_a^~Aa&ot,c[47]=ka^~Ea&ut,c[8]=Ve^~za&Be,c[9]=Ja^~Oe&Wa,c[18]=Xa^~je&$a,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Ya&Qe,c[38]=st^~ti&nt,c[39]=ii^~tt&ni,c[48]=Aa^~ot&ri,c[49]=Ea^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)to.exports=u;else{for(b=0;b{m0.exports=c0;function c0(a,e){if(!a)throw new Error(e||"Assertion failed")}c0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var h0=ae((K3,Ud)=>{typeof Object.create=="function"?Ud.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ud.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var En=ae(Pe=>{"use strict";var r2=sr(),s2=h0();Pe.inherits=s2;function o2(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function u2(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):o2(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=x0;function l2(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=p2;function y2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=y2;function f2(a,e){return a>>>e|a<<32-e}Pe.rotr32=f2;function c2(a,e){return a<>>32-e}Pe.rotl32=c2;function m2(a,e){return a+e>>>0}Pe.sum32=m2;function h2(a,e,t){return a+e+t>>>0}Pe.sum32_3=h2;function x2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=x2;function b2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=b2;function g2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=g2;function T2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=T2;function v2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=v2;function w2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=w2;function _2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=_2;function k2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=k2;function A2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=A2;function E2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=E2;function M2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=M2;function I2(a,e,t){return a>>>t}Pe.shr64_hi=I2;function C2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=C2});var or=ae(v0=>{"use strict";var T0=En(),S2=sr();function _o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}v0.BlockHash=_o;_o.prototype.update=function(e,t){if(e=T0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=T0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var R2=En(),qn=R2.rotr32;function P2(a,e,t,n){if(a===0)return w0(e,t,n);if(a===1||a===3)return k0(e,t,n);if(a===2)return _0(e,t,n)}la.ft_1=P2;function w0(a,e,t){return a&e^~a&t}la.ch32=w0;function _0(a,e,t){return a&e^a&t^e&t}la.maj32=_0;function k0(a,e,t){return a^e^t}la.p32=k0;function N2(a){return qn(a,2)^qn(a,13)^qn(a,22)}la.s0_256=N2;function D2(a){return qn(a,6)^qn(a,11)^qn(a,25)}la.s1_256=D2;function O2(a){return qn(a,7)^qn(a,18)^a>>>3}la.g0_256=O2;function B2(a){return qn(a,17)^qn(a,19)^a>>>10}la.g1_256=B2});var M0=ae((X3,E0)=>{"use strict";var ur=En(),F2=or(),L2=Vd(),jd=ur.rotl32,es=ur.sum32,U2=ur.sum32_5,V2=L2.ft_1,A0=F2.BlockHash,j2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;A0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ur.inherits(Gn,A0);E0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var dr=En(),H2=or(),lr=Vd(),q2=sr(),Mn=dr.sum32,G2=dr.sum32_4,z2=dr.sum32_5,W2=lr.ch32,K2=lr.maj32,J2=lr.s0_256,$2=lr.s1_256,Q2=lr.g0_256,X2=lr.g1_256,I0=H2.BlockHash,Y2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function zn(){if(!(this instanceof zn))return new zn;I0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Y2,this.W=new Array(64)}dr.inherits(zn,I0);C0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var qd=En(),S0=Hd();function pa(){if(!(this instanceof pa))return new pa;S0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}qd.inherits(pa,S0);R0.exports=pa;pa.blockSize=512;pa.outSize=224;pa.hmacStrength=192;pa.padLength=64;pa.prototype._digest=function(e){return e==="hex"?qd.toHex32(this.h.slice(0,7),"big"):qd.split32(this.h.slice(0,7),"big")}});var Wd=ae((e8,B0)=>{"use strict";var Qt=En(),Z2=or(),e5=sr(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,N0=Qt.shr64_hi,D0=Qt.shr64_lo,Ra=Qt.sum64,Gd=Qt.sum64_hi,zd=Qt.sum64_lo,t5=Qt.sum64_4_hi,n5=Qt.sum64_4_lo,a5=Qt.sum64_5_hi,i5=Qt.sum64_5_lo,O0=Z2.BlockHash,r5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function In(){if(!(this instanceof In))return new In;O0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=r5,this.W=new Array(160)}Qt.inherits(In,O0);B0.exports=In;In.blockSize=1024;In.outSize=512;In.hmacStrength=192;In.padLength=128;In.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Kd=En(),F0=Wd();function ya(){if(!(this instanceof ya))return new ya;F0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Kd.inherits(ya,F0);L0.exports=ya;ya.blockSize=1024;ya.outSize=384;ya.hmacStrength=192;ya.padLength=128;ya.prototype._digest=function(e){return e==="hex"?Kd.toHex32(this.h.slice(0,12),"big"):Kd.split32(this.h.slice(0,12),"big")}});var V0=ae(pr=>{"use strict";pr.sha1=M0();pr.sha224=P0();pr.sha256=Hd();pr.sha384=U0();pr.sha512=Wd()});var W0=ae(z0=>{"use strict";var yi=En(),b5=or(),ko=yi.rotl32,j0=yi.sum32,ts=yi.sum32_3,H0=yi.sum32_4,G0=b5.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;G0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yi.inherits(Jn,G0);z0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=j0(ko(H0(n,q0(_,i,r,s),e[v5[_]+t],g5(_)),_5[_]),o);n=o,o=s,s=ko(r,10),r=i,i=v,v=j0(ko(H0(l,q0(79-_,p,f,x),e[w5[_]+t],T5(_)),k5[_]),C),l=C,C=x,x=ko(f,10),f=p,p=v}v=ts(this.h[1],r,x),this.h[1]=ts(this.h[2],s,C),this.h[2]=ts(this.h[3],o,l),this.h[3]=ts(this.h[4],n,p),this.h[4]=ts(this.h[0],i,f),this.h[0]=v};Jn.prototype._digest=function(e){return e==="hex"?yi.toHex32(this.h,"little"):yi.split32(this.h,"little")};function q0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function g5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function T5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var v5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],_5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],k5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var J0=ae((i8,K0)=>{"use strict";var A5=En(),E5=sr();function yr(a,e,t){if(!(this instanceof yr))return new yr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(A5.toArray(e,t))}K0.exports=yr;yr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),E5(e.length<=this.blockSize);for(var t=e.length;t{var Rt=$0;Rt.utils=En();Rt.common=or();Rt.sha=V0();Rt.ripemd=W0();Rt.hmac=J0();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var fl=ae((yl,kf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],M=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,M=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=M,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,M=M+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,M=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),M=M.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),M=M.concat(t(U.concat(t(O))).slice(0,S))),M}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let M=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),M.push(J[G]>>8&255),M.push(J[G]>>16&255),M.push(J[G]>>24&255);let m=n(_,M,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(M,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),M(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof bl<"u"?Ef.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(bl)});var Xf=ae((K4,Qf)=>{"use strict";var Jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",_l={};for(ps=0;ps>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Jf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=vr(e)^n>>5}for(e=vr(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=Jf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=vr(n)^s,i+=Jo.charAt(s)}for(r=0;r<6;++r)n=vr(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Jo.charAt(o)}return i}function $f(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=Jf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function lx(){var a=$f.apply(null,arguments);if(typeof a=="object")return a}function px(a){var e=$f.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $o(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof Xl=="object"&&typeof Yl<"u"?Yl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(Xl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Zl=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$dictionary=void 0;fu.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Os=ae((sE,hm)=>{hm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var tp=ae(Ua=>{var Ee=Os(),ep=()=>[{type:Ee.RANGE,from:48,to:57}],xm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ep()),bm=()=>[{type:Ee.CHAR,value:9},{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:11},{type:Ee.CHAR,value:12},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:32},{type:Ee.CHAR,value:160},{type:Ee.CHAR,value:5760},{type:Ee.RANGE,from:8192,to:8202},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233},{type:Ee.CHAR,value:8239},{type:Ee.CHAR,value:8287},{type:Ee.CHAR,value:12288},{type:Ee.CHAR,value:65279}],eb=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Ua.words=()=>({type:Ee.SET,set:xm(),not:!1});Ua.notWords=()=>({type:Ee.SET,set:xm(),not:!0});Ua.ints=()=>({type:Ee.SET,set:ep(),not:!1});Ua.notInts=()=>({type:Ee.SET,set:ep(),not:!0});Ua.whitespace=()=>({type:Ee.SET,set:bm(),not:!1});Ua.notWhitespace=()=>({type:Ee.SET,set:bm(),not:!0});Ua.anyChar=()=>({type:Ee.SET,set:eb(),not:!0})});var Tm=ae(Bs=>{var gm=Os(),Pr=tp(),tb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",nb={0:0,t:9,n:10,v:11,f:12,r:13};Bs.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?tb.indexOf(l):nb[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Bs.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Pr.words());else if(i[2])t.push(Pr.ints());else if(i[3])t.push(Pr.whitespace());else if(i[4])t.push(Pr.notWords());else if(i[5])t.push(Pr.notInts());else if(i[6])t.push(Pr.notWhitespace());else if(i[7])t.push({type:gm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:gm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Bs.error(e,"Unterminated character class")};Bs.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var vm=ae(Fs=>{var cu=Os();Fs.wordBoundary=()=>({type:cu.POSITION,value:"b"});Fs.nonWordBoundary=()=>({type:cu.POSITION,value:"B"});Fs.begin=()=>({type:cu.POSITION,value:"^"});Fs.end=()=>({type:cu.POSITION,value:"$"})});var wm=ae((lE,np)=>{var Nr=Tm(),xn=Os(),ki=tp(),mu=vm();np.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Nr.error(a,`Nothing to repeat at column ${O-1}`)},p=Nr.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};_m.exports=Va});var Em=ae((yE,Am)=>{var hu=wm(),Ls=km(),Ai=hu.types;Am.exports=class Us{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=hu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Us.prototype.max!=null?Us.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case Ai.ROOT:case Ai.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var ab=Ei&&Ei.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.RandomGenerator=void 0;var ib=ab(Em()),rb;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new ib.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(rb=Ei.RandomGenerator||(Ei.RandomGenerator={}))});var Vs=ae(Dr=>{"use strict";var sb=Dr&&Dr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeGuardError=void 0;var ob=function(a){sb(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Dr.TypeGuardError=ob});var Im=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$any=void 0;var ub=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};xu.$any=ub});var Cm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$every=void 0;var db=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$guard=void 0;var lb=Vs(),pb=function(a){return function(e,t){if(e===!0)throw new lb.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};gu.$guard=pb});var Rm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_between=void 0;var yb=function(a,e,t){return e<=a&&a<=t};Tu.$is_between=yb});var Pm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_custom=void 0;var fb=Zl(),cb=function(a,e,t,n){var i,r=(i=fb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};vu.$is_custom=cb});var Nm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_date=void 0;var mb=function(a){return hb.test(a)};wu.$is_date=mb;var hb=/^(\d{4})-(\d{2})-(\d{2})$/});var Dm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_datetime=void 0;var xb=function(a){return!isNaN(new Date(a).getTime())};_u.$is_datetime=xb});var Om=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_email=void 0;var bb=function(a){return gb.test(a)};ku.$is_email=bb;var gb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Bm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_ipv4=void 0;var Tb=function(a){return vb.test(a)};Au.$is_ipv4=Tb;var vb=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Fm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv6=void 0;var wb=function(a){return _b.test(a)};Eu.$is_ipv6=wb;var _b=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Lm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_url=void 0;var kb=function(a){return Ab.test(a)};Mu.$is_url=kb;var Ab=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Um=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var Eb=function(a){return Mb.test(a)};Iu.$is_uuid=Eb;var Mb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Vm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$join=void 0;var Ib=function(a){return Cb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Cu.$join=Ib;var Cb=function(a){return Sb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},Sb=function(a){return Rb.has(a)},Rb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var jm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$number=void 0;var Pb=Vs(),Nb=function(a){if(isFinite(a)===!1)throw new Pb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};Su.$number=Nb});var Hm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$report=void 0;var Db=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Ru.$report=Db});var qm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$rest=void 0;var Ob=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Pu.$rest=Ob});var Gm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$string=void 0;var Bb=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Nu.$string=Bb});var zm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$tail=void 0;var Fb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Du.$tail=Fb});var $m=ae(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Qb.$number,string:Zb.$string,tail:e1.$tail,rest:Yb.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Lb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Wm.RandomGenerator,pick:Wm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Km.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(t1=Mi.Namespace||(Mi.Namespace={}))});var Qm=ae(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.MapUtil=void 0;var n1;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(n1=js.MapUtil||(js.MapUtil={}))});var Ym=ae(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var nh=ae(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0})});var ih=ae(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0})});var sh=ae(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0})});var uh=ae(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0})});var mp=ae(z=>{"use strict";var a1=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Ii=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&a1(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Or=Zl(),Me=$m(),i1=Qm();Ii(Ym(),z);Ii(eh(),z);Ii(nh(),z);Ii(ih(),z);Ii(sh(),z);Ii(uh(),z);Ii(Vs(),z);function ap(){re("assert")}z.assert=ap;Object.assign(ap,Me.Namespace.assert("assert"));function ip(){re("assertType")}z.assertType=ip;Object.assign(ip,Me.Namespace.assert("assertType"));function Ou(){re("is")}z.is=Ou;Object.assign(Ou,Me.Namespace.assert("is"));function Bu(){re("validate")}z.validate=Bu;Object.assign(Bu,Me.Namespace.validate());function rp(){re("assertEquals")}z.assertEquals=rp;Object.assign(rp,Me.Namespace.assert("assertEquals"));function sp(){re("equals")}z.equals=sp;Object.assign(sp,Me.Namespace.is());function op(){re("validateEquals")}z.validateEquals=op;Object.assign(op,Me.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Or.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Or.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=i1.MapUtil.take(Or.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function r1(){re("application")}z.application=r1;function up(){re("assertParse")}z.assertParse=up;Object.assign(up,Me.Namespace.assert("assertParse"));function dp(){re("isParse")}z.isParse=dp;Object.assign(dp,Ou);function lp(){re("validateParse")}z.validateParse=lp;Object.assign(lp,Bu);function pp(){re("stringify")}z.stringify=pp;Object.assign(pp,Me.Namespace.stringify("stringify"));function Fu(){re("assertStringify")}z.assertStringify=Fu;Object.assign(Fu,Me.Namespace.assert("assertStringify"));Object.assign(Fu,Me.Namespace.stringify("assertStringify"));function Lu(){re("isStringify")}z.isStringify=Lu;Object.assign(Lu,Me.Namespace.is());Object.assign(Lu,Me.Namespace.stringify("isStringify"));function Uu(){re("validateStringify")}z.validateStringify=Uu;Object.assign(Uu,Me.Namespace.validate());Object.assign(Uu,Me.Namespace.stringify("validateStringify"));function s1(){re("metadata")}z.metadata=s1;function yp(){re("random")}z.random=yp;Object.assign(yp,Me.Namespace.random());function o1(){re("literals")}z.literals=o1;function fp(){re("clone")}z.clone=fp;Object.assign(fp,Me.Namespace.clone("clone"));function Vu(){re("assertClone")}z.assertClone=Vu;Object.assign(Vu,Me.Namespace.assert("assertClone"));Object.assign(Vu,Me.Namespace.clone("assertClone"));function ju(){re("isClone")}z.isClone=ju;Object.assign(ju,Me.Namespace.is());Object.assign(ju,Me.Namespace.clone("isClone"));function Hu(){re("validateClone")}z.validateClone=Hu;Object.assign(Hu,Me.Namespace.validate());Object.assign(Hu,Me.Namespace.clone("validateClone"));function cp(){re("prune")}z.prune=cp;Object.assign(cp,Me.Namespace.prune("prune"));function qu(){re("assertPrune")}z.assertPrune=qu;Object.assign(qu,Me.Namespace.assert("assertPrune"));Object.assign(qu,Me.Namespace.prune("assertPrune"));function Gu(){re("isPrune")}z.isPrune=Gu;Object.assign(Gu,Me.Namespace.is());Object.assign(Gu,Me.Namespace.prune("isPrune"));function zu(){re("validatePrune")}z.validatePrune=zu;Object.assign(zu,Me.Namespace.prune("validatePrune"));Object.assign(zu,Me.Namespace.validate());function dh(){re("createAssert")}z.createAssert=dh;Object.assign(dh,ap);function lh(){re("createAssertType")}z.createAssertType=lh;Object.assign(lh,ip);function ph(){re("createIs")}z.createIs=ph;Object.assign(ph,Ou);function yh(){re("createValidate")}z.createValidate=yh;Object.assign(yh,Bu);function fh(){re("createAssertEquals")}z.createAssertEquals=fh;Object.assign(fh,rp);function ch(){re("createEquals")}z.createEquals=ch;Object.assign(ch,sp);function mh(){re("createValidateEquals")}z.createValidateEquals=mh;Object.assign(mh,op);function hh(){re("createIsParse")}z.createIsParse=hh;Object.assign(hh,dp);function xh(){re("createAssertParse")}z.createAssertParse=xh;Object.assign(xh,up);function bh(){re("createValidateParse")}z.createValidateParse=bh;Object.assign(bh,lp);function gh(){re("createStringify")}z.createStringify=gh;Object.assign(gh,pp);function Th(){re("createAssertStringify")}z.createAssertStringify=Th;Object.assign(Th,Fu);function vh(){re("createIsStringify")}z.createIsStringify=vh;Object.assign(vh,Lu);function wh(){re("createValidateStringify")}z.createValidateStringify=wh;Object.assign(wh,Uu);function _h(){re("createRandom")}z.createRandom=_h;Object.assign(_h,yp);function kh(){re("createClone")}z.createClone=kh;Object.assign(kh,fp);function Ah(){re("createAssertClone")}z.createAssertClone=Ah;Object.assign(Ah,Vu);function Eh(){re("createIsClone")}z.createIsClone=Eh;Object.assign(Eh,ju);function Mh(){re("createValidateClone")}z.createValidateClone=Mh;Object.assign(Mh,Hu);function Ih(){re("createPrune")}z.createPrune=Ih;Object.assign(Ih,cp);function Ch(){re("createAssertPrune")}z.createAssertPrune=Ch;Object.assign(Ch,qu);function Sh(){re("createIsPrune")}z.createIsPrune=Sh;Object.assign(Sh,Gu);function Rh(){re("createValidatePrune")}z.createValidatePrune=Rh;Object.assign(Rh,zu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Nh=ae(gn=>{"use strict";var Ph=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),u1=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),d1=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&Ph(e,a,t);return u1(e,a),e},l1=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ph(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var p1=d1(mp());gn.default=p1;l1(mp(),gn)});var Ll={};zi(Ll,{BaseContract:()=>cr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hi,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>da,Wallet:()=>Sn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>su,logger:()=>Pc,providers:()=>ta,utils:()=>te,version:()=>uu,wordlists:()=>bi});var oy=kn(yd());var Qp="logger/5.7.0";var Xp=!1,Yp=!1,Qs={debug:1,default:2,info:2,warning:3,error:4,off:5},Zp=Qs.default,fd=null;function t6(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var ey=t6(),cd;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(cd||(cd={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var ty="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Qs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Zp>Qs[n])&&console.log.apply(console,t)}debug(...e){this._log(E.levels.DEBUG,e)}info(...e){this._log(E.levels.INFO,e)}warn(...e){this._log(E.levels.WARNING,e)}makeError(e,t,n){if(Yp)return this.makeError("censored error",t,{});t||(t=E.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=ty[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,E.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),ey&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ey})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,E.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",E.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return fd||(fd=new E(Qp)),fd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Xp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Yp=!!e,Xp=!!t}static setLogLevel(e){let t=Qs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Zp=t}static from(e){return new E(e)}};E.errors=Wt;E.levels=cd;var ny="bytes/5.7.0";var wt=new E(ny);function iy(a){return!!a.toHexString}function Wi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return Wi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function ia(a){return ie(a)&&!(a.length%2)||on(a)}function ay(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!ay(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),Wi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),iy(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),Wi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),Wi(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var md="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=md[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),iy(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+md[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Nt(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Un(a){let e=hd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function hd(a){typeof a!="string"&&(a=W(a)),ie(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Vn(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ia(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=si(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function jr(a){return a=Vn(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Xs="bignumber/5.7.0";var Hr=oy.default.BN,ra=new E(Xs),xd={},ry=9007199254740991;function uy(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||on(a))}var sy=!1,F=class{constructor(e,t){e!==xd&&ra.throwError("cannot call constructor directly; use BigNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ra.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?sy||(sy=!0,ra.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ra.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",E.errors.UNEXPECTED_ARGUMENT,{}):ra.throwError("BigNumber.toString does not accept parameters",E.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(xd,qr(e)):e.match(/^-?[0-9]+$/)?new F(xd,qr(new Hr(e))):ra.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=ry||e<=-ry)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return ra.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function qr(a){if(typeof a!="string")return qr(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&ra.throwArgumentError("invalid hex","value",a),a=qr(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(qr(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Hr("-"+e.substring(3),16):new Hr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),ra.throwError(a,E.errors.NUMERIC_FAULT,n)}function bd(a){return new Hr(a,36).toString(16)}function gd(a){return new Hr(a,16).toString(36)}var jt=new E(Xs),Gr={},ly=F.from(0),py=F.from(-1);function yy(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,E.errors.NUMERIC_FAULT,i)}var zr="0";for(;zr.length<256;)zr+=zr;function Td(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+zr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Ki(a,e){e==null&&(e=0);let t=Td(e);a=F.from(a);let n=a.lt(ly);n&&(a=a.mul(py));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&yy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new sa(Gr,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Gr&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(dy.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(dy.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+zr.substring(0,e),this.format),i=n6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!uy(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString(Ki(e,t),sa.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=sa.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(ly)&&yy("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=Ki(i,n.decimals);return new ft(Gr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=sa.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Ki(i,n.decimals);return new ft(Gr,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(on(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==E.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},dy=ft.from(1),n6=ft.from("0.5");var fy="properties/5.7.0";var a6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ys=new E(fy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function mt(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return a6(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Ji(a,e){(!a||typeof a!="object")&&Ys.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Ys.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var i6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cy(a){if(a==null||i6[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tct(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,ct(n))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function ct(a){return r6(a)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var jn="abi/5.7.0";var Te=new E(jn),oi={},my={calldata:!0,memory:!0,storage:!0},s6={calldata:!0,memory:!0};function Zs(a,e){if(a==="bytes"||a==="string"){if(my[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&s6[e])return!0;return(my[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function o6(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(oi,{name:e.name||null,type:$i(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(o6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Wr(a,e){return l6(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==oi&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),eo(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Kr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(oi,t)}static fromString(e){let t=e.match(Jr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Wr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function xy(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function by(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function gy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Dt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",E.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=gy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(oi,n)}static fromString(e){let t={type:"constructor"};e=xy(e,t);let n=e.match(Jr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Wr(n[2].trim(),!1),by(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=gy(e),n={type:e.type,name:Kr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(oi,n)}static fromString(e){let t={type:"function"};e=xy(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(Jr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Kr(t.name),t.inputs=Wr(i[2],!1),by(i[3].trim(),t),n.length>1){let r=n[1].match(Jr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Wr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function hy(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Kr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return hy(new tn(oi,t))}static fromString(e){let t={type:"error"},n=e.match(Jr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Kr(t.name),t.inputs=Wr(n[2],!1),hy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function $i(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var d6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Kr(a){return(!a||!a.match(d6))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Jr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function l6(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&vd.throwError("value out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},di=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):di.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:vd.throwError("data out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new di(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var vy=kn(Ty());function fe(a){return"0x"+vy.default.keccak_256(j(a))}var no={};zi(no,{decode:()=>$r,encode:()=>oa});var wy="rlp/5.7.0";var Hn=new E(wy);function _y(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function ky(a,e,t){let n=0;for(let i=0;ie+1+n&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function My(a,e){if(a.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let n=ky(a,e+1,t);return e+1+t+n>a.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ay(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ay(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let n=ky(a,e+1,t);e+1+t+n>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function $r(a){let e=j(a),t=My(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",a),t.result}var Iy="address/5.7.0";var Ma=new E(Iy);function Cy(a){ie(a,20)||Ma.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var p6=9007199254740991;function y6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var wd={};for(let a=0;a<10;a++)wd[String(a)]=String(a);for(let a=0;a<26;a++)wd[String.fromCharCode(65+a)]=String(10+a);var Sy=Math.floor(y6(p6));function Ry(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>wd[n]).join("");for(;e.length>=Sy;){let n=e.substring(0,Sy);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Ma.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=Cy(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ma.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==Ry(a)&&Ma.throwArgumentError("bad icap checksum","address",a),e=bd(a.substring(4));e.length<40;)e="0"+e;e=Cy("0x"+e)}else Ma.throwArgumentError("invalid address","address",a);return e}function Py(a){try{return ce(a),!0}catch{}return!1}function Ny(a){let e=gd(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Ry("XE00"+e)+e}function li(a){let e=null;try{e=ce(a.from)}catch{Ma.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(oa([e,t])),12))}function Dy(a,e,t){return Nt(e)!==32&&Ma.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ma.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var ao=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var io=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Xi=new E(jn);function _d(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Xi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Xi.throwError("cannot encode object for signature with duplicate names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Xi.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Xi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ui(a.wordSize),r=new ui(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function kd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===E.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===E.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var ro=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Xi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;ipo,EtherSymbol:()=>Uy,HashZero:()=>Zi,MaxInt256:()=>Ly,MaxUint256:()=>co,MinInt256:()=>Fy,NegativeOne:()=>yo,One:()=>fo,Two:()=>Oy,WeiPerEther:()=>By,Zero:()=>Yi});var po="0x0000000000000000000000000000000000000000";var yo=F.from(-1),Yi=F.from(0),fo=F.from(1),Oy=F.from(2),By=F.from("1000000000000000000"),co=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Fy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ly=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Zi="0x0000000000000000000000000000000000000000000000000000000000000000";var Uy="\u039E";var mo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=co.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(fo).mul(yo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Yi)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Vy="strings/5.7.0";var jy=new E(Vy),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Bt||(Bt={}));function f6(a,e,t,n,i){return jy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function Hy(a,e,t,n,i){if(a===Bt.BAD_PREFIX||a===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Bt.OVERRUN?t.length-e-1:0}function c6(a,e,t,n,i){return a===Bt.OVERLONG?(n.push(i),0):(n.push(65533),Hy(a,e,t,n,i))}var ho=Object.freeze({error:f6,ignore:Hy,replace:c6});function Ed(a,e){e==null&&(e=ho.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Bt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Bt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Bt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(jy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function Ad(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function Md(a,e){return'"'+Ed(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Ad(t):(t-=65536,Ad((t>>10&1023)+55296)+Ad((t&1023)+56320))}).join("")+'"'}function xo(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return xo(Ed(a,e))}function Ia(a,e=Gt.current){return Ed(ve(a,e))}function Id(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Zi]).slice(0,32))}function Cd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function m6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function qy(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Rd(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var h6=qy("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),x6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),b6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],g6=Sd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),T6=Sd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),v6=Sd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",m6),w6=qy("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function _6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function k6(a){return!!Rd(a,h6)}function A6(a){let e=Rd(a,b6);if(e)return[a+e.s];let t=g6[a];if(t)return t;let n=T6[a];if(n)return[a+n[0]];let i=v6[a];return i||null}function E6(a){return!!Rd(a,w6)}function Pd(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ia(a);e=_6(e.map(n=>{if(x6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=A6(n);return i||[n]})),e=Ia(xo(e),Gt.NFKC),e.forEach(n=>{if(E6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(k6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=xo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var bo=class extends Qr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var pi=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return _d(e,this.coders,t)}decode(e){return e.coerce(this.name,kd(e,this.coders))}};var go=new E(jn),M6=new RegExp(/^bytes([0-9]*)$/),I6=new RegExp(/^(u?int)([0-9]*)$/),er=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ao(e.name);case"bool":return new so(e.name);case"string":return new bo(e.name);case"bytes":return new oo(e.name);case"array":return new ro(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new pi((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new lo(e.name)}let t=e.type.match(I6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&go.throwArgumentError("invalid "+t[1]+" bit length","param",e),new mo(n/8,t[1]==="int",e.name)}if(t=e.type.match(M6),t){let n=parseInt(t[1]);return(n===0||n>32)&&go.throwArgumentError("invalid bytes length","param",e),new uo(n,e.name)}return go.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new di(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ui(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new pi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&go.throwError("types/values length mismatch",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new pi(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new pi(i,"_").decode(this._getReader(j(t),n))}},Xr=new er;function nn(a){return fe(ve(a))}var To="hash/5.7.0";var Nd={};zi(Nd,{decode:()=>tr,encode:()=>nr});function tr(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function C6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let M=n-4;return O.map(J=>{switch(J-M){case 3:return M+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return M+256+(a[o++]<<8|a[o++]);case 1:return M+a[o++];default:return J-1}})}function R6(a){let e=0;return()=>a[e++]}function Wy(a){return R6(S6(a))}function P6(a){return a&1?~a>>1:a>>1}function N6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function Ky(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(B6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(F6(t,a))}return C6(zy(e))}function O6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Jy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function B6(a,e){let t=1+e(),n=e(),i=O6(e),r=Jy(i.length,1+a,e);return zy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function F6(a,e){let t=1+e();return Jy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function $y(a){let e=Yr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Yr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Qy(){return Wy(tr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var vo=Qy(),L6=new Set(Yr(vo)),U6=new Set(Yr(vo)),V6=Ky(vo),j6=$y(vo),Xy=45,Yy=95;function Zy(a){return Ia(a)}function H6(a){return a.filter(e=>e!=65039)}function e0(a){for(let e of a.split(".")){let t=Zy(e);try{for(let n=t.lastIndexOf(Yy)-1;n>=0;n--)if(t[n]!==Yy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Xy&&t[3]===Xy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function t0(a){return e0(q6(a,H6))}function q6(a,e){let t=Zy(a).reverse(),n=[];for(;t.length;){let i=z6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(L6.has(r)){n.push(r);continue}if(U6.has(r))continue;let s=V6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return e0(G6(String.fromCodePoint(...n)))}function G6(a){return a.normalize("NFC")}function z6(a,e){var t;let n=j6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var W6=new E(To),a0=new Uint8Array(32);a0.fill(0);function n0(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Dd(a){let e=ve(t0(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(n0(e.slice(n))),t}function Od(a){try{return Dd(a).length!==0}catch{}return!1}function Ca(a){typeof a!="string"&&W6.throwArgumentError("invalid ENS name; not a string","name",a);let e=a0,t=Dd(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Zr(a){return W(ye(Dd(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var i0=`Ethereum Signed Message: +`;function ar(a){return typeof a=="string"&&(a=ve(a)),fe(ye([ve(i0),ve(String(a.length)),a]))}var K6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new E(To),u0=new Uint8Array(32);u0.fill(0);var J6=F.from(-1),d0=F.from(0),l0=F.from(1),$6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Q6(a){let e=j(a),t=e.length%32;return t?kt([e,u0.slice(t)]):W(e)}var X6=me(l0.toHexString(),32),Y6=me(d0.toHexString(),32),r0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Bd=["name","version","chainId","verifyingContract","salt"];function s0(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var Z6={name:s0("name"),version:s0("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Fd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=$6.mask(t?n-1:n),r=t?i.add(l0).mul(J6):d0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),Q6(n)}}}switch(a){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?X6:Y6};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function o0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Fd(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=o0(o,e[o])+l.map(p=>o0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Fd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Fd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=r0[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Bd.indexOf(n.name)-Bd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return fe(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return K6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Bd.forEach(l=>{let p=e[l];p!=null&&(i[l]=Z6[l](p),r.push({name:l,type:r0[l]}))});let s=bt.from(t),o=_e(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new E(jn);var ir=class extends en{},rr=class extends en{},Ld=class extends en{},ua=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},e2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function p0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Sa=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Xr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=e2[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return gt.throwError("call revert exception"+r,E.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),E.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new ua({_isIndexed:!0,hash:null});else if(s[_])p[_]=new ua({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw p0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw p0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new rr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ir({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Ld({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var y0="abstract-provider/5.7.0";var t2=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},n2=new E(y0),wo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){n2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return t2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var f0="abstract-signer/5.7.0";var An=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ln=new E(f0),a2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],i2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){ln.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)a2.indexOf(n)===-1&&ln.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>An(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&ln.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",E.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(i2.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},da=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,E.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new da(this.address,e)}};var pe=kn(yd()),$n=kn(Jd());function fr(a,e,t){return t={path:e,exports:{},require:function(n,i){return M5(n,i??t.path)}},a(t,t.exports),t.exports}function M5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Yd=X0;function X0(a,e){if(!a)throw new Error(e||"Assertion failed")}X0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=fr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),Mo=an.getNAF,I5=an.getJSF,Io=an.assert;function Na(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var fi=Na;Na.prototype.point=function(){throw new Error("Not implemented")};Na.prototype.validate=function(){throw new Error("Not implemented")};Na.prototype._fixedNafMul=function(e,t){Io(e.precomputed);var n=e._getDoubles(),i=Mo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];Io(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Na.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Mo(n[v],s[v],this._bitLength),l[S]=Mo(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=I5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Mt.prototype.isInfinity=function(){return this.inf};Mt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Mt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Mt.prototype.getX=function(){return this.x.fromRed()};Mt.prototype.getY=function(){return this.y.fromRed()};Mt.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Mt.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Mt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Mt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Mt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(a,e,t,n){fi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Zd(Pt,fi.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ao=fr(function(a,e){"use strict";var t=e;t.base=fi,t.short=S5,t.mont=null,t.edwards=null}),Eo=fr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new Ao.short(o):o.type==="edwards"?this.curve=new Ao.edwards(o):this.curve=new Ao.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:$n.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:$n.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:$n.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:$n.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:$n.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:$n.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Pa(a){if(!(this instanceof Pa))return new Pa(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(a.entropy,a.entropyEnc||"hex"),t=Cn.toArray(a.nonce,a.nonceEnc||"hex"),n=Cn.toArray(a.pers,a.persEnc||"hex");Yd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Y0=Pa;Pa.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Pa.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Cn.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var R5=an.assert;function Co(a,e){if(a instanceof Co)return a;this._importDER(a,e)||(R5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var So=Co;function P5(){this.place=0}function $d(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function Q0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}Co.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Q0(t),n=Q0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Qd(i,t.length),i=i.concat(t),i.push(2),Qd(i,n.length);var r=i.concat(n),s=[48];return Qd(s,r.length),s=s.concat(r),an.encode(s,e)};var N5=function(){throw new Error("unsupported")},Z0=an.assert;function pn(a){if(!(this instanceof pn))return new pn(a);typeof a=="string"&&(Z0(Object.prototype.hasOwnProperty.call(Eo,a),"Unknown curve "+a),a=Eo[a]),a instanceof Eo.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var D5=pn;pn.prototype.keyPair=function(e){return new el(this,e)};pn.prototype.keyFromPrivate=function(e,t){return el.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return el.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Y0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||N5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new Y0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new So({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new So(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(a,e,t,n){Z0((3&t)===t,"The recovery param is more than two bits"),e=new So(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};pn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new So(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var O5=fr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=Ao,t.curves=Eo,t.ec=D5,t.eddsa=null}),ef=O5.ec;var tf="signing-key/5.7.0";var nl=new E(tf),tl=null;function Qn(){return tl||(tl=new ef("secp256k1")),tl}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&nl.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Qn().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Qn().keyFromPublic(j(this.publicKey)),n=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&nl.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Vn({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Qn().keyFromPrivate(j(this.privateKey)),n=Qn().keyFromPublic(j(ns(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Ro(a,e){let t=Vn(e),n={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function ns(a,e){let t=j(a);if(t.length===32){let n=new cn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return nl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var nf="transactions/5.7.0";var Ut=new E(nf),Po;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Po||(Po={}));function il(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?Yi:F.from(a)}var B5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],F5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(a){let e=ns(a);return ce(Ie(fe(Ie(e,1)),12))}function ci(a,e){return mn(Ro(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function al(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),al(t[0],t[1])):al(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return al(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function af(a){return sn(a).map(e=>[e.address,e.storageKeys])}function rf(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",af(a.accessList||[])];if(e){let n=Vn(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",oa(t)])}function sf(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",af(a.accessList||[])];if(e){let n=Vn(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",oa(t)])}function L5(a,e){Ji(a,F5);let t=[];B5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!ia(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return oa(t);let i=Vn(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),oa(t)}function as(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),L5(a,e);switch(a.type){case 1:return sf(a,e);case 2:return rf(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function of(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=fe(t(a));a.from=ci(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function U5(a){let e=$r(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:il(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),of(i,e.slice(9),rf)),i}function V5(a){let e=$r(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:il(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),of(t,e.slice(8),sf)),t}function j5(a){let e=$r(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:il(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(oa(i));try{t.from=ci(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function No(a){let e=j(a);if(e[0]>127)return j5(e);switch(e[0]){case 1:return V5(e);case 2:return U5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var uf="contracts/5.7.0";var Da=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new E(uf),H5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Do(a,e){return Da(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function is(a,e,t){return Da(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>is(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Do(a,e):t.type==="tuple"?yield is(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>is(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Fo(a,e,t){return Da(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:Do(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Da(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Do(a.provider,n.from));let i=yield Ce({args:is(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,E.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function q5(a,e){return function(...t){return Fo(a,e,t)}}function G5(a,e){let t=a.signer||a.provider;return function(...n){return Da(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Fo(a,e,n);return yield t.estimateGas(i)})}}function lf(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function pf(a,e,t){let n=a.signer||a.provider;return function(...i){return Da(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Fo(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===E.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function z5(a,e){return function(...t){return Da(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Fo(a,e,t),i=yield a.signer.sendTransaction(n);return lf(a,i),i})}}function df(a,e,t){return e.constant?pf(a,e,t):z5(a,e)}function yf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var mi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},rl=class extends mi{constructor(){super("error",null)}},Oo=class extends mi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(yf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Qi(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Bo=class extends mi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},cr=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Do(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",E.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,df(this,o,!0)),this.functions[s]==null&&B(this.functions,s,df(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,pf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,q5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,G5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return li(e)}static getInterface(e){return Sa.isInterface(e)?e:new Sa(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",E.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new da(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ua.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new rl);if(e==="event")return this._normalizeRunningEvent(new mi("event",null));if(e==="*")return this._normalizeRunningEvent(new Bo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Oo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Oo(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new mi(yf(t),t))}return this._normalizeRunningEvent(new Bo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=ct(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends cr{},hi=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:on(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!H5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Da(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield is(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return lf(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",E.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return li(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Lo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(ca(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return bc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(ha,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~ba));let n=new Uint8Array(37);if(e&ba){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(fi(Xn.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Uo(F.from(a).add(this.privateKey).mod($b)):d=new fn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(ha,o,d,this.fingerprint,Uo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=ba)throw new Error("invalid path index - "+a);n=n._derive(ba+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=ba)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(fi(Xn.sha512,Qb,n));return new Ct(ha,Uo(r.slice(0,32)),null,"0x00000000",Uo(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=ld(n),e=gr(xa(e,n),n),Ct._fromSeed(dd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ci.decode(e);(t.length!==82||bc(t.slice(0,78))!==e)&&os.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(ha,null,W(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(ha,W(o.slice(1)),null,r,s,a,n,null)}return os.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function dd(i,e){e||(e="");let t=Te("mnemonic"+e,Gt.NFKD);return br(Te(i,Gt.NFKD),t,2048,64,"sha512")}function xa(i,e){e=ld(e),os.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=xc(s);if((V(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,a/8))}function gr(i,e){if(e=ld(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&Xb(8-n)),n+=3);let r=i.length/4,a=V(Xt(i))[0]&xc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function gc(i,e){try{return xa(i,e),!0}catch{}return!1}function Tc(i){return(typeof i!="number"||i<0||i>=ba||i%1)&&os.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var vc="random/5.7.0";var pd=new M(vc);function Yb(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var wc=Yb(),jo=wc.crypto||wc.msCrypto;(!jo||!jo.getRandomValues)&&(pd.warn("WARNING: Missing strong random number source"),jo={getRandomValues:function(i){return pd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(i){(i<=0||i>1024||i%1||i!=i)&&pd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return jo.getRandomValues(e),V(e)}function us(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var fd=An(cd());var Vo="json-wallets/5.7.0";function hi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function ga(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new bi.default.Counter(b),J=new bi.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:Ac(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=Yn(16),N=new bi.default.Counter(R),q=new bi.default.ModeOfOperation.ctr(H,N),se=V(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+ga(C.getUTCMonth()+1,2)+"-"+ga(C.getUTCDate(),2)+"T"+ga(C.getUTCHours(),2)+"-"+ga(C.getUTCMinutes(),2)+"-"+ga(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Nc(i,e,t){if(Ho(i)){t&&t(0);let n=hd(i,e);return t&&t(1),Promise.resolve(n)}return qo(i)?Pc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Dc(i,e){if(Ho(i))return hd(i,e);if(qo(i))return Rc(i,e);throw new Error("invalid JSON wallet")}var Oc="wallet/5.7.0";var Bc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ta=new M(Oc);function i5(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function r5(i){let e=i.mnemonic;return e&&e.phrase}var Sn=class extends St{constructor(e,t){if(super(),i5(e)){let n=new fn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==fe(e.address)&&Ta.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),r5(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||mi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);mn(s.privateKey)!==this.address&&Ta.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(fn.isSigningKey(e))e.curve!=="secp256k1"&&Ta.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new fn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&Ta.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Sn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&Ta.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(is(t)));return is(t,n)})}signMessage(e){return Bc(this,void 0,void 0,function*(){return Va(this._signingKey().signDigest(ia(e)))})}_signTypedData(e,t,n){return Bc(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,a=>(this.provider==null&&Ta.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Va(this._signingKey().signDigest(bt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),vd(this,e,t,n)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=V(Ee(ce(ye([t,e.extraEntropy])),0,16)));let n=gr(t,e.locale);return Sn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Nc(e,t,n).then(r=>new Sn(r))}static fromEncryptedJsonSync(e,t){return new Sn(Dc(e,t))}static fromMnemonic(e,t,n){return t||(t=mi),new Sn(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Fc(i,e){return fr(ia(i),e)}function Lc(i,e,t,n){return fr(bt.hash(i,e,t),n)}var ti={};zr(ti,{AlchemyProvider:()=>Ma,AlchemyWebSocketProvider:()=>Ts,AnkrProvider:()=>vs,BaseProvider:()=>ei,CloudflareProvider:()=>ws,EtherscanProvider:()=>_s,FallbackProvider:()=>ks,Formatter:()=>Y,InfuraProvider:()=>Ca,InfuraWebSocketProvider:()=>Es,IpcProvider:()=>Dd,JsonRpcBatchProvider:()=>au,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Aa,NodesmithProvider:()=>Cs,PocketProvider:()=>Is,Provider:()=>$t,Resolver:()=>_a,StaticJsonRpcProvider:()=>gs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Ss,WebSocketProvider:()=>Ti,getDefaultProvider:()=>su,getNetwork:()=>ds,isCommunityResourcable:()=>Ad,isCommunityResource:()=>cs,showThrottleMessage:()=>Zn});var Uc="networks/5.7.1";var jc=new M(Uc);function a5(i){return i&&typeof i.renetwork=="function"}function xi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return xi(t)},e}function Wo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return Wo(i,n)},t}var Vc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xi("homestead")},Hc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xi("ropsten")},qc={chainId:63,name:"classicMordor",_defaultProvider:Wo("https://www.ethercluster.com/mordor","classicMordor")},zo={unspecified:{chainId:0,name:"unspecified"},homestead:Vc,mainnet:Vc,morden:{chainId:2,name:"morden"},ropsten:Hc,testnet:Hc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Wo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qc,classicTestnet:qc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Wo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ds(i){if(i==null)return null;if(typeof i=="number"){for(let n in zo){let r=zo[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=zo[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=zo[i.name];if(!e)return typeof i.chainId!="number"&&jc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&jc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(a5(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Gc="web/5.7.1";var s5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function zc(i,e){return s5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var o5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Rn=new M(Gc);function Wc(i){return new Promise(e=>{setTimeout(e,i)})}function Oi(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ri(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return W(i)}return i}function u5(i){return Te(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function wd(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Rn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Rn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Rn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Rn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+na(Te(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ta(_[3]):u5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Rn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Oi(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Rn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Oi(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return o5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Rn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Oi(H,U.headers?U.headers["content-type"]:null),requestBody:Oi(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Rn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=Te(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return wd(i,r,n)}function Nn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var Cd=An(Qc());var Ae="providers/5.7.2";var ys=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(d,null),transactionIndex:Y.allowNull(d,null),confirmations:Y.allowNull(d,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:d,data:a,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(d),creates:Y.allowNull(t,null),raw:Y.allowNull(a)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(d),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(c),type:Y.allowNull(d),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:Y.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:d,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(a),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:Y.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(d),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:a,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(r,void 0),toBlock:Y.allowNull(r,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(d),blockHash:Y.allowNull(s),transactionIndex:d,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(a,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():ys.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ee(e,12));return t===po?null:t}contractAddress(e){return dr(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?ys.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=Y.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return No(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ys.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ys.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ys.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function Ad(i){return i&&typeof i.isCommunityResource=="function"}function cs(i){return Ad(i)&&i.isCommunityResource()}var Xc=!1;function Zn(){Xc||(Xc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},he=new M(Ae),h5=10;function Yc(i){return i==null?"null":(Nt(i)!==32&&he.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function Zc(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[Yc(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Yc(e)}).join("&")}function b5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function wa(i){if(typeof i=="string"){if(i=i.toLowerCase(),Nt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+Zc(i);if(wo.isForkEvent(i))throw he.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+Zc(i.topics||[])}throw new Error("invalid event - "+i)}function fs(){return new Date().getTime()}function ef(i){return new Promise(e=>{setTimeout(e,i)})}var x5=["block","network","pending","poll"],Id=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=b5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||x5.indexOf(this.tag)>=0}},g5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function kd(i){return me(F.from(i).toHexString(),32)}function tf(i){return ci.encode(ye([i,Ee(Xt(Xt(i)),0,4)]))}var af=new RegExp("^(ipfs)://(.*)$","i"),nf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),af,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(i,e){try{return Jt(ms(i,e))}catch{}return null}function ms(i,e){if(i==="0x")return null;let t=F.from(Ee(i,e,e+32)).toNumber(),n=F.from(Ee(i,t,t+32)).toNumber();return Ee(i,t+32,t+32+n)}function Md(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):he.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function rf(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function T5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function sf(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Ii(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",sf([Za(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=ms(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ms(n,0):null})}_getAddress(e,t){let n=g5[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return tf(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return tf(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=Cd.default.toWords(r.slice(2));return o.unshift(s),Cd.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Zr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",kd(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=Te(e);t=ye([kd(64),kd(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Ed=null,v5=1,ei=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ft(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Nn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Ed==null&&(Ed=new Y),Ed}static getNetwork(e){return ds(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Pn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(fs()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=fs(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=fs();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=v5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield ef(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=fs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield ef(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return W(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Un(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=h5&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Nt(a)%32===4)try{let s=Ee(a,4),o=Ee(s,0,32);F.from(o).eq(r)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ee(s,32,64)).toNumber(),c=F.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Nn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Nn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new _a(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ii(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=Qo(yield this.call({to:n,data:"0x691f3431"+Ii(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new _a(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Qo(yield this.call({to:s,data:"0x691f3431"+Ii(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new Id(wa(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=wa(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=wa(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=wa(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=wa(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=wa(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var gi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new M(Ae),w5=["call","estimateGas"];function bs(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=bs(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return bs(JSON.parse(i),e)}catch{}return null}function uf(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=bs(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=bs(e.body,!1);a==null&&(a=bs(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),w5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function of(i){return new Promise(function(e){setTimeout(e,i)})}function _5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function hs(i){return i&&i.toLowerCase()}var Sd={},Aa=class extends St{constructor(e,t,n){if(super(),e!==Sd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Rd(Sd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>gi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),uf("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return gi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Nn(()=>gi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return gi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return gi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return gi(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(bt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return gi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Rd=class extends Aa{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},A5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends ei{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=ft(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return gi(this,void 0,void 0,function*(){yield of(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ft(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Aa(Sd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Pn(this.connection,JSON.stringify(n),_5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[hs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[hs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[hs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[hs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=hs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return gi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return uf(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return of(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(A5);if(t)for(let a in t)t[a]&&(n[a]=!0);Jr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Un(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var ka=null;try{if(ka=WebSocket,ka==null)throw new Error("inject please")}catch{let e=new M(Ae);ka=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Pd=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Xo=new M(Ae),k5=1,Ti=class extends Yt{constructor(e,t){t==="any"&&Xo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new ka(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Xo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Xo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Pd(this,void 0,void 0,function*(){return null})}set polling(e){!e||Xo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=k5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Pd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return Pd(this,void 0,void 0,function*(){this.websocket.readyState===ka.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var M5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},xs=new M(Ae),gs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return M5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||xs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends gs{constructor(e,t){xs.checkAbstract(new.target,It),e=ft(new.target,"getNetwork")(e),t=ft(new.target,"getApiKey")(t);let n=ft(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){xs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return xs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return xs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lf=new M(Ae),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Ts=class extends Ti{constructor(e,t){let n=new Ma(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Yo}},Ma=class extends It{static getWebSocketProvider(e,t){return new Ts(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&lf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:lf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var E5=new M(Ae),Zo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function C5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return E5.throwArgumentError("unsupported network","name",i)}var vs=class extends It{isCommunityResource(){return this.apiKey===Zo}static getApiKey(e){return e??Zo}static getUrl(e,t){t==null&&(t=Zo);let n={allowGzip:!0,url:"https://"+C5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Zo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var I5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},df=new M(Ae),ws=class extends It{static getApiKey(e){return e!=null&&df.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:df.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return I5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var eu=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Bi=new M(Ae);function pf(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Un(W(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function S5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function yf(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function cf(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Nd(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;Bi.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Bi.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Bi.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Bi.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Bi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var _s=class extends ei{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Bi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return eu(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?yf:S5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Pn(o,d,s||yf);return this.emit("debug",{action:"response",request:r,response:ct(p),provider:this}),p})}detectNetwork(){return eu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return eu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Nd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=pf(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Nd("call",a,t.transaction)}}case"estimateGas":{let r=pf(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Nd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=cf(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=cf(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Bi.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Bi.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var iu=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Tr=new M(Ae);function tu(){return new Date().getTime()}function ff(i){let e=null;for(let t=0;te?null:(n+r)/2}function Ea(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Ea(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Ea(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var R5=1;function hf(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var P5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],N5=["address","args","errorArgs","errorSignature","method","transaction"];function nu(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function D5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function O5(i,e,t){let n=Ea;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=mf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return mf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Ea(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Ea(r))}:n=function(r){return r==null?null:Ea(r)};break;default:throw new Error("unknown method: "+e)}return D5(n,i.quorum)}function As(i,e){return iu(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Nn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function B5(i,e,t,n){return iu(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield As(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield As(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield As(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield As(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield As(i,e)),r.getLogs(a)}}return Tr.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var ks=class extends ei{constructor(e,t){e.length===0&&Tr.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=cs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=cs(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&Tr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&Tr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=ff(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return iu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return ff(e)})}perform(e,t){return iu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=tu(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=B5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield hf(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return P5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};N5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Tr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),Tr.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>nu(d)),provider:this})})}};var Dd=null;var ru=new M(Ae),Ms="84842078b09946638c03157f83405213",Es=class extends Ti{constructor(e,t){let n=new Ca(e,t),r=n.connection;r.password&&ru.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===Ms}},Ca=class extends It{static getWebSocketProvider(e,t){return new Es(e,t)}static getApiKey(e){let t={apiKey:Ms,projectId:Ms,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(ru.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),ru.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:ru.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===Ms&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===Ms}};var au=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Pn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Od=new M(Ae),F5="ETHERS_JS_SHARED",Cs=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Od.throwArgumentError("invalid apiKey","apiKey",e),e||F5}static getUrl(e,t){Od.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Od.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var bf=new M(Ae),xf="62e1ad51b37b8e00394bda3b",Is=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=xf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:bf.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===xf}};var gf=new M(Ae),L5=1;function Tf(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:L5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function U5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Ss=class extends Yt{constructor(e,t){e==null&&gf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=U5(e)):e.sendAsync?r=Tf(e,e.sendAsync.bind(e)):e.send?r=Tf(e,e.send.bind(e)):gf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var vf=new M(Ae);function su(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new Ti(i);default:vf.throwArgumentError("unsupported URL scheme","network",i)}}let t=ds(i);return(!t||!t._defaultProvider)&&vf.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:ks,AlchemyProvider:Ma,AnkrProvider:vs,CloudflareProvider:ws,EtherscanProvider:_s,InfuraProvider:Ca,JsonRpcProvider:Yt,NodesmithProvider:Cs,PocketProvider:Is,Web3Provider:Ss,IpcProvider:null},e)}var te={};zr(te,{AbiCoder:()=>ea,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>xe,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ui,Interface:()=>Si,LogDescription:()=>ra,Logger:()=>M,ParamType:()=>dt,RLP:()=>no,SigningKey:()=>fn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>aa,TransactionTypes:()=>Po,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ho,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>wd,_toEscapedUtf8String:()=>El,accessListify:()=>sn,arrayify:()=>V,base58:()=>ci,base64:()=>Nl,checkProperties:()=>Jr,checkResultErrors:()=>Qr,commify:()=>If,computeAddress:()=>mn,computeHmac:()=>fi,computePublicKey:()=>ns,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Xa,defaultPath:()=>mi,defineReadOnly:()=>B,dnsEncode:()=>Za,entropyToMnemonic:()=>gr,fetchJson:()=>Pn,formatBytes32String:()=>Cl,formatEther:()=>Sf,formatUnits:()=>Bd,getAccountPath:()=>Tc,getAddress:()=>fe,getContractAddress:()=>dr,getCreate2Address:()=>D0,getIcapAddress:()=>N0,getJsonWalletAddress:()=>bd,getStatic:()=>ft,hashMessage:()=>ia,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ee,hexStripZeros:()=>hl,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>P0,isBytes:()=>on,isBytesLike:()=>ri,isHexString:()=>re,isValidMnemonic:()=>gc,isValidName:()=>Ol,joinSignature:()=>Va,keccak256:()=>ce,mnemonicToEntropy:()=>xa,mnemonicToSeed:()=>dd,namehash:()=>Ii,nameprep:()=>Pl,parseBytes32String:()=>Il,parseEther:()=>Rf,parseTransaction:()=>No,parseUnits:()=>Fd,poll:()=>Nn,randomBytes:()=>Yn,recoverAddress:()=>fr,recoverPublicKey:()=>Ro,resolveProperties:()=>Ce,ripemd160:()=>as,serializeTransaction:()=>is,sha256:()=>Xt,sha512:()=>sd,shallowCopy:()=>we,shuffled:()=>us,solidityKeccak256:()=>Af,solidityPack:()=>ou,soliditySha256:()=>kf,splitSignature:()=>jn,stripZeros:()=>Zt,toUtf8Bytes:()=>Te,toUtf8CodePoints:()=>Ci,toUtf8String:()=>Jt,verifyMessage:()=>Fc,verifyTypedData:()=>Lc,zeroPad:()=>sr});var wf="solidity/5.7.0";var j5=new RegExp("^bytes([0-9]+)$"),V5=new RegExp("^(u?int)([0-9]*)$"),H5=new RegExp("^(.*)\\[([0-9]*)\\]$"),q5="0000000000000000000000000000000000000000000000000000000000000000",Ia=new M(wf);function _f(i,e,t){switch(i){case"address":return t?sr(e,32):V(e);case"string":return Te(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?sr(e,32):V(e)}let n=i.match(V5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ia.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),sr(e,r/8)}if(n=i.match(j5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ia.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ia.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+q5).substring(0,66)):e}if(n=i.match(H5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ia.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(_f(r,o,!0))}),ye(s)}return Ia.throwArgumentError("invalid type","type",i)}function ou(i,e){i.length!=e.length&&Ia.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(_f(n,e[r]))}),W(ye(t))}function Af(i,e){return ce(ou(i,e))}function kf(i,e){return Xt(ou(i,e))}var Mf="units/5.7.0";var Ef=new M(Mf),Cf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function If(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&Ef.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Bd(i,e){if(typeof e=="string"){let t=Cf.indexOf(e);t!==-1&&(e=3*t)}return Kr(i,e??18)}function Fd(i,e){if(typeof i!="string"&&Ef.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=Cf.indexOf(e);t!==-1&&(e=3*t)}return ln(i,e??18)}function Sf(i){return Bd(i,18)}function Rf(i){return Fd(i,18)}var uu="ethers/5.7.2";var Pf=new M(uu);try{let i=window;i._ethers==null&&(i._ethers=Ld)}catch{}var Dn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Dn||(Dn={}));var lu;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(lu||(lu={}));var Sa;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Sa||(Sa={}));var du;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(du||(du={}));var Ud;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(Ud||(Ud={}));var Rs;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Rs||(Rs={}));var Ps;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Ps||(Ps={}));var jd;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(jd||(jd={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var Hd="0x12345678",Vd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Vd||(Vd={}));var Tt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Tt||(Tt={}));var ve;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ve||(ve={}));var qd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],vr=class{static createInterface(){return new te.Interface(qd)}static connect(e,t){return new oe(e,qd,t)}};Mt(vr,"abi",qd);var Gd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wr=class{static createInterface(){return new te.Interface(Gd)}static connect(e,t){return new oe(e,Gd,t)}};Mt(wr,"abi",Gd);var Nf=(i,e)=>{throw new Error(`${e}: ${i}`)},zd=i=>i!=null;var{keccak256:z5,toUtf8Bytes:W5}=te,{MaxUint256:K5}=mt;var Ns=i=>te.formatEther(i),Df=i=>te.parseEther(i),pu=i=>Df(i[0]),Wd=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(Tt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(zd)},_r=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return K5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Fi=i=>z5(W5(i));var Ra=async(i,e)=>(await wr.connect(i,e).version()).toNumber(),Kd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(zd);var{hexDataSlice:Jd}=te,{MaxUint256:J5}=mt,Of=i=>{let e=Jd(i,0,3),t=F.from(Jd(i,4,35)),n=F.from(Jd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Bf=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),J5,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await _r(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},$5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>Bf(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ni(i,e,t,n[0],r):$5(i,e,t,n,r):Bf(i,e,t,n,r);var{MaxUint256:Ff}=mt,{AddressZero:Q5}=mt;async function X5(i,e){let t;try{return t=await i.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ds(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Of(s),I=vr.connect(a,n.signer||n.provider),_=await X5(I,p);if(_.includes(Tt.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Ff}else{let{skillId:U}=await e.getDomain(c),H=await i.getChildSkillId(U,b);if(H.eq(d))o=Ff;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,Q5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:Y5}=mt,ii=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Dn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Sa[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ii.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ii.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ii.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return ii.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${Y5}/noProof`,s=await ii.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var Lf=10,IA=wt(Lf),Uf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jf=Lf-1;var Vf=6,PA=wt(Vf),Hf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},qf=Vf-1;var Gf=7,OA=wt(Gf),zf={1:[],2:[],3:[],4:[],5:[],6:[]},Wf=Gf-1;var Kf=7,LA=wt(Kf),Jf={1:[],2:[],3:[],4:[],5:[],6:[]},$f=Kf-1;var Qf=4,VA=wt(Qf),Xf={1:[],2:[],3:[]},Yf=Qf-1;var Zf=5,GA=wt(Zf),em={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},tm=Zf-1;var nm=2,KA=wt(nm),im={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},rm=nm-1;var am=4,QA=wt(am),sm={1:[1,2,3],2:[1,2,3],3:[1,2,3]},om=am-1;var um=7,ZA=wt(um),lm={1:[],2:[],3:[],4:[],5:[],6:[]},dm=um-1;var pm=11,nk=wt(pm),$d={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Qd=pm-1;var ym=6,ak=wt(ym),cm={1:[],2:[],3:[],4:[],5:[]},fm=ym-1;var Li=(i,e,t)=>{switch(i){case ve.CoinMachine:{let n=Uf[e];return!!n&&!n.includes(t)}case ve.EvaluatedExpenditure:{let n=Hf[e];return!!n&&!n.includes(t)}case ve.FundingQueue:{let n=zf[e];return!!n&&!n.includes(t)}case ve.IVotingReputation:{let n=$d[e];return!!n&&!n.includes(t)}case ve.OneTxPayment:{let n=Jf[e];return!!n&&!n.includes(t)}case ve.ReputationBootstrapper:{let n=Xf[e];return!!n&&!n.includes(t)}case ve.StagedExpenditure:{let n=im[e];return!!n&&!n.includes(t)}case ve.StakedExpenditure:{let n=em[e];return!!n&&!n.includes(t)}case ve.StreamingPayments:{let n=sm[e];return!!n&&!n.includes(t)}case ve.TokenSupplier:{let n=lm[e];return!!n&&!n.includes(t)}case ve.VotingReputation:{let n=$d[e];return!!n&&!n.includes(t)}case ve.Whitelist:{let n=cm[e];return!!n&&!n.includes(t)}default:return Nf(i,"Could not find extension with name")}};var Z5={[ve.CoinMachine]:jf,[ve.EvaluatedExpenditure]:qf,[ve.FundingQueue]:Wf,[ve.IVotingReputation]:Qd,[ve.OneTxPayment]:$f,[ve.ReputationBootstrapper]:Yf,[ve.StagedExpenditure]:rm,[ve.StakedExpenditure]:tm,[ve.StreamingPayments]:om,[ve.TokenSupplier]:dm,[ve.VotingReputation]:Qd,[ve.Whitelist]:fm};var Bh=An(mm(),1);var xp=An(Nh(),1);var Se;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Se||(Se={}));var bp=2,hp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(hp||(hp={}));var Dh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,yx=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),gp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=xp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==bp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Se.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Dh(t.errors);throw new Error(n)};var Oh=(i,e)=>{let t=i===Se.Colony?yx(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=xp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:bp});if(!n.success){let r=Dh(n.errors);throw new Error(r)}return n.data};var Tp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},vp=Tp;var wp=(0,Bh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Hs={[Se.Annotation]:"Annotation(address,bytes32,string)",[Se.Colony]:"ColonyMetadata(address,string)",[Se.Decision]:"Annotation(address,bytes32,string)",[Se.Domain]:"DomainMetadata(address,uint256,string)",[Se.Misc]:"",[Se.DEFAULT]:""},Ba=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(Hs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await wp(n)).json();return gp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await wp(n)).json(),s=Object.entries(Hs).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return gp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await wp(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Oh(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var cx=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0,_p=class{token;PINATA_GATEWAY_ENDPOINT="https://gateway.pinata.cloud/ipfs";name="PINATA";constructor(e){let t=e||cx;if(!t)throw new Error('Cannot find pinata token. Please supply it as an argument to the class or as "process.env.COLONY_IPFS_PINATA_TOKEN (in NodeJS)"');this.token=t}getIpfsUrl(e){return`${this.PINATA_GATEWAY_ENDPOINT}/${e}`}async uploadJson(e){return(await(await fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({pinataContent:JSON.parse(e)})})).json()).IpfsHash}},Ap=_p;var kp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Mt(Tn,"abi",kp);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Mt(vn,"abi",Mp);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Mt(Ir,"abi",Ep);var Wu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Fh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",bx=i=>i.length>1,On=class extends hr{constructor(...e){bx(e)?super(...e):super(Wu,Fh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Wu)}static connect(e,t){return new oe(e,Wu,t)}};Mt(On,"bytecode",Fh),Mt(On,"abi",Wu);var Cp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Sr=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Mt(Sr,"abi",Cp);var Ip=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Rr=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Mt(Rr,"abi",Ip);var Pr;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Pr||(Pr={}));var wn;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(wn||(wn={}));var{AddressZero:Lh}=mt;async function Tx(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var vx=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=On.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await Tx(t)}catch{n=!1}try{await t.getMetatransactionNonce(Lh)}catch{r=!1}try{await t.nonces(Lh)}catch{a=!1}return n?r?t.tokenClientType=wn.Colony:(t=Sr.connect(i,e),t.tokenClientType=wn.ColonyLegacy):a?(t=vn.connect(i,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(i,e),t.tokenClientType=wn.Erc20),t.clientType=Pr.TokenClient,t},Sp=vx;var wx=(i,e)=>{let t=Rr.connect(i,e);return t.clientType=Pr.TokenLockingClient,t},Rp=wx;var{AddressZero:Pp}=mt,_x=Tn.connect(Pp,new ti.BaseProvider(3656691)).interface,Ax=Ir.connect(Pp,new ti.BaseProvider(3656691)).interface,kx=vn.connect(Pp,new ti.BaseProvider(3656691)).interface;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],qs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Gs.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Nr=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Nr.abi=Op;var vi=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Hs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Kd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Ex,solidityKeccak256:Cx,splitSignature:Ix}=te,Dr=class extends vi{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Dn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=Cx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=Ex(d),c=await n.signMessage(p),{r:b,s:I,v:_}=Ix(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Ku=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Or.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Br=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Br.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Fr=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Fr.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Lr=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Lr.abi=Up;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ur=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Ur.abi=jp;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],jr=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};jr.abi=Vp;var{AddressZero:Bx}=mt,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fi(Bn.extensionType),e.address);if(t===Bx)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await Ra(t,e.colonyNetwork.signerOrProvider);if(!Li(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,a,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding],this.oneTxPaymentContract.address),[S,L]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fi(ve.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},Vi=Bn;Vi.supportedVersions=[{version:3,factory:Lr},{version:4,factory:Ur},{version:5,factory:jr}],Vi.extensionType=ve.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var zs=class extends Fn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=On.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Ws=class extends Fn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ne("Approval",r)}))}};var Uh=async(i,e)=>{let t=await Sp(e,i.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new zs(i,t);case wn.Erc20:return new Fn(i,t);case wn.Erc2612:return new Ws(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Vr.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Hr=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Hr.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],qr=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};qr.abi=Gp;var{AddressZero:zp}=mt;var Ju=F.from(10).pow(18),Ln=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fi(Ln.extensionType),e.address);if(t===zp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let n=await Ra(t,e.colonyNetwork.signerOrProvider);if(!Li(Ln.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Ln.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Ln(e,a,n)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Ds(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,Hd);return[e,t,zp,Hd,n,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Se.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Ku("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ns(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Tt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await _r(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fi(ve.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Hi=Ln;Hi.supportedVersions=[{version:7,factory:Vr},{version:8,factory:Hr},{version:9,factory:qr}],Hi.extensionType=ve.VotingReputation;var jx={["motion"]:Hi,["oneTx"]:Vi},La=class{static async connect(e,t){let n=await Ra(t,e.signerOrProvider),r=La.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await Uh(e,s),d=new La(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return La.supportedVersions[La.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ii(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Fa({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Fa({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Hi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Vi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new Fn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Se.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Se.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Se.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Tt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ni(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Tt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await _r(b,this.colony,a,s),_=await _r(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Se.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Annotation})}installExtension(e){let t=jx[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Li(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Fi(r),t.getLatestSupportedVersion()],async s=>({...Ku("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return yu(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=Wd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Wd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Tt.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},Ua=La;Ua.supportedVersions=[{version:11,factory:Or},{version:12,factory:Br},{version:13,factory:Fr}];var{splitSignature:Vx}=te,$u=class extends vi{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Dn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Vx(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ks=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Rp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:jh}=te,{AddressZero:Wp}=mt,Js=class{constructor(e,t){this.network=t?.network||Dn.Gnosis,this.ipfs=new Ba(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||du[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Sa[this.network]},this.networkContract=Nr.connect(t?.customNetworkAddress||lu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new vi({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Dr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new $u({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Se.Colony,n),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Se.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return Ua.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.network],""):null}async getColonyAddress(e){let t=jh(`${e}${Rs[this.network]}`),n=await this.networkContract.addr(t);return n!==Wp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ps[this.network],""):null}async getUserAddress(e){let t=jh(`${e}${Ps[this.network]}`),n=await this.networkContract.addr(t);return n!==Wp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...ne("TokenDeployed",r)}))}};var{isAddress:Hx}=te,Vh=new ti.Web3Provider(window.ethereum),Gr,qi={},qx=async(i,e)=>new Js(e,{ipfsAdapter:new Ap("INVALID")}).getColony(i),Gx=async()=>{let i=await Gr.getBalance();return Ns(i)},zx=async()=>{let i="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,n]=await Gr.createTeam(i).tx().mined();if(!e||!t||!n)throw new Error("Transaction event data not found");let r=await n();if(!r)throw new Error("No metadata found");console.info(r);let[{domainId:a}]=await Gr.deprecateTeam(e,!0).tx().mined();console.info(`${a} successfully deprecated`);let{data:{domainName:s,domainColor:o,domainPurpose:d}}=r;return{domainId:e,fundingPotId:t,domainName:s,domainColor:o,domainPurpose:d}},Wx=async()=>{if(!qi.domainId)throw new Error("No domain created yet");let[,i]=await Gr.moveFundsToTeam(pu`0.66`,qi.domainId).tx().mined();return i},Kx=async i=>{if(!Gr.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await Gr.ext.oneTx.pay(i,pu`0.42`,qi.domainId).tx().mined();return e},Jx=async()=>(await Vh.send("eth_requestAccounts",[]),Vh.getSigner()),Qu=document.querySelector("#address"),Hh=document.querySelector("#button_connect"),qh=document.querySelector("#button_team"),Gh=document.querySelector("#button_fund"),zh=document.querySelector("#recipient"),Wh=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),Kh=document.querySelector("#result");if(!Qu||!zh||!Kp||!Kh||!Hh||!qh||!Gh||!Wh)throw new Error("Could not find all required HTML elements");var ja=i=>{Kp.innerText=`Found an error: ${i.message}`,console.error(i)},$x=()=>{Kp.innerText=""},_n=i=>{Kh.innerText=i};Hh.addEventListener("click",async()=>{$x();let i=Qu.value;if(!Hx(i))return ja(new Error("This is not a valid address"));_n("Processing...");let e=await Jx();try{let t=await qx(Qu.value,e);Gr=t;let n=await Gx(),r=await t.token.symbol();_n(` - Connected to Colony with address: ${i}. +`)}static register(e,t){if(t||(t=e.locale),K5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var J5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ss=null;function hf(a){if(ss==null&&(ss=J5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ss=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ol=class extends hn{constructor(){super("en")}getWord(e){return hf(this),ss[e]}getWordIndex(e){return hf(this),ss.indexOf(e)}},ul=new ol;hn.register(ul);var bi={en:ul};var xf="hdnode/5.7.0";var os=new E(xf),$5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Q5=ve("Bitcoin seed"),xr=2147483648;function gf(a){return(1<=256)throw new Error("Depth too large!");return bf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(hr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~xr));let n=new Uint8Array(37);if(e&xr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(ca(Xn.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Uo(F.from(r).add(this.privateKey).mod($5)):l=new cn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(hr,o,l,this.fingerprint,Uo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=xr)throw new Error("invalid path index - "+r);n=n._derive(xr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=xr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(ca(Xn.sha512,Q5,n));return new It(hr,Uo(i.slice(0,32)),null,"0x00000000",Uo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=dl(n),e=gi(br(e,n),n),It._fromSeed(ll(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||bf(t.slice(0,78))!==e)&&os.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(hr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(hr,W(o.slice(1)),null,i,s,r,n,null)}return os.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function ll(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function br(a,e){e=dl(e),os.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=gf(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function gi(a,e){if(e=dl(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&X5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&gf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Tf(a,e){try{return br(a,e),!0}catch{}return!1}function vf(a){return(typeof a!="number"||a<0||a>=xr||a%1)&&os.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var wf="random/5.7.0";var pl=new E(wf);function Y5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var _f=Y5(),Vo=_f.crypto||_f.msCrypto;(!Vo||!Vo.getRandomValues)&&(pl.warn("WARNING: Missing strong random number source"),Vo={getRandomValues:function(a){return pl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(a){(a<=0||a>1024||a%1||a!=a)&&pl.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Vo.getRandomValues(e),j(e)}function us(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var cl=kn(fl());var jo="json-wallets/5.7.0";function ha(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function gr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:Af(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new xa.default.Counter(R),q=new xa.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+gr(I.getUTCMonth()+1,2)+"-"+gr(I.getUTCDate(),2)+"T"+gr(I.getUTCHours(),2)+"-"+gr(I.getUTCMinutes(),2)+"-"+gr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Df(a,e,t){if(Ho(a)){t&&t(0);let n=hl(a,e);return t&&t(1),Promise.resolve(n)}return qo(a)?Nf(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Of(a,e){if(Ho(a))return hl(a,e);if(qo(a))return Pf(a,e);throw new Error("invalid JSON wallet")}var Bf="wallet/5.7.0";var Ff=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Tr=new E(Bf);function ax(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function ix(a){let e=a.mnemonic;return e&&e.phrase}var Sn=class extends St{constructor(e,t){if(super(),ax(e)){let n=new cn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&Tr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),ix(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&Tr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&Tr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&Tr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Sn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&Tr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(as(t)));return as(t,n)})}signMessage(e){return Ff(this,void 0,void 0,function*(){return jr(this._signingKey().signDigest(ar(e)))})}_signTypedData(e,t,n){return Ff(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&Tr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return jr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),vl(this,e,t,n)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=gi(t,e.locale);return Sn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Df(e,t,n).then(i=>new Sn(i))}static fromEncryptedJsonSync(e,t){return new Sn(Of(e,t))}static fromMnemonic(e,t,n){return t||(t=ma),new Sn(It.fromMnemonic(e,null,n).derivePath(t))}};function Lf(a,e){return ci(ar(a),e)}function Uf(a,e,t,n){return ci(bt.hash(a,e,t),n)}var ta={};zi(ta,{AlchemyProvider:()=>Er,AlchemyWebSocketProvider:()=>Ts,AnkrProvider:()=>vs,BaseProvider:()=>ea,CloudflareProvider:()=>ws,EtherscanProvider:()=>_s,FallbackProvider:()=>As,Formatter:()=>Y,InfuraProvider:()=>Ir,InfuraWebSocketProvider:()=>Ms,IpcProvider:()=>Dl,JsonRpcBatchProvider:()=>ru,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>kr,NodesmithProvider:()=>Is,PocketProvider:()=>Cs,Provider:()=>$t,Resolver:()=>_r,StaticJsonRpcProvider:()=>gs,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>Ss,WebSocketProvider:()=>Ta,getDefaultProvider:()=>su,getNetwork:()=>ls,isCommunityResourcable:()=>kl,isCommunityResource:()=>fs,showThrottleMessage:()=>Zn});var Vf="networks/5.7.1";var jf=new E(Vf);function rx(a){return a&&typeof a.renetwork=="function"}function ba(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ba(t)},e}function Wo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return Wo(a,n)},t}var Hf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},qf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},Gf={chainId:63,name:"classicMordor",_defaultProvider:Wo("https://www.ethercluster.com/mordor","classicMordor")},zo={unspecified:{chainId:0,name:"unspecified"},homestead:Hf,mainnet:Hf,morden:{chainId:2,name:"morden"},ropsten:qf,testnet:qf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ba("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ba("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ba("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ba("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Wo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Gf,classicTestnet:Gf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Wo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ba("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ba("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ls(a){if(a==null)return null;if(typeof a=="number"){for(let n in zo){let i=zo[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=zo[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=zo[a.name];if(!e)return typeof a.chainId!="number"&&jf.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&jf.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(rx(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var zf="web/5.7.1";var sx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Wf(a,e){return sx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var ox=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Rn=new E(zf);function Kf(a){return new Promise(e=>{setTimeout(e,a)})}function Oa(a,e){if(a==null)return null;if(typeof a=="string")return a;if(ia(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function ux(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function wl(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Rn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Rn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Rn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Rn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+nr(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?tr(_[3]):ux(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Rn.throwError("processing response error",E.errors.SERVER_ERROR,{body:Oa(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Rn.makeError("timeout",E.errors.TIMEOUT,{requestBody:Oa(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return ox(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Rn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Oa(H,U.headers?U.headers["content-type"]:null),requestBody:Oa(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Rn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return wl(a,i,n)}function Nn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var Il=kn(Xf());var Ae="providers/5.7.2";var ys=new E(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():ys.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===po?null:t}contractAddress(e){return li(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?ys.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return No(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ys.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ys.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ys.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function kl(a){return a&&typeof a.isCommunityResource=="function"}function fs(a){return kl(a)&&a.isCommunityResource()}var Yf=!1;function Zn(){Yf||(Yf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new E(Ae),hx=10;function Zf(a){return a==null?"null":(Nt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function ec(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Zf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Zf(e)}).join("&")}function xx(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function wr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Nt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+ec(a);if(wo.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+ec(a.topics||[])}throw new Error("invalid event - "+a)}function cs(){return new Date().getTime()}function tc(a){return new Promise(e=>{setTimeout(e,a)})}var bx=["block","network","pending","poll"],Cl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=xx(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||bx.indexOf(this.tag)>=0}},gx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Al(a){return me(F.from(a).toHexString(),32)}function nc(a){return fa.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var rc=new RegExp("^(ipfs)://(.*)$","i"),ac=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),rc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(a,e){try{return Jt(ms(a,e))}catch{}return null}function ms(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function El(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function ic(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Tx(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function sc(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",sc([Zr(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ms(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ms(n,0):null})}_getAddress(e,t){let n=gx[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return nc(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return nc(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Il.default.toWords(i.slice(2));return o.unshift(s),Il.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Zi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Al(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Al(64),Al(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Ml=null,vx=1,ea=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Nn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Ml==null&&(Ml=new Y),Ml}static getNetwork(e){return ls(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Pn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,E.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(cs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=cs(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=cs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=vx++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield tc(0),this._network;let n=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=cs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield tc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=hx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Nn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Nn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new _r(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ca(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Qo(yield this.call({to:n,data:"0x691f3431"+Ca(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new _r(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=Qo(yield this.call({to:s,data:"0x691f3431"+Ca(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new Cl(wr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=wr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=wr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=wr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=wr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=wr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var ga=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Et=new E(Ae),wx=["call","estimateGas"];function xs(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=xs(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return xs(JSON.parse(a),e)}catch{}return null}function uc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=xs(e,!0);if(r)return r.data;Et.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=xs(e.body,!1);r==null&&(r=xs(e,!1)),r&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Et.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Et.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Et.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Et.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),wx.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function oc(a){return new Promise(function(e){setTimeout(e,a)})}function _x(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function hs(a){return a&&a.toLowerCase()}var Sl={},kr=class extends St{constructor(e,t,n){if(super(),e!==Sl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Et.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Et.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Rl(Sl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Et.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ga(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Et.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Et.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),uc("sendTransaction",s,r)))})}signTransaction(e){return Et.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ga(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Nn(()=>ga(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return ga(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ga(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Rl=class extends kr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},kx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends ea{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ga(this,void 0,void 0,function*(){yield oc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new kr(Sl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Pn(this.connection,JSON.stringify(n),_x).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[hs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[hs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[hs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[hs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=hs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ga(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Et.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return uc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return oc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(kx);if(t)for(let r in t)t[r]&&(n[r]=!0);Ji(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Un(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var Ar=null;try{if(Ar=WebSocket,Ar==null)throw new Error("inject please")}catch{let e=new E(Ae);Ar=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Pl=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Xo=new E(Ae),Ax=1,Ta=class extends Yt{constructor(e,t){t==="any"&&Xo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Ar(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Xo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Xo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Pl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Xo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=Ax++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Pl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Pl(this,void 0,void 0,function*(){this.websocket.readyState===Ar.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var Ex=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bs=new E(Ae),gs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Ex(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||bs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends gs{constructor(e,t){bs.checkAbstract(new.target,Ct),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){bs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return bs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return bs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var dc=new E(Ae),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Ts=class extends Ta{constructor(e,t){let n=new Er(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Yo}},Er=class extends Ct{static getWebSocketProvider(e,t){return new Ts(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&dc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:dc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var Mx=new E(Ae),Zo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Ix(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Mx.throwArgumentError("unsupported network","name",a)}var vs=class extends Ct{isCommunityResource(){return this.apiKey===Zo}static getApiKey(e){return e??Zo}static getUrl(e,t){t==null&&(t=Zo);let n={allowGzip:!0,url:"https://"+Ix(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Zo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var Cx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},lc=new E(Ae),ws=class extends Ct{static getApiKey(e){return e!=null&&lc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:lc.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Cx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var eu=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ba=new E(Ae);function pc(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Un(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function Sx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function yc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function fc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Nl(a,e,t){if(a==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Ba.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Ba.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ba.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Ba.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Ba.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var _s=class extends ea{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Ba.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return eu(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?yc:Sx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Pn(o,l,s||yc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return eu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return eu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Nl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=pc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Nl("call",r,t.transaction)}}case"estimateGas":{let i=pc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Nl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=fc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=fc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ba.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ba.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var au=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ti=new E(Ae);function tu(){return new Date().getTime()}function cc(a){let e=null;for(let t=0;te?null:(n+i)/2}function Mr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>Mr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=Mr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Rx=1;function hc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var Px=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],Nx=["address","args","errorArgs","errorSignature","method","transaction"];function nu(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function Dx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function Ox(a,e,t){let n=Mr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=mc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return mc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Mr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Mr(i))}:n=function(i){return i==null?null:Mr(i)};break;default:throw new Error("unknown method: "+e)}return Dx(n,a.quorum)}function ks(a,e){return au(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Nn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function Bx(a,e,t,n){return au(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield ks(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield ks(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield ks(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield ks(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield ks(a,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:n})})}var As=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=fs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=fs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ti.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&Ti.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=cc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return au(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return cc(e)})}perform(e,t){return au(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=tu(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Bx(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield hc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return Px.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};Nx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ti.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ti.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>nu(l)),provider:this})})}};var Dl=null;var iu=new E(Ae),Es="84842078b09946638c03157f83405213",Ms=class extends Ta{constructor(e,t){let n=new Ir(e,t),i=n.connection;i.password&&iu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===Es}},Ir=class extends Ct{static getWebSocketProvider(e,t){return new Ms(e,t)}static getApiKey(e){let t={apiKey:Es,projectId:Es,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(iu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),iu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:iu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Es&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Es}};var ru=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Pn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ol=new E(Ae),Fx="ETHERS_JS_SHARED",Is=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&Ol.throwArgumentError("invalid apiKey","apiKey",e),e||Fx}static getUrl(e,t){Ol.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ol.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var xc=new E(Ae),bc="62e1ad51b37b8e00394bda3b",Cs=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=bc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:xc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:xc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===bc}};var gc=new E(Ae),Lx=1;function Tc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Lx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Ux(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Ss=class extends Yt{constructor(e,t){e==null&&gc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Ux(e)):e.sendAsync?i=Tc(e,e.sendAsync.bind(e)):e.send?i=Tc(e,e.send.bind(e)):gc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var vc=new E(Ae);function su(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new Ta(a);default:vc.throwArgumentError("unsupported URL scheme","network",a)}}let t=ls(a);return(!t||!t._defaultProvider)&&vc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:As,AlchemyProvider:Er,AnkrProvider:vs,CloudflareProvider:ws,EtherscanProvider:_s,InfuraProvider:Ir,JsonRpcProvider:Yt,NodesmithProvider:Is,PocketProvider:Cs,Web3Provider:Ss,IpcProvider:null},e)}var te={};zi(te,{AbiCoder:()=>er,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>It,Indexed:()=>ua,Interface:()=>Sa,LogDescription:()=>ir,Logger:()=>E,ParamType:()=>pt,RLP:()=>no,SigningKey:()=>cn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>rr,TransactionTypes:()=>Po,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ho,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>wl,_toEscapedUtf8String:()=>Md,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Nd,checkProperties:()=>Ji,checkResultErrors:()=>Qi,commify:()=>Cc,computeAddress:()=>mn,computeHmac:()=>ca,computePublicKey:()=>ns,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Xr,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Zr,entropyToMnemonic:()=>gi,fetchJson:()=>Pn,formatBytes32String:()=>Id,formatEther:()=>Sc,formatUnits:()=>Bl,getAccountPath:()=>vf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Dy,getIcapAddress:()=>Ny,getJsonWalletAddress:()=>xl,getStatic:()=>mt,hashMessage:()=>ar,hexConcat:()=>kt,hexDataLength:()=>Nt,hexDataSlice:()=>Ie,hexStripZeros:()=>hd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Py,isBytes:()=>on,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>Tf,isValidName:()=>Od,joinSignature:()=>jr,keccak256:()=>fe,mnemonicToEntropy:()=>br,mnemonicToSeed:()=>ll,namehash:()=>Ca,nameprep:()=>Pd,parseBytes32String:()=>Cd,parseEther:()=>Rc,parseTransaction:()=>No,parseUnits:()=>Fl,poll:()=>Nn,randomBytes:()=>Yn,recoverAddress:()=>ci,recoverPublicKey:()=>Ro,resolveProperties:()=>Ce,ripemd160:()=>rs,serializeTransaction:()=>as,sha256:()=>Xt,sha512:()=>sl,shallowCopy:()=>_e,shuffled:()=>us,solidityKeccak256:()=>kc,solidityPack:()=>ou,soliditySha256:()=>Ac,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ia,toUtf8String:()=>Jt,verifyMessage:()=>Lf,verifyTypedData:()=>Uf,zeroPad:()=>si});var wc="solidity/5.7.0";var Vx=new RegExp("^bytes([0-9]+)$"),jx=new RegExp("^(u?int)([0-9]*)$"),Hx=new RegExp("^(.*)\\[([0-9]*)\\]$"),qx="0000000000000000000000000000000000000000000000000000000000000000",Cr=new E(wc);function _c(a,e,t){switch(a){case"address":return t?si(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?si(e,32):j(e)}let n=a.match(jx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Cr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(n=a.match(Vx),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Cr.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Cr.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+qx).substring(0,66)):e}if(n=a.match(Hx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Cr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(_c(i,o,!0))}),ye(s)}return Cr.throwArgumentError("invalid type","type",a)}function ou(a,e){a.length!=e.length&&Cr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(_c(n,e[i]))}),W(ye(t))}function kc(a,e){return fe(ou(a,e))}function Ac(a,e){return Xt(ou(a,e))}var Ec="units/5.7.0";var Mc=new E(Ec),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Cc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Mc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Bl(a,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return Ki(a,e??18)}function Fl(a,e){if(typeof a!="string"&&Mc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function Sc(a){return Bl(a,18)}function Rc(a){return Fl(a,18)}var uu="ethers/5.7.2";var Pc=new E(uu);try{let a=window;a._ethers==null&&(a._ethers=Ll)}catch{}var Dn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Dn||(Dn={}));var du;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(du||(du={}));var Sr;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Sr||(Sr={}));var lu;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(lu||(lu={}));var Ul;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Ul||(Ul={}));var Rs;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Rs||(Rs={}));var Ps;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Ps||(Ps={}));var Vl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Vl||(Vl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Hl="0x12345678",jl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(jl||(jl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var ql=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],vi=class{static createInterface(){return new te.Interface(ql)}static connect(e,t){return new oe(e,ql,t)}};xe(vi,"abi",ql);var Gl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(wi,"abi",Gl);var Nc=(a,e)=>{throw new Error(`${e}: ${a}`)},zl=a=>a!=null;var{keccak256:zx,toUtf8Bytes:Wx}=te,{MaxUint256:Kx}=ht;var Ns=a=>te.formatEther(a),Dc=a=>te.parseEther(a),pu=a=>Dc(a[0]),Wl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(zl)},_i=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Kx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Fa=a=>zx(Wx(a));var Rr=async(a,e)=>(await wi.connect(a,e).version()).toNumber(),Kl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(zl);var{hexDataSlice:Jl}=te,{MaxUint256:Jx}=ht,Oc=a=>{let e=Jl(a,0,3),t=F.from(Jl(a,4,35)),n=F.from(Jl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Bc=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Jx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await _i(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},$x=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Bc(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?na(a,e,t,n[0],i):$x(a,e,t,n,i):Bc(a,e,t,n,i);var{MaxUint256:Fc}=ht,{AddressZero:Qx}=ht;async function Xx(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ds(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Oc(s),C=vi.connect(r,n.signer||n.provider),_=await Xx(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Fc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Fc;else{let{children:M}=await a.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Qx);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:Yx}=ht,aa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Dn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Sr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await aa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${Yx}/noProof`,s=await aa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Lc=10,Jk=_t(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vc=Lc-1;var jc=6,Xk=_t(jc),Hc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},qc=jc-1;var Gc=7,eA=_t(Gc),zc={1:[],2:[],3:[],4:[],5:[],6:[]},Wc=Gc-1;var Kc=7,aA=_t(Kc),Jc={1:[],2:[],3:[],4:[],5:[],6:[]},$c=Kc-1;var Qc=4,sA=_t(Qc),Xc={1:[],2:[],3:[]},Yc=Qc-1;var Zc=5,dA=_t(Zc),em={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},tm=Zc-1;var nm=2,yA=_t(nm),am={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},im=nm-1;var rm=4,mA=_t(rm),sm={1:[1,2,3],2:[1,2,3],3:[1,2,3]},om=rm-1;var um=7,bA=_t(um),dm={1:[],2:[],3:[],4:[],5:[],6:[]},lm=um-1;var pm=11,vA=_t(pm),$l={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Ql=pm-1;var ym=6,kA=_t(ym),fm={1:[],2:[],3:[],4:[],5:[]},cm=ym-1;var La=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Uc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Hc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=zc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=$l[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=Jc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=Xc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=am[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=em[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=sm[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=dm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=$l[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=fm[e];return!!n&&!n.includes(t)}default:return Nc(a,"Could not find extension with name")}};var Zx={[we.CoinMachine]:Vc,[we.EvaluatedExpenditure]:qc,[we.FundingQueue]:Wc,[we.IVotingReputation]:Ql,[we.OneTxPayment]:$c,[we.ReputationBootstrapper]:Yc,[we.StagedExpenditure]:im,[we.StakedExpenditure]:tm,[we.StreamingPayments]:om,[we.TokenSupplier]:lm,[we.VotingReputation]:Ql,[we.Whitelist]:cm};var Bh=kn(mm(),1);var bp=kn(Nh(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var xp=2,hp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(hp||(hp={}));var Dh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,y1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),gp=(a,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==xp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Dh(t.errors);throw new Error(n)};var Oh=(a,e)=>{let t=a===Re.Colony?y1(e):e,n=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:xp});if(!n.success){let i=Dh(n.errors);throw new Error(i)}return n.data};var Tp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},vp=Tp;var wp=(0,Bh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Hs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Br=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(Hs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await wp(n)).json();return gp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await wp(n)).json(),s=Object.entries(Hs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return gp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await wp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Oh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var f1=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0,_p=class{token;PINATA_GATEWAY_ENDPOINT="https://gateway.pinata.cloud/ipfs";name="PINATA";constructor(e){let t=e||f1;if(!t)throw new Error('Cannot find pinata token. Please supply it as an argument to the class or as "process.env.COLONY_IPFS_PINATA_TOKEN (in NodeJS)"');this.token=t}getIpfsUrl(e){return`${this.PINATA_GATEWAY_ENDPOINT}/${e}`}async uploadJson(e){return(await(await fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({pinataContent:JSON.parse(e)})})).json()).IpfsHash}},kp=_p;var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(Tn,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Ci,"abi",Mp);var Wu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Fh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",B1=a=>a.length>1,On=class extends hi{constructor(...e){B1(e)?super(...e):super(Wu,Fh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Wu)}static connect(e,t){return new oe(e,Wu,t)}};xe(On,"bytecode",Fh),xe(On,"abi",Wu);var Ip=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Si,"abi",Ip);var Cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ri,"abi",Cp);var Pi;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Pi||(Pi={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:Lh}=ht;async function U1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var V1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=On.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await U1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Lh)}catch{i=!1}try{await t.nonces(Lh)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Si.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Pi.TokenClient,t},Sp=V1;var j1=(a,e)=>{let t=Ri.connect(a,e);return t.clientType=Pi.TokenLockingClient,t},Rp=j1;var{AddressZero:Pp}=ht,H1=Tn.connect(Pp,new ta.BaseProvider(3656691)).interface,q1=Ci.connect(Pp,new ta.BaseProvider(3656691)).interface,G1=vn.connect(Pp,new ta.BaseProvider(3656691)).interface;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],qs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Gs.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ni.abi=Op;var va=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Hs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Kl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:W1,solidityKeccak256:K1,splitSignature:J1}=te,Di=class extends va{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Dn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=K1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=W1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=J1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Ku=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Oi.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Bi.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Fi.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Li.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Ui.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Vi.abi=jp;var{AddressZero:tg}=ht,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Bn.extensionType),e.address);if(t===tg)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await Rr(t,e.colonyNetwork.signerOrProvider);if(!La(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,r,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(we.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},ja=Bn;ja.supportedVersions=[{version:3,factory:Li},{version:4,factory:Ui},{version:5,factory:Vi}],ja.extensionType=we.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var zs=class extends Fn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=On.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Ws=class extends Fn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ne("Approval",i)}))}};var Uh=async(a,e)=>{let t=await Sp(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new zs(a,t);case wn.Erc20:return new Fn(a,t);case wn.Erc2612:return new Ws(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};ji.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Hi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};qi.abi=Gp;var{AddressZero:zp}=ht;var Ju=F.from(10).pow(18),Ln=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Ln.extensionType),e.address);if(t===zp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let n=await Rr(t,e.colonyNetwork.signerOrProvider);if(!La(Ln.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Ln.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Ln(e,r,n)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Ds(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,Hl);return[e,t,zp,Hl,n,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ku("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Ns(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(we.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Ln;Ha.supportedVersions=[{version:7,factory:ji},{version:8,factory:Hi},{version:9,factory:qi}],Ha.extensionType=we.VotingReputation;var rg={["motion"]:Ha,["oneTx"]:ja},Lr=class{static async connect(e,t){let n=await Rr(t,e.signerOrProvider),i=Lr.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Uh(e,s),l=new Lr(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Lr.supportedVersions[Lr.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Fr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Fr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Fn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=rg[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!La(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Fa(i),t.getLatestSupportedVersion()],async s=>({...Ku("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return yu(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Wl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Wl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Ur=Lr;Ur.supportedVersions=[{version:11,factory:Oi},{version:12,factory:Bi},{version:13,factory:Fi}];var{splitSignature:sg}=te,$u=class extends va{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Dn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:f}),{r:C,s:_,v}=sg(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:f,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ks=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Rp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Vh}=te,{AddressZero:Wp}=ht,Js=class{constructor(e,t){this.network=t?.network||Dn.Gnosis,this.ipfs=new Br(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||lu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Sr[this.network]},this.networkContract=Ni.connect(t?.customNetworkAddress||du[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new va({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Di({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new $u({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Re.Colony,n),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Ur.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.network],""):null}async getColonyAddress(e){let t=Vh(`${e}${Rs[this.network]}`),n=await this.networkContract.addr(t);return n!==Wp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ps[this.network],""):null}async getUserAddress(e){let t=Vh(`${e}${Ps[this.network]}`),n=await this.networkContract.addr(t);return n!==Wp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:og}=te,jh=new ta.Web3Provider(window.ethereum),Gi,qa={},ug=async(a,e)=>new Js(e,{ipfsAdapter:new kp("INVALID")}).getColony(a),dg=async()=>{let a=await Gi.getBalance();return Ns(a)},lg=async()=>{let a="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,n]=await Gi.createTeam(a).tx().mined();if(!e||!t||!n)throw new Error("Transaction event data not found");let i=await n();if(!i)throw new Error("No metadata found");console.info(i);let[{domainId:r}]=await Gi.deprecateTeam(e,!0).tx().mined();console.info(`${r} successfully deprecated`);let{data:{domainName:s,domainColor:o,domainPurpose:l}}=i;return{domainId:e,fundingPotId:t,domainName:s,domainColor:o,domainPurpose:l}},pg=async()=>{if(!qa.domainId)throw new Error("No domain created yet");let[,a]=await Gi.moveFundsToTeam(pu`0.66`,qa.domainId).tx().mined();return a},yg=async a=>{if(!Gi.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await Gi.ext.oneTx.pay(a,pu`0.42`,qa.domainId).tx().mined();return e},fg=async()=>(await jh.send("eth_requestAccounts",[]),jh.getSigner()),Qu=document.querySelector("#address"),Hh=document.querySelector("#button_connect"),qh=document.querySelector("#button_team"),Gh=document.querySelector("#button_fund"),zh=document.querySelector("#recipient"),Wh=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),Kh=document.querySelector("#result");if(!Qu||!zh||!Kp||!Kh||!Hh||!qh||!Gh||!Wh)throw new Error("Could not find all required HTML elements");var Vr=a=>{Kp.innerText=`Found an error: ${a.message}`,console.error(a)},cg=()=>{Kp.innerText=""},_n=a=>{Kh.innerText=a};Hh.addEventListener("click",async()=>{cg();let a=Qu.value;if(!og(a))return Vr(new Error("This is not a valid address"));_n("Processing...");let e=await fg();try{let t=await ug(Qu.value,e);Gi=t;let n=await dg(),i=await t.token.symbol();_n(` + Connected to Colony with address: ${a}. Colony version: ${t.version}. - Native token funding: ${n} ${r} - `)}catch(t){ja(t),_n("")}finally{Qu.value=""}return null});qh.addEventListener("click",async()=>{try{_n("Processing...");let{domainId:i,domainName:e,domainPurpose:t,fundingPotId:n}=await zx();qi.domainId=i,qi.fundingPotId=n,_n(`Team with domainId ${i} and fundingPotId ${n} successfully created. It is called "${e}" and has the purpose "${t}"`)}catch(i){ja(i),_n("")}});Gh.addEventListener("click",async()=>{if(!qi.domainId||!qi.fundingPotId)return ja(new Error("Please create a domain first"));_n("Processing...");try{let i=await Wx();console.info(i)}catch(i){ja(i),_n("")}return _n(`Successfully funded domain ${qi.domainId}`)});Wh.addEventListener("click",async()=>{let i=zh.value;_n("Processing...");try{let e=await Kx(i);console.info(e)}catch(e){ja(e),_n("")}_n(`Successfully paid 0.42 tokens to ${i}`)});})(); + Native token funding: ${n} ${i} + `)}catch(t){Vr(t),_n("")}finally{Qu.value=""}return null});qh.addEventListener("click",async()=>{try{_n("Processing...");let{domainId:a,domainName:e,domainPurpose:t,fundingPotId:n}=await lg();qa.domainId=a,qa.fundingPotId=n,_n(`Team with domainId ${a} and fundingPotId ${n} successfully created. It is called "${e}" and has the purpose "${t}"`)}catch(a){Vr(a),_n("")}});Gh.addEventListener("click",async()=>{if(!qa.domainId||!qa.fundingPotId)return Vr(new Error("Please create a domain first"));_n("Processing...");try{let a=await pg();console.info(a)}catch(a){Vr(a),_n("")}return _n(`Successfully funded domain ${qa.domainId}`)});Wh.addEventListener("click",async()=>{let a=zh.value;_n("Processing...");try{let e=await yg(a);console.info(e)}catch(e){Vr(e),_n("")}_n(`Successfully paid 0.42 tokens to ${a}`)});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/basic.js b/basic.js index 115b71d4e..4418a12ed 100644 --- a/basic.js +++ b/basic.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var Fh=Object.create;var Ks=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var jh=Object.getPrototypeOf,Vh=Object.prototype.hasOwnProperty;var Hh=(i,e,t)=>e in i?Ks(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hr=(i,e)=>{for(var t in e)Ks(i,t,{get:e[t],enumerable:!0})},qh=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Uh(e))!Vh.call(i,r)&&r!==t&&Ks(i,r,{get:()=>e[r],enumerable:!(n=Lh(e,r))||n.enumerable});return i};var _n=(i,e,t)=>(t=i!=null?Fh(jh(i)):{},qh(e||!i||!i.__esModule?Ks(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(Hh(i,typeof e!="symbol"?e+"":e,t),t);var Hp=ie(()=>{});var ol=ie((qp,sl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Hp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[k]|=h<>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);else if(x==="le")for(w=0,k=0;w>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)A=o(u,y,w)<=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8}this._strip()};function d(C,u,y,x){for(var w=0,k=0,h=Math.min(C.length,y),A=u;A=49?k=g-49+10:g>=17?k=g-17+10:k=g,t(g>=0&&k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,k=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),k!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(k!==0&&(x=k.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),k=x||Math.max(1,w);t(w<=k,"byte array longer than desired length"),t(k>0,"Requested array length <= 0");var h=v(u,k),A=y==="le"?"LE":"BE";return this["_toArrayLike"+A](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,k=0,h=0;k>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x=0&&(u[x--]=A>>8&255),x>=0&&(u[x--]=A>>16&255),h===6?(x>=0&&(u[x--]=A>>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var k=0,h=0;h>>26;for(;k!==0&&h>>26;if(this.length=x.length,k!==0)this.words[this.length]=k,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,k;x>0?(w=this,k=u):(w=u,k=this);for(var h=0,A=0;A>26,this.words[A]=y&67108863;for(;h!==0&&A>26,this.words[A]=y&67108863;if(h===0&&A>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,k=u.words[P]|0,h=w*k+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,k=y.words,h=x.words,A=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,W=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,pt=w[3]|0,Z=pt&8191,de=pt>>>13,Hi=w[4]|0,Pe=Hi&8191,Ne=Hi>>>13,qi=w[5]|0,De=qi&8191,Oe=qi>>>13,Gi=w[6]|0,Be=Gi&8191,Fe=Gi>>>13,zi=w[7]|0,Le=zi&8191,Ue=zi>>>13,Ki=w[8]|0,je=Ki&8191,Ve=Ki>>>13,Wi=w[9]|0,He=Wi&8191,qe=Wi>>>13,Ji=k[0]|0,Ge=Ji&8191,ze=Ji>>>13,$i=k[1]|0,Ke=$i&8191,We=$i>>>13,Qi=k[2]|0,Je=Qi&8191,$e=Qi>>>13,Xi=k[3]|0,Qe=Xi&8191,Xe=Xi>>>13,Yi=k[4]|0,Ye=Yi&8191,Ze=Yi>>>13,Zi=k[5]|0,et=Zi&8191,tt=Zi>>>13,er=k[6]|0,nt=er&8191,it=er>>>13,tr=k[7]|0,rt=tr&8191,at=tr>>>13,nr=k[8]|0,st=nr&8191,ot=nr>>>13,ir=k[9]|0,ut=ir&8191,lt=ir>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,Ge),l=Math.imul(f,ze),l=l+Math.imul(P,Ge)|0,m=Math.imul(P,ze);var vi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(vi>>>26)|0,vi&=67108863,g=Math.imul(j,Ge),l=Math.imul(j,ze),l=l+Math.imul(W,Ge)|0,m=Math.imul(W,ze),g=g+Math.imul(f,Ke)|0,l=l+Math.imul(f,We)|0,l=l+Math.imul(P,Ke)|0,m=m+Math.imul(P,We)|0;var wi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,g=Math.imul(X,Ge),l=Math.imul(X,ze),l=l+Math.imul(Q,Ge)|0,m=Math.imul(Q,ze),g=g+Math.imul(j,Ke)|0,l=l+Math.imul(j,We)|0,l=l+Math.imul(W,Ke)|0,m=m+Math.imul(W,We)|0,g=g+Math.imul(f,Je)|0,l=l+Math.imul(f,$e)|0,l=l+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var _i=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(Z,Ge),l=Math.imul(Z,ze),l=l+Math.imul(de,Ge)|0,m=Math.imul(de,ze),g=g+Math.imul(X,Ke)|0,l=l+Math.imul(X,We)|0,l=l+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,We)|0,g=g+Math.imul(j,Je)|0,l=l+Math.imul(j,$e)|0,l=l+Math.imul(W,Je)|0,m=m+Math.imul(W,$e)|0,g=g+Math.imul(f,Qe)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Qe)|0,m=m+Math.imul(P,Xe)|0;var Ai=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,g=Math.imul(Pe,Ge),l=Math.imul(Pe,ze),l=l+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul(Z,Ke)|0,l=l+Math.imul(Z,We)|0,l=l+Math.imul(de,Ke)|0,m=m+Math.imul(de,We)|0,g=g+Math.imul(X,Je)|0,l=l+Math.imul(X,$e)|0,l=l+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(j,Qe)|0,l=l+Math.imul(j,Xe)|0,l=l+Math.imul(W,Qe)|0,m=m+Math.imul(W,Xe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Ze)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Ze)|0;var ki=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,g=Math.imul(De,Ge),l=Math.imul(De,ze),l=l+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,Ke)|0,l=l+Math.imul(Pe,We)|0,l=l+Math.imul(Ne,Ke)|0,m=m+Math.imul(Ne,We)|0,g=g+Math.imul(Z,Je)|0,l=l+Math.imul(Z,$e)|0,l=l+Math.imul(de,Je)|0,m=m+Math.imul(de,$e)|0,g=g+Math.imul(X,Qe)|0,l=l+Math.imul(X,Xe)|0,l=l+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(j,Ye)|0,l=l+Math.imul(j,Ze)|0,l=l+Math.imul(W,Ye)|0,m=m+Math.imul(W,Ze)|0,g=g+Math.imul(f,et)|0,l=l+Math.imul(f,tt)|0,l=l+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Ku=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(Be,Ge),l=Math.imul(Be,ze),l=l+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,Ke)|0,l=l+Math.imul(De,We)|0,l=l+Math.imul(Oe,Ke)|0,m=m+Math.imul(Oe,We)|0,g=g+Math.imul(Pe,Je)|0,l=l+Math.imul(Pe,$e)|0,l=l+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul(Z,Qe)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Qe)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(X,Ye)|0,l=l+Math.imul(X,Ze)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(j,et)|0,l=l+Math.imul(j,tt)|0,l=l+Math.imul(W,et)|0,m=m+Math.imul(W,tt)|0,g=g+Math.imul(f,nt)|0,l=l+Math.imul(f,it)|0,l=l+Math.imul(P,nt)|0,m=m+Math.imul(P,it)|0;var Wu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(Le,Ge),l=Math.imul(Le,ze),l=l+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,Ke)|0,l=l+Math.imul(Be,We)|0,l=l+Math.imul(Fe,Ke)|0,m=m+Math.imul(Fe,We)|0,g=g+Math.imul(De,Je)|0,l=l+Math.imul(De,$e)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,l=l+Math.imul(Pe,Xe)|0,l=l+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Ze)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Ze)|0,g=g+Math.imul(X,et)|0,l=l+Math.imul(X,tt)|0,l=l+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(j,nt)|0,l=l+Math.imul(j,it)|0,l=l+Math.imul(W,nt)|0,m=m+Math.imul(W,it)|0,g=g+Math.imul(f,rt)|0,l=l+Math.imul(f,at)|0,l=l+Math.imul(P,rt)|0,m=m+Math.imul(P,at)|0;var Ju=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(je,Ge),l=Math.imul(je,ze),l=l+Math.imul(Ve,Ge)|0,m=Math.imul(Ve,ze),g=g+Math.imul(Le,Ke)|0,l=l+Math.imul(Le,We)|0,l=l+Math.imul(Ue,Ke)|0,m=m+Math.imul(Ue,We)|0,g=g+Math.imul(Be,Je)|0,l=l+Math.imul(Be,$e)|0,l=l+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,l=l+Math.imul(De,Xe)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,l=l+Math.imul(Pe,Ze)|0,l=l+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul(Z,et)|0,l=l+Math.imul(Z,tt)|0,l=l+Math.imul(de,et)|0,m=m+Math.imul(de,tt)|0,g=g+Math.imul(X,nt)|0,l=l+Math.imul(X,it)|0,l=l+Math.imul(Q,nt)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(j,rt)|0,l=l+Math.imul(j,at)|0,l=l+Math.imul(W,rt)|0,m=m+Math.imul(W,at)|0,g=g+Math.imul(f,st)|0,l=l+Math.imul(f,ot)|0,l=l+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var $u=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(He,Ge),l=Math.imul(He,ze),l=l+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(je,Ke)|0,l=l+Math.imul(je,We)|0,l=l+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,We)|0,g=g+Math.imul(Le,Je)|0,l=l+Math.imul(Le,$e)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,l=l+Math.imul(Be,Xe)|0,l=l+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,l=l+Math.imul(De,Ze)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,l=l+Math.imul(Pe,tt)|0,l=l+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul(Z,nt)|0,l=l+Math.imul(Z,it)|0,l=l+Math.imul(de,nt)|0,m=m+Math.imul(de,it)|0,g=g+Math.imul(X,rt)|0,l=l+Math.imul(X,at)|0,l=l+Math.imul(Q,rt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(j,st)|0,l=l+Math.imul(j,ot)|0,l=l+Math.imul(W,st)|0,m=m+Math.imul(W,ot)|0,g=g+Math.imul(f,ut)|0,l=l+Math.imul(f,lt)|0,l=l+Math.imul(P,ut)|0,m=m+Math.imul(P,lt)|0;var Qu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(He,Ke),l=Math.imul(He,We),l=l+Math.imul(qe,Ke)|0,m=Math.imul(qe,We),g=g+Math.imul(je,Je)|0,l=l+Math.imul(je,$e)|0,l=l+Math.imul(Ve,Je)|0,m=m+Math.imul(Ve,$e)|0,g=g+Math.imul(Le,Qe)|0,l=l+Math.imul(Le,Xe)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,l=l+Math.imul(Be,Ze)|0,l=l+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,l=l+Math.imul(De,tt)|0,l=l+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,l=l+Math.imul(Pe,it)|0,l=l+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,it)|0,g=g+Math.imul(Z,rt)|0,l=l+Math.imul(Z,at)|0,l=l+Math.imul(de,rt)|0,m=m+Math.imul(de,at)|0,g=g+Math.imul(X,st)|0,l=l+Math.imul(X,ot)|0,l=l+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(j,ut)|0,l=l+Math.imul(j,lt)|0,l=l+Math.imul(W,ut)|0,m=m+Math.imul(W,lt)|0;var Xu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(He,Je),l=Math.imul(He,$e),l=l+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(je,Qe)|0,l=l+Math.imul(je,Xe)|0,l=l+Math.imul(Ve,Qe)|0,m=m+Math.imul(Ve,Xe)|0,g=g+Math.imul(Le,Ye)|0,l=l+Math.imul(Le,Ze)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,l=l+Math.imul(Be,tt)|0,l=l+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,l=l+Math.imul(De,it)|0,l=l+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,it)|0,g=g+Math.imul(Pe,rt)|0,l=l+Math.imul(Pe,at)|0,l=l+Math.imul(Ne,rt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul(Z,st)|0,l=l+Math.imul(Z,ot)|0,l=l+Math.imul(de,st)|0,m=m+Math.imul(de,ot)|0,g=g+Math.imul(X,ut)|0,l=l+Math.imul(X,lt)|0,l=l+Math.imul(Q,ut)|0,m=m+Math.imul(Q,lt)|0;var Yu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(He,Qe),l=Math.imul(He,Xe),l=l+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(je,Ye)|0,l=l+Math.imul(je,Ze)|0,l=l+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Ze)|0,g=g+Math.imul(Le,et)|0,l=l+Math.imul(Le,tt)|0,l=l+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,l=l+Math.imul(Be,it)|0,l=l+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,it)|0,g=g+Math.imul(De,rt)|0,l=l+Math.imul(De,at)|0,l=l+Math.imul(Oe,rt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,st)|0,l=l+Math.imul(Pe,ot)|0,l=l+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul(Z,ut)|0,l=l+Math.imul(Z,lt)|0,l=l+Math.imul(de,ut)|0,m=m+Math.imul(de,lt)|0;var Zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(He,Ye),l=Math.imul(He,Ze),l=l+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(je,et)|0,l=l+Math.imul(je,tt)|0,l=l+Math.imul(Ve,et)|0,m=m+Math.imul(Ve,tt)|0,g=g+Math.imul(Le,nt)|0,l=l+Math.imul(Le,it)|0,l=l+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,it)|0,g=g+Math.imul(Be,rt)|0,l=l+Math.imul(Be,at)|0,l=l+Math.imul(Fe,rt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,st)|0,l=l+Math.imul(De,ot)|0,l=l+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,l=l+Math.imul(Pe,lt)|0,l=l+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,lt)|0;var el=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(He,et),l=Math.imul(He,tt),l=l+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(je,nt)|0,l=l+Math.imul(je,it)|0,l=l+Math.imul(Ve,nt)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Le,rt)|0,l=l+Math.imul(Le,at)|0,l=l+Math.imul(Ue,rt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,st)|0,l=l+Math.imul(Be,ot)|0,l=l+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,l=l+Math.imul(De,lt)|0,l=l+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,lt)|0;var tl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(He,nt),l=Math.imul(He,it),l=l+Math.imul(qe,nt)|0,m=Math.imul(qe,it),g=g+Math.imul(je,rt)|0,l=l+Math.imul(je,at)|0,l=l+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,at)|0,g=g+Math.imul(Le,st)|0,l=l+Math.imul(Le,ot)|0,l=l+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,l=l+Math.imul(Be,lt)|0,l=l+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,lt)|0;var nl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(He,rt),l=Math.imul(He,at),l=l+Math.imul(qe,rt)|0,m=Math.imul(qe,at),g=g+Math.imul(je,st)|0,l=l+Math.imul(je,ot)|0,l=l+Math.imul(Ve,st)|0,m=m+Math.imul(Ve,ot)|0,g=g+Math.imul(Le,ut)|0,l=l+Math.imul(Le,lt)|0,l=l+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,lt)|0;var il=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,g=Math.imul(He,st),l=Math.imul(He,ot),l=l+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(je,ut)|0,l=l+Math.imul(je,lt)|0,l=l+Math.imul(Ve,ut)|0,m=m+Math.imul(Ve,lt)|0;var rl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(rl>>>26)|0,rl&=67108863,g=Math.imul(He,ut),l=Math.imul(He,lt),l=l+Math.imul(qe,ut)|0,m=Math.imul(qe,lt);var al=(A+g|0)+((l&8191)<<13)|0;return A=(m+(l>>>13)|0)+(al>>>26)|0,al&=67108863,h[0]=vi,h[1]=wi,h[2]=_i,h[3]=Ai,h[4]=ki,h[5]=Ku,h[6]=Wu,h[7]=Ju,h[8]=$u,h[9]=Qu,h[10]=Xu,h[11]=Yu,h[12]=Zu,h[13]=el,h[14]=tl,h[15]=nl,h[16]=il,h[17]=rl,h[18]=al,A!==0&&(h[19]=A,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,k=0;k>>26)|0,w+=h>>>26,h&=67108863}y.words[k]=A,x=h,h=w}return x!==0?y.words[k]=x:y.length--,y._strip()}function H(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=H(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,k,h){for(var A=0;A>>1)k++;return 1<>>13,x[2*h+1]=k&8191,k=k>>>13;for(h=2*y;h>=26,x+=k/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,k;if(y!==0){var h=0;for(k=0;k>>26-y}h&&(this.words[k]=h,this.length++)}if(x!==0){for(k=this.length-1;k>=0;k--)this.words[k+x]=this.words[k];for(k=0;k=0);var w;y?w=(y-y%26)/26:w=0;var k=u%26,h=Math.min((u-k)/26,this.length),A=67108863^67108863>>>k<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-k|G>>>k,m=G&A}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[k+x]=h&67108863}for(;k>26,this.words[k+x]=h&67108863;if(A===0)return this._strip();for(t(A===-1),A=0,k=0;k>26,this.words[k]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),k=u,h=k.words[k.length-1]|0,A=this._countBits(h);x=26-A,x!==0&&(k=k.ushln(x),w.iushln(x),h=k.words[k.length-1]|0);var g=w.length-k.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[k.length+f]|0)*67108864+(w.words[k.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(k,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(k,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,k,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.iadd(u)),{div:w,mod:k}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.isub(u)),{div:h.div,mod:k}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),k=u.andln(1),h=x.cmp(w);return h<0||k===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,k=this.length-1;k>=0;k--)w=(x*w+(this.words[k]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var k=(this.words[w]|0)+x*67108864;this.words[w]=k/u|0,x=k%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=new r(0),A=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(l),k.isub(m)),w.iushrn(1),k.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||A.isOdd())&&(h.iadd(l),A.isub(m)),h.iushrn(1),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),k.isub(A)):(x.isub(y),h.isub(w),A.isub(k))}return{a:h,b:A,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,g=1;(y.words[0]&g)===0&&A<26;++A,g<<=1);if(A>0)for(y.iushrn(A);A-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)k.isOdd()&&k.iadd(h),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(k)):(x.isub(y),k.isub(w))}var G;return y.cmpn(1)===0?G=w:G=k,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var k=y.cmp(x);if(k<0){var h=y;y=x,x=h}else if(k===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,A&=67108863,this.words[h]=A}return k!==0&&(this.words[h]=k,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,k=u.words[x]|0;if(w!==k){wk&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new q(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),k=0;k>>22,h=A}h>>>=22,u.words[k-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=k,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),k=0;!w.isZero()&&w.andln(1)===0;)k++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),A=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(A)!==0;)l.redIAdd(A);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=k;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;k--){for(var m=y.words[k],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&A===0){g=0;continue}A<<=1,A|=f,g++,!(g!==x&&(k!==0||G!==0))&&(h=this.mul(h,w[A]),g=0,A=0)}l=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){q.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof sl>"u"||sl,qp)});var f0=ie((vg,Ys)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Ys=="object"&&Ys.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,W){return new l(f,P,W).update(j)[D]()}},$=function(f,P,D){return function(j,W,ee,X){return u["cshake"+f].update(j,W,ee,X)[D]()}},le=function(f,P,D){return function(j,W,ee,X){return u["kmac"+f].update(j,W,ee,X)[D]()}},T=function(f,P,D,j){for(var W=0;W>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,W=this.byteCount,ee=f.length,X=this.blockCount,Q=0,pt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=W){for(this.start=Z-W,this.block=j[X],Z=0;Z>8,D=f&255;D>0;)W.unshift(D),f=f>>8,D=f&255,++j;return P?W.push(j):W.unshift(j),this.update(W),W.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,W=f.length;if(P)j=W;else for(var ee=0;ee=57344?j+=3:(X=65536+((X&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),W=0)}return j&&(Q=P[W],X+=p[Q>>4&15]+p[Q&15],j>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,W=0,ee=0,X=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var pt=new Uint32Array(Q);ee>8&255,X[Q+2]=pt>>16&255,X[Q+3]=pt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,pt=P[W],X[Q]=pt&255,j>1&&(X[Q+1]=pt>>8&255),j>2&&(X[Q+2]=pt>>16&255)),X};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,W,ee,X,Q,pt,Z,de,Hi,Pe,Ne,qi,De,Oe,Gi,Be,Fe,zi,Le,Ue,Ki,je,Ve,Wi,He,qe,Ji,Ge,ze,$i,Ke,We,Qi,Je,$e,Xi,Qe,Xe,Yi,Ye,Ze,Zi,et,tt,er,nt,it,tr,rt,at,nr,st,ot,ir,ut,lt,vi,wi,_i,Ai,ki;for(j=0;j<48;j+=2)W=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],X=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],pt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Hi=f[7]^f[17]^f[27]^f[37]^f[47],Pe=f[8]^f[18]^f[28]^f[38]^f[48],Ne=f[9]^f[19]^f[29]^f[39]^f[49],P=Pe^(X<<1|Q>>>31),D=Ne^(Q<<1|X>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=W^(pt<<1|Z>>>31),D=ee^(Z<<1|pt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=X^(de<<1|Hi>>>31),D=Q^(Hi<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=pt^(Pe<<1|Ne>>>31),D=Z^(Ne<<1|Pe>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(W<<1|ee>>>31),D=Hi^(ee<<1|W>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,qi=f[0],De=f[1],tt=f[11]<<4|f[10]>>>28,er=f[10]<<4|f[11]>>>28,qe=f[20]<<3|f[21]>>>29,Ji=f[21]<<3|f[20]>>>29,wi=f[31]<<9|f[30]>>>23,_i=f[30]<<9|f[31]>>>23,Ye=f[40]<<18|f[41]>>>14,Ze=f[41]<<18|f[40]>>>14,We=f[2]<<1|f[3]>>>31,Qi=f[3]<<1|f[2]>>>31,Oe=f[13]<<12|f[12]>>>20,Gi=f[12]<<12|f[13]>>>20,nt=f[22]<<10|f[23]>>>22,it=f[23]<<10|f[22]>>>22,Ge=f[33]<<13|f[32]>>>19,ze=f[32]<<13|f[33]>>>19,Ai=f[42]<<2|f[43]>>>30,ki=f[43]<<2|f[42]>>>30,st=f[5]<<30|f[4]>>>2,ot=f[4]<<30|f[5]>>>2,Je=f[14]<<6|f[15]>>>26,$e=f[15]<<6|f[14]>>>26,Be=f[25]<<11|f[24]>>>21,Fe=f[24]<<11|f[25]>>>21,tr=f[34]<<15|f[35]>>>17,rt=f[35]<<15|f[34]>>>17,$i=f[45]<<29|f[44]>>>3,Ke=f[44]<<29|f[45]>>>3,je=f[6]<<28|f[7]>>>4,Ve=f[7]<<28|f[6]>>>4,ir=f[17]<<23|f[16]>>>9,ut=f[16]<<23|f[17]>>>9,Xi=f[26]<<25|f[27]>>>7,Qe=f[27]<<25|f[26]>>>7,zi=f[36]<<21|f[37]>>>11,Le=f[37]<<21|f[36]>>>11,at=f[47]<<24|f[46]>>>8,nr=f[46]<<24|f[47]>>>8,Zi=f[8]<<27|f[9]>>>5,et=f[9]<<27|f[8]>>>5,Wi=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,lt=f[29]<<7|f[28]>>>25,vi=f[28]<<7|f[29]>>>25,Xe=f[38]<<8|f[39]>>>24,Yi=f[39]<<8|f[38]>>>24,Ue=f[48]<<14|f[49]>>>18,Ki=f[49]<<14|f[48]>>>18,f[0]=qi^~Oe&Be,f[1]=De^~Gi&Fe,f[10]=je^~Wi&qe,f[11]=Ve^~He&Ji,f[20]=We^~Je&Xi,f[21]=Qi^~$e&Qe,f[30]=Zi^~tt&nt,f[31]=et^~er&it,f[40]=st^~ir<,f[41]=ot^~ut&vi,f[2]=Oe^~Be&zi,f[3]=Gi^~Fe&Le,f[12]=Wi^~qe&Ge,f[13]=He^~Ji&ze,f[22]=Je^~Xi&Xe,f[23]=$e^~Qe&Yi,f[32]=tt^~nt&tr,f[33]=er^~it&rt,f[42]=ir^~lt&wi,f[43]=ut^~vi&_i,f[4]=Be^~zi&Ue,f[5]=Fe^~Le&Ki,f[14]=qe^~Ge&$i,f[15]=Ji^~ze&Ke,f[24]=Xi^~Xe&Ye,f[25]=Qe^~Yi&Ze,f[34]=nt^~tr&at,f[35]=it^~rt&nr,f[44]=lt^~wi&Ai,f[45]=vi^~_i&ki,f[6]=zi^~Ue&qi,f[7]=Le^~Ki&De,f[16]=Ge^~$i&je,f[17]=ze^~Ke&Ve,f[26]=Xe^~Ye&We,f[27]=Yi^~Ze&Qi,f[36]=tr^~at&Zi,f[37]=rt^~nr&et,f[46]=wi^~Ai&st,f[47]=_i^~ki&ot,f[8]=Ue^~qi&Oe,f[9]=Ki^~De&Gi,f[18]=$i^~je&Wi,f[19]=Ke^~Ve&He,f[28]=Ye^~We&Je,f[29]=Ze^~Qi&$e,f[38]=at^~Zi&tt,f[39]=nr^~et&er,f[48]=Ai^~st&ir,f[49]=ki^~ot&ut,f[0]^=S[j],f[1]^=S[j+1]};if(s)Ys.exports=u;else{for(x=0;x{ly.exports=uy;function uy(i,e){if(!i)throw new Error(e||"Assertion failed")}uy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var dy=ie((c3,Dl)=>{typeof Object.create=="function"?Dl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Dl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var kn=ie(Re=>{"use strict";var J6=ia(),$6=dy();Re.inherits=$6;function Q6(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function X6(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):Q6(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Re.htonl=py;function Z6(i,e){for(var t="",n=0;n>>0}return a}Re.join32=e2;function t2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Re.split32=t2;function n2(i,e){return i>>>e|i<<32-e}Re.rotr32=n2;function i2(i,e){return i<>>32-e}Re.rotl32=i2;function r2(i,e){return i+e>>>0}Re.sum32=r2;function a2(i,e,t){return i+e+t>>>0}Re.sum32_3=a2;function s2(i,e,t,n){return i+e+t+n>>>0}Re.sum32_4=s2;function o2(i,e,t,n,r){return i+e+t+n+r>>>0}Re.sum32_5=o2;function u2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Re.sum64=u2;function l2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Re.sum64_hi=l2;function d2(i,e,t,n){var r=e+n;return r>>>0}Re.sum64_lo=d2;function p2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Re.sum64_4_hi=p2;function y2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Re.sum64_4_lo=y2;function c2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Re.sum64_5_hi=c2;function f2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Re.sum64_5_lo=f2;function m2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Re.rotr64_hi=m2;function h2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.rotr64_lo=h2;function b2(i,e,t){return i>>>t}Re.shr64_hi=b2;function x2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.shr64_lo=x2});var ra=ie(my=>{"use strict";var fy=kn(),g2=ia();function To(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}my.BlockHash=To;To.prototype.update=function(e,t){if(e=fy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=fy.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var T2=kn(),Hn=T2.rotr32;function v2(i,e,t,n){if(i===0)return hy(e,t,n);if(i===1||i===3)return xy(e,t,n);if(i===2)return by(e,t,n)}li.ft_1=v2;function hy(i,e,t){return i&e^~i&t}li.ch32=hy;function by(i,e,t){return i&e^i&t^e&t}li.maj32=by;function xy(i,e,t){return i^e^t}li.p32=xy;function w2(i){return Hn(i,2)^Hn(i,13)^Hn(i,22)}li.s0_256=w2;function _2(i){return Hn(i,6)^Hn(i,11)^Hn(i,25)}li.s1_256=_2;function A2(i){return Hn(i,7)^Hn(i,18)^i>>>3}li.g0_256=A2;function k2(i){return Hn(i,17)^Hn(i,19)^i>>>10}li.g1_256=k2});var vy=ie((b3,Ty)=>{"use strict";var aa=kn(),M2=ra(),E2=Ol(),Bl=aa.rotl32,Qa=aa.sum32,C2=aa.sum32_5,I2=E2.ft_1,gy=M2.BlockHash,S2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;gy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}aa.inherits(qn,gy);Ty.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var sa=kn(),R2=ra(),oa=Ol(),P2=ia(),Mn=sa.sum32,N2=sa.sum32_4,D2=sa.sum32_5,O2=oa.ch32,B2=oa.maj32,F2=oa.s0_256,L2=oa.s1_256,U2=oa.g0_256,j2=oa.g1_256,wy=R2.BlockHash,V2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;wy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=V2,this.W=new Array(64)}sa.inherits(Gn,wy);_y.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var Ll=kn(),Ay=Fl();function di(){if(!(this instanceof di))return new di;Ay.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ll.inherits(di,Ay);ky.exports=di;di.blockSize=512;di.outSize=224;di.hmacStrength=192;di.padLength=64;di.prototype._digest=function(e){return e==="hex"?Ll.toHex32(this.h.slice(0,7),"big"):Ll.split32(this.h.slice(0,7),"big")}});var Vl=ie((T3,Sy)=>{"use strict";var Qt=kn(),H2=ra(),q2=ia(),zn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,Ey=Qt.shr64_hi,Cy=Qt.shr64_lo,Si=Qt.sum64,Ul=Qt.sum64_hi,jl=Qt.sum64_lo,G2=Qt.sum64_4_hi,z2=Qt.sum64_4_lo,K2=Qt.sum64_5_hi,W2=Qt.sum64_5_lo,Iy=H2.BlockHash,J2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;Iy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=J2,this.W=new Array(160)}Qt.inherits(En,Iy);Sy.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var Hl=kn(),Ry=Vl();function pi(){if(!(this instanceof pi))return new pi;Ry.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Hl.inherits(pi,Ry);Py.exports=pi;pi.blockSize=1024;pi.outSize=384;pi.hmacStrength=192;pi.padLength=128;pi.prototype._digest=function(e){return e==="hex"?Hl.toHex32(this.h.slice(0,12),"big"):Hl.split32(this.h.slice(0,12),"big")}});var Dy=ie(ua=>{"use strict";ua.sha1=vy();ua.sha224=My();ua.sha256=Fl();ua.sha384=Ny();ua.sha512=Vl()});var jy=ie(Uy=>{"use strict";var dr=kn(),ob=ra(),vo=dr.rotl32,Oy=dr.sum32,Xa=dr.sum32_3,By=dr.sum32_4,Ly=ob.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;Ly.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}dr.inherits(Wn,Ly);Uy.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Oy(vo(By(n,Fy(_,r,a,s),e[db[_]+t],ub(_)),yb[_]),o);n=o,o=s,s=vo(a,10),a=r,r=v,v=Oy(vo(By(d,Fy(79-_,p,c,b),e[pb[_]+t],lb(_)),cb[_]),I),d=I,I=b,b=vo(c,10),c=p,p=v}v=Xa(this.h[1],a,b),this.h[1]=Xa(this.h[2],s,I),this.h[2]=Xa(this.h[3],o,d),this.h[3]=Xa(this.h[4],n,p),this.h[4]=Xa(this.h[0],r,c),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?dr.toHex32(this.h,"little"):dr.split32(this.h,"little")};function Fy(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function ub(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function lb(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var db=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],pb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],yb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],cb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Hy=ie((A3,Vy)=>{"use strict";var fb=kn(),mb=ia();function la(i,e,t){if(!(this instanceof la))return new la(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(fb.toArray(e,t))}Vy.exports=la;la.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),mb(e.length<=this.blockSize);for(var t=e.length;t{var Rt=qy;Rt.utils=kn();Rt.common=ra();Rt.sha=Dy();Rt.ripemd=jy();Rt.hmac=Hy();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var ud=ie((od,bc)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var A=0;A255)return!1;return!0}function n(h,A){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return A&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,A,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),A.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:A}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+A[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var A=[],g=0;g>2,this._Ke[G][A%4]=m[A],this._Kd[h-G][A%4]=m[A];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var A=1;A>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var A=l/2+1;A>2,W=P%4,this._Ke[j][W]=m[A],this._Kd[h-j][W]=m[A++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var A=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[A][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var A=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^H[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[A][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var A=r(h.length),g=r(16),l=0;l=0;--A)this._counter[A]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,A){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",A instanceof u||(A=new u(A)),this._counter=A,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var A=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-A,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let k=S,h=L,A=O,g=U,l=H,m=E,G=J,f=$,P,D,j,W,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],W=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(W+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)W=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((k>>>2|k<<32-2)^(k>>>13|k<<32-13)^(k>>>22|k<<32-22))+(k&h^k&A^h&A)|0,f=G,G=m,m=l,l=g+W|0,g=A,A=h,h=k,k=W+ee|0;S=S+k|0,L=L+h|0,O=O+A|0,U=U+g|0,H=H+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&A(g)};if(!H)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof cd<"u"?gc.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(cd)});var Gc=ie((c4,qc)=>{"use strict";var zo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",xd={};for(os=0;os>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Vc(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=xa(e)^n>>5}for(e=xa(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=Vc(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=xa(n)^s,r+=zo.charAt(s)}for(a=0;a<6;++a)n=xa(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=zo.charAt(o)}return r}function Hc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=Vc(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function Zb(){var i=Hc.apply(null,arguments);if(typeof i=="object")return i}function e5(i){var e=Hc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ko(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof zd=="object"&&typeof Kd<"u"?Kd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(zd,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var Wd=ie(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$dictionary=void 0;lu.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Ps=ie((Mk,lm)=>{lm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $d=ie(Li=>{var ke=Ps(),Jd=()=>[{type:ke.RANGE,from:48,to:57}],dm=()=>[{type:ke.CHAR,value:95},{type:ke.RANGE,from:97,to:122},{type:ke.RANGE,from:65,to:90}].concat(Jd()),pm=()=>[{type:ke.CHAR,value:9},{type:ke.CHAR,value:10},{type:ke.CHAR,value:11},{type:ke.CHAR,value:12},{type:ke.CHAR,value:13},{type:ke.CHAR,value:32},{type:ke.CHAR,value:160},{type:ke.CHAR,value:5760},{type:ke.RANGE,from:8192,to:8202},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233},{type:ke.CHAR,value:8239},{type:ke.CHAR,value:8287},{type:ke.CHAR,value:12288},{type:ke.CHAR,value:65279}],q5=()=>[{type:ke.CHAR,value:10},{type:ke.CHAR,value:13},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233}];Li.words=()=>({type:ke.SET,set:dm(),not:!1});Li.notWords=()=>({type:ke.SET,set:dm(),not:!0});Li.ints=()=>({type:ke.SET,set:Jd(),not:!1});Li.notInts=()=>({type:ke.SET,set:Jd(),not:!0});Li.whitespace=()=>({type:ke.SET,set:pm(),not:!1});Li.notWhitespace=()=>({type:ke.SET,set:pm(),not:!0});Li.anyChar=()=>({type:ke.SET,set:q5(),not:!0})});var cm=ie(Ns=>{var ym=Ps(),Ia=$d(),G5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",z5={0:0,t:9,n:10,v:11,f:12,r:13};Ns.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?G5.indexOf(d):z5[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Ns.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Ia.words());else if(r[2])t.push(Ia.ints());else if(r[3])t.push(Ia.whitespace());else if(r[4])t.push(Ia.notWords());else if(r[5])t.push(Ia.notInts());else if(r[6])t.push(Ia.notWhitespace());else if(r[7])t.push({type:ym.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:ym.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Ns.error(e,"Unterminated character class")};Ns.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var fm=ie(Ds=>{var du=Ps();Ds.wordBoundary=()=>({type:du.POSITION,value:"b"});Ds.nonWordBoundary=()=>({type:du.POSITION,value:"B"});Ds.begin=()=>({type:du.POSITION,value:"^"});Ds.end=()=>({type:du.POSITION,value:"$"})});var mm=ie((Sk,Qd)=>{var Sa=cm(),bn=Ps(),wr=$d(),pu=fm();Qd.exports=i=>{var e=0,t,n,r={type:bn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Sa.error(i,`Nothing to repeat at column ${O-1}`)},p=Sa.strToChars(i);for(t=p.length;e{"use strict";var xn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new xn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};hm.exports=Ui});var gm=ie((Pk,xm)=>{var yu=mm(),Os=bm(),_r=yu.types;xm.exports=class Bs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=yu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Bs.prototype.max!=null?Bs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case _r.ROOT:case _r.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var K5=Ar&&Ar.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.RandomGenerator=void 0;var W5=K5(gm()),J5;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new W5.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(J5=Ar.RandomGenerator||(Ar.RandomGenerator={}))});var Fs=ie(Ra=>{"use strict";var $5=Ra&&Ra.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.TypeGuardError=void 0;var Q5=function(i){$5(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Ra.TypeGuardError=Q5});var vm=ie(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$any=void 0;var X5=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};cu.$any=X5});var wm=ie(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$every=void 0;var Y5=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$guard=void 0;var Z5=Fs(),e1=function(i){return function(e,t){if(e===!0)throw new Z5.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};mu.$guard=e1});var Am=ie(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_between=void 0;var t1=function(i,e,t){return e<=i&&i<=t};hu.$is_between=t1});var km=ie(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_custom=void 0;var n1=Wd(),i1=function(i,e,t,n){var r,a=(r=n1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};bu.$is_custom=i1});var Mm=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_date=void 0;var r1=function(i){return a1.test(i)};xu.$is_date=r1;var a1=/^(\d{4})-(\d{2})-(\d{2})$/});var Em=ie(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_datetime=void 0;var s1=function(i){return!isNaN(new Date(i).getTime())};gu.$is_datetime=s1});var Cm=ie(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_email=void 0;var o1=function(i){return u1.test(i)};Tu.$is_email=o1;var u1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Im=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_ipv4=void 0;var l1=function(i){return d1.test(i)};vu.$is_ipv4=l1;var d1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Sm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_ipv6=void 0;var p1=function(i){return y1.test(i)};wu.$is_ipv6=p1;var y1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Rm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_url=void 0;var c1=function(i){return f1.test(i)};_u.$is_url=c1;var f1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Pm=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_uuid=void 0;var m1=function(i){return h1.test(i)};Au.$is_uuid=m1;var h1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Nm=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$join=void 0;var b1=function(i){return x1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};ku.$join=b1;var x1=function(i){return g1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},g1=function(i){return T1.has(i)},T1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Dm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$number=void 0;var v1=Fs(),w1=function(i){if(isFinite(i)===!1)throw new v1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Mu.$number=w1});var Om=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$report=void 0;var _1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};Eu.$report=_1});var Bm=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$rest=void 0;var A1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Cu.$rest=A1});var Fm=ie(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$string=void 0;var k1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Iu.$string=k1});var Lm=ie(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$tail=void 0;var M1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Su.$tail=M1});var Hm=ie(kr=>{"use strict";var jt=kr&&kr.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:U1.$number,string:H1.$string,tail:q1.$tail,rest:V1.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:E1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Um.RandomGenerator,pick:Um.RandomGenerator.pick}};var e=function(t){return function(n){throw new jm.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(G1=kr.Namespace||(kr.Namespace={}))});var qm=ie(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.MapUtil=void 0;var z1;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(z1=Ls.MapUtil||(Ls.MapUtil={}))});var zm=ie(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Wm=ie(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var $m=ie(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var Xm=ie(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0})});var Zm=ie(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ie(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var lp=ie(z=>{"use strict";var K1=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Mr=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&K1(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pa=Wd(),Me=Hm(),W1=qm();Mr(zm(),z);Mr(Wm(),z);Mr($m(),z);Mr(Xm(),z);Mr(Zm(),z);Mr(th(),z);Mr(Fs(),z);function Xd(){ae("assert")}z.assert=Xd;Object.assign(Xd,Me.Namespace.assert("assert"));function Yd(){ae("assertType")}z.assertType=Yd;Object.assign(Yd,Me.Namespace.assert("assertType"));function Ru(){ae("is")}z.is=Ru;Object.assign(Ru,Me.Namespace.assert("is"));function Pu(){ae("validate")}z.validate=Pu;Object.assign(Pu,Me.Namespace.validate());function Zd(){ae("assertEquals")}z.assertEquals=Zd;Object.assign(Zd,Me.Namespace.assert("assertEquals"));function ep(){ae("equals")}z.equals=ep;Object.assign(ep,Me.Namespace.is());function tp(){ae("validateEquals")}z.validateEquals=tp;Object.assign(tp,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Pa.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pa.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=W1.MapUtil.take(Pa.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function J1(){ae("application")}z.application=J1;function np(){ae("assertParse")}z.assertParse=np;Object.assign(np,Me.Namespace.assert("assertParse"));function ip(){ae("isParse")}z.isParse=ip;Object.assign(ip,Ru);function rp(){ae("validateParse")}z.validateParse=rp;Object.assign(rp,Pu);function ap(){ae("stringify")}z.stringify=ap;Object.assign(ap,Me.Namespace.stringify("stringify"));function Nu(){ae("assertStringify")}z.assertStringify=Nu;Object.assign(Nu,Me.Namespace.assert("assertStringify"));Object.assign(Nu,Me.Namespace.stringify("assertStringify"));function Du(){ae("isStringify")}z.isStringify=Du;Object.assign(Du,Me.Namespace.is());Object.assign(Du,Me.Namespace.stringify("isStringify"));function Ou(){ae("validateStringify")}z.validateStringify=Ou;Object.assign(Ou,Me.Namespace.validate());Object.assign(Ou,Me.Namespace.stringify("validateStringify"));function $1(){ae("metadata")}z.metadata=$1;function sp(){ae("random")}z.random=sp;Object.assign(sp,Me.Namespace.random());function Q1(){ae("literals")}z.literals=Q1;function op(){ae("clone")}z.clone=op;Object.assign(op,Me.Namespace.clone("clone"));function Bu(){ae("assertClone")}z.assertClone=Bu;Object.assign(Bu,Me.Namespace.assert("assertClone"));Object.assign(Bu,Me.Namespace.clone("assertClone"));function Fu(){ae("isClone")}z.isClone=Fu;Object.assign(Fu,Me.Namespace.is());Object.assign(Fu,Me.Namespace.clone("isClone"));function Lu(){ae("validateClone")}z.validateClone=Lu;Object.assign(Lu,Me.Namespace.validate());Object.assign(Lu,Me.Namespace.clone("validateClone"));function up(){ae("prune")}z.prune=up;Object.assign(up,Me.Namespace.prune("prune"));function Uu(){ae("assertPrune")}z.assertPrune=Uu;Object.assign(Uu,Me.Namespace.assert("assertPrune"));Object.assign(Uu,Me.Namespace.prune("assertPrune"));function ju(){ae("isPrune")}z.isPrune=ju;Object.assign(ju,Me.Namespace.is());Object.assign(ju,Me.Namespace.prune("isPrune"));function Vu(){ae("validatePrune")}z.validatePrune=Vu;Object.assign(Vu,Me.Namespace.prune("validatePrune"));Object.assign(Vu,Me.Namespace.validate());function nh(){ae("createAssert")}z.createAssert=nh;Object.assign(nh,Xd);function ih(){ae("createAssertType")}z.createAssertType=ih;Object.assign(ih,Yd);function rh(){ae("createIs")}z.createIs=rh;Object.assign(rh,Ru);function ah(){ae("createValidate")}z.createValidate=ah;Object.assign(ah,Pu);function sh(){ae("createAssertEquals")}z.createAssertEquals=sh;Object.assign(sh,Zd);function oh(){ae("createEquals")}z.createEquals=oh;Object.assign(oh,ep);function uh(){ae("createValidateEquals")}z.createValidateEquals=uh;Object.assign(uh,tp);function lh(){ae("createIsParse")}z.createIsParse=lh;Object.assign(lh,ip);function dh(){ae("createAssertParse")}z.createAssertParse=dh;Object.assign(dh,np);function ph(){ae("createValidateParse")}z.createValidateParse=ph;Object.assign(ph,rp);function yh(){ae("createStringify")}z.createStringify=yh;Object.assign(yh,ap);function ch(){ae("createAssertStringify")}z.createAssertStringify=ch;Object.assign(ch,Nu);function fh(){ae("createIsStringify")}z.createIsStringify=fh;Object.assign(fh,Du);function mh(){ae("createValidateStringify")}z.createValidateStringify=mh;Object.assign(mh,Ou);function hh(){ae("createRandom")}z.createRandom=hh;Object.assign(hh,sp);function bh(){ae("createClone")}z.createClone=bh;Object.assign(bh,op);function xh(){ae("createAssertClone")}z.createAssertClone=xh;Object.assign(xh,Bu);function gh(){ae("createIsClone")}z.createIsClone=gh;Object.assign(gh,Fu);function Th(){ae("createValidateClone")}z.createValidateClone=Th;Object.assign(Th,Lu);function vh(){ae("createPrune")}z.createPrune=vh;Object.assign(vh,up);function wh(){ae("createAssertPrune")}z.createAssertPrune=wh;Object.assign(wh,Uu);function _h(){ae("createIsPrune")}z.createIsPrune=_h;Object.assign(_h,ju);function Ah(){ae("createValidatePrune")}z.createValidatePrune=Ah;Object.assign(Ah,Vu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Mh=ie(gn=>{"use strict";var kh=gn&&gn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),X1=gn&&gn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),Y1=gn&&gn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&kh(e,i,t);return X1(e,i),e},Z1=gn&&gn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kh(e,i,t)};Object.defineProperty(gn,"__esModule",{value:!0});var ex=Y1(lp());gn.default=ex;Z1(lp(),gn)});var Nd={};Hr(Nd,{BaseContract:()=>pa,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>fr,FixedNumber:()=>yt,Signer:()=>St,VoidSigner:()=>ui,Wallet:()=>In,Wordlist:()=>hn,constants:()=>mt,errors:()=>Kt,getDefaultProvider:()=>iu,logger:()=>Mf,providers:()=>ei,utils:()=>te,version:()=>au,wordlists:()=>hr});var t0=_n(ol());var Gp="logger/5.7.0";var zp=!1,Kp=!1,Ws={debug:1,default:2,info:2,warning:3,error:4,off:5},Wp=Ws.default,ul=null;function Gh(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var Jp=Gh(),ll;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(ll||(ll={}));var Kt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Kt||(Kt={}));var $p="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Ws[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>Ws[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(Kp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=$p[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Kt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Kt.CALL_EXCEPTION:case Kt.INSUFFICIENT_FUNDS:case Kt.MISSING_NEW:case Kt.NONCE_EXPIRED:case Kt.REPLACEMENT_UNDERPRICED:case Kt.TRANSACTION_REPLACED:case Kt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Jp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Jp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return ul||(ul=new M(Gp)),ul}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Kp=!!e,zp=!!t}static setLogLevel(e){let t=Ws[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Wp=t}static from(e){return new M(e)}};M.errors=Kt;M.levels=ll;var Qp="bytes/5.7.0";var vt=new M(Qp);function Yp(i){return!!i.toHexString}function qr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return qr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ii(i){return re(i)&&!(i.length%2)||on(i)}function Xp(i){return typeof i=="number"&&i==i&&i%1===0}function on(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!Xp(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),qr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Yp(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),qr(n)}function Zt(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),qr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var dl="0123456789abcdef";function K(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=dl[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Yp(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(on(i)){let t="0x";for(let n=0;n>4]+dl[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Nt(i){if(typeof i!="string")i=K(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ee(i,e,t){return typeof i!="string"?i=K(i):(!re(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=K(t).substring(2)}),e}function Ln(i){let e=pl(K(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function pl(i){typeof i!="string"&&(i=K(i)),re(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function Un(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ii(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=K(t.slice(0,32)),e.s=K(t.slice(32,64))):t.length===65?(e.r=K(t.slice(0,32)),e.s=K(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=rr(V(e._vs),32);e._vs=K(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=K(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=me(e.r,32),e.s==null||!re(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=me(e.s,32);let t=V(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=K(t);e._vs&&(re(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fa(i){return i=Un(i),K(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Js="bignumber/5.7.0";var La=t0.default.BN,ri=new M(Js),yl={},Zp=9007199254740991;function n0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||on(i))}var e0=!1,F=class{constructor(e,t){e!==yl&&ri.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wt(be(this).fromTwos(e))}toTwos(e){return Wt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Wt(be(this).add(be(e)))}sub(e){return Wt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Wt(be(this).div(be(e)))}mul(e){return Wt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Wt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Wt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Wt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Wt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Wt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Wt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Wt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Wt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ri.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?e0||(e0=!0,ri.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ri.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ri.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(yl,Ua(e)):e.match(/^-?[0-9]+$/)?new F(yl,Ua(new La(e))):ri.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Zp||e<=-Zp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(K(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return ri.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ua(i){if(typeof i!="string")return Ua(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ri.throwArgumentError("invalid hex","value",i),i=Ua(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Wt(i){return F.from(Ua(i))}function be(i){let e=F.from(i).toHexString();return e[0]==="-"?new La("-"+e.substring(3),16):new La(e.substring(2),16)}function un(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ri.throwError(i,M.errors.NUMERIC_FAULT,n)}function cl(i){return new La(i,36).toString(16)}function fl(i){return new La(i,16).toString(36)}var Vt=new M(Js),ja={},r0=F.from(0),a0=F.from(-1);function s0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,M.errors.NUMERIC_FAULT,r)}var Va="0";for(;Va.length<256;)Va+=Va;function ml(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Va.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function Gr(i,e){e==null&&(e=0);let t=ml(e);i=F.from(i);let n=i.lt(r0);n&&(i=i.mul(a0));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&s0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new ai(ja,t,n,r)}},yt=class{constructor(e,t,n,r){e!==ja&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(i0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(i0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=yt.from("1"+Va.substring(0,e),this.format),r=zh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return yt.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!n0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),yt.fromString(Gr(e,t),ai.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ai.from(t),r=ln(e,n.decimals);!n.signed&&r.lt(r0)&&s0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=me(a,n.width/8));let s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ai.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static from(e,t){if(typeof e=="string")return yt.fromString(e,t);if(on(e))return yt.fromBytes(e,t);try{return yt.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},i0=yt.from(1),zh=yt.from("0.5");var o0="properties/5.7.0";var Kh=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},$s=new M(o0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function ft(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ce(i){return Kh(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function zr(i,e){(!i||typeof i!="object")&&$s.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||$s.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var Wh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function u0(i){if(i==null||Wh[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tct(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ct(n))}return e}return $s.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ct(i){return Jh(i)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var jn="abi/5.7.0";var ge=new M(jn),ar={},l0={calldata:!0,memory:!0,storage:!0},$h={calldata:!0,memory:!0};function Qs(i,e){if(i==="bytes"||i==="string"){if(l0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&$h[e])return!0;return(l0[e]||e==="payable")&&ge.throwArgumentError("invalid modifier","name",e),!1}function Qh(i,e){let t=i;function n(o){ge.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?dt.fromString(e,t):dt.fromObject(e)}static fromObject(e){return dt.isParamType(e)?e:new dt(ar,{name:e.name||null,type:Kr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(dt.fromObject):null})}static fromString(e,t){function n(r){return dt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(Qh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Ha(i,e){return Zh(i).map(t=>dt.fromString(t,e))}var qt=class{constructor(e,t){e!==ar&&ge.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Xs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&ge.throwArgumentError("invalid event object","value",e);let t={name:qa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dt.fromObject):[],type:"event"};return new Ht(ar,t)}static fromString(e){let t=e.match(Ga);t||ge.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:ge.warn("unknown modifier: "+r)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Ha(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function p0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&ge.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||ge.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function y0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function c0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ge.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e}var Dt=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&ge.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&ge.throwArgumentError("invalid constructor object","value",e);let t=c0(e);t.constant&&ge.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ar,n)}static fromString(e){let t={type:"constructor"};e=p0(e,t);let n=e.match(Ga);return(!n||n[1].trim()!=="constructor")&&ge.throwArgumentError("invalid constructor string","value",e),t.inputs=Ha(n[2].trim(),!1),y0(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&ge.throwArgumentError("invalid function object","value",e);let t=c0(e),n={type:e.type,name:qa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(dt.fromObject):[],outputs:e.outputs?e.outputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ar,n)}static fromString(e){let t={type:"function"};e=p0(e,t);let n=e.split(" returns ");n.length>2&&ge.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ga);if(r||ge.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&qa(t.name),t.inputs=Ha(r[2],!1),y0(r[3].trim(),t),n.length>1){let a=n[1].match(Ga);(a[1].trim()!=""||a[3].trim()!="")&&ge.throwArgumentError("unexpected tokens","value",e),t.outputs=Ha(a[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function d0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&ge.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qa(e.name),inputs:e.inputs?e.inputs.map(dt.fromObject):[]};return d0(new tn(ar,t))}static fromString(e){let t={type:"error"},n=e.match(Ga);return n||ge.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qa(t.name),t.inputs=Ha(n[2],!1),d0(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Kr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var Yh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qa(i){return(!i||!i.match(Yh))&&ge.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ga=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Zh(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&hl.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},or=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return K(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):or.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:hl.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new or(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var m0=_n(f0());function ce(i){return"0x"+m0.default.keccak_256(V(i))}var Zs={};Hr(Zs,{decode:()=>za,encode:()=>si});var h0="rlp/5.7.0";var Vn=new M(h0);function b0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function x0(i,e,t){let n=0;for(let r=0;re+1+n&&Vn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function v0(i,e){if(i.length===0&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&Vn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=x0(i,e+1,t);return e+1+t+n>i.length&&Vn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),g0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),g0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=x0(i,e+1,t);e+1+t+n>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=K(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=K(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:K(i[e])}}function za(i){let e=V(i),t=v0(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",i),t.result}var w0="address/5.7.0";var Mi=new M(w0);function _0(i){re(i,20)||Mi.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var e6=9007199254740991;function t6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var bl={};for(let i=0;i<10;i++)bl[String(i)]=String(i);for(let i=0;i<26;i++)bl[String.fromCharCode(65+i)]=String(10+i);var A0=Math.floor(t6(e6));function k0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>bl[n]).join("");for(;e.length>=A0;){let n=e.substring(0,A0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Mi.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=_0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Mi.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==k0(i)&&Mi.throwArgumentError("bad icap checksum","address",i),e=cl(i.substring(4));e.length<40;)e="0"+e;e=_0("0x"+e)}else Mi.throwArgumentError("invalid address","address",i);return e}function M0(i){try{return fe(i),!0}catch{}return!1}function E0(i){let e=fl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+k0("XE00"+e)+e}function ur(i){let e=null;try{e=fe(i.from)}catch{Mi.throwArgumentError("missing from address","transaction",i)}let t=Zt(V(F.from(i.nonce).toHexString()));return fe(Ee(ce(si([e,t])),12))}function C0(i,e,t){return Nt(e)!==32&&Mi.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Mi.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ee(ce(ye(["0xff",fe(i),e,t])),12))}var eo=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var to=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Jr=new M(jn);function xl(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Jr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Jr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Jr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Jr.throwArgumentError("types/value length mismatch","tuple",t);let r=new sr(i.wordSize),a=new sr(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function gl(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var no=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Jr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;roo,EtherSymbol:()=>N0,HashZero:()=>Qr,MaxInt256:()=>P0,MaxUint256:()=>po,MinInt256:()=>R0,NegativeOne:()=>uo,One:()=>lo,Two:()=>I0,WeiPerEther:()=>S0,Zero:()=>$r});var oo="0x0000000000000000000000000000000000000000";var uo=F.from(-1),$r=F.from(0),lo=F.from(1),I0=F.from(2),S0=F.from("1000000000000000000"),po=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),R0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),P0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qr="0x0000000000000000000000000000000000000000000000000000000000000000";var N0="\u039E";var yo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=po.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(lo).mul(uo)))&&this._throwError("value out-of-bounds",t)}else(n.lt($r)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var D0="strings/5.7.0";var O0=new M(D0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Bt||(Bt={}));function n6(i,e,t,n,r){return O0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function B0(i,e,t,n,r){if(i===Bt.BAD_PREFIX||i===Bt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Bt.OVERRUN?t.length-e-1:0}function i6(i,e,t,n,r){return i===Bt.OVERLONG?(n.push(r),0):(n.push(65533),B0(i,e,t,n,r))}var co=Object.freeze({error:n6,ignore:B0,replace:i6});function vl(i,e){e==null&&(e=co.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Bt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Bt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Bt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function Te(i,e=Gt.current){e!=Gt.current&&(O0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function Tl(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function wl(i,e){return'"'+vl(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Tl(t):(t-=65536,Tl((t>>10&1023)+55296)+Tl((t&1023)+56320))}).join("")+'"'}function fo(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return fo(vl(i,e))}function Ei(i,e=Gt.current){return vl(Te(i,e))}function _l(i){let e=Te(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,Qr]).slice(0,32))}function Al(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function r6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function F0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Ml(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var a6=F0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),o6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u6=kl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l6=kl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d6=kl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",r6),p6=F0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function y6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function c6(i){return!!Ml(i,a6)}function f6(i){let e=Ml(i,o6);if(e)return[i+e.s];let t=u6[i];if(t)return t;let n=l6[i];if(n)return[i+n[0]];let r=d6[i];return r||null}function m6(i){return!!Ml(i,p6)}function El(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Ei(i);e=y6(e.map(n=>{if(s6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=f6(n);return r||[n]})),e=Ei(fo(e),Gt.NFKC),e.forEach(n=>{if(m6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(c6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=fo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var mo=class extends Ka{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Te(t))}decode(e){return Jt(super.decode(e))}};var lr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return xl(e,this.coders,t)}decode(e){return e.coerce(this.name,gl(e,this.coders))}};var ho=new M(jn),h6=new RegExp(/^bytes([0-9]*)$/),b6=new RegExp(/^(u?int)([0-9]*)$/),Xr=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new eo(e.name);case"bool":return new io(e.name);case"string":return new mo(e.name);case"bytes":return new ro(e.name);case"array":return new no(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new lr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new so(e.name)}let t=e.type.match(b6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&ho.throwArgumentError("invalid "+t[1]+" bit length","param",e),new yo(n/8,t[1]==="int",e.name)}if(t=e.type.match(h6),t){let n=parseInt(t[1]);return(n===0||n>32)&&ho.throwArgumentError("invalid bytes length","param",e),new ao(n,e.name)}return ho.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new or(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new sr(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(dt.from(r)));return new lr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&ho.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(dt.from(s))),r=new lr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(dt.from(s)));return new lr(r,"_").decode(this._getReader(V(t),n))}},Wa=new Xr;function nn(i){return ce(Te(i))}var bo="hash/5.7.0";var Cl={};Hr(Cl,{decode:()=>Yr,encode:()=>Zr});function Yr(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function x6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function T6(i){let e=0;return()=>i[e++]}function j0(i){return T6(g6(i))}function v6(i){return i&1?~i>>1:i>>1}function w6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function V0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(k6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(M6(t,i))}return x6(U0(e))}function A6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function H0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function k6(i,e){let t=1+e(),n=e(),r=A6(e),a=H0(r.length,1+i,e);return U0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function M6(i,e){let t=1+e();return H0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function q0(i){let e=Ja(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Ja(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function G0(){return j0(Yr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var xo=G0(),E6=new Set(Ja(xo)),C6=new Set(Ja(xo)),I6=V0(xo),S6=q0(xo),z0=45,K0=95;function W0(i){return Ei(i)}function R6(i){return i.filter(e=>e!=65039)}function J0(i){for(let e of i.split(".")){let t=W0(e);try{for(let n=t.lastIndexOf(K0)-1;n>=0;n--)if(t[n]!==K0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===z0&&t[3]===z0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function $0(i){return J0(P6(i,R6))}function P6(i,e){let t=W0(i).reverse(),n=[];for(;t.length;){let r=D6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(E6.has(a)){n.push(a);continue}if(C6.has(a))continue;let s=I6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return J0(N6(String.fromCodePoint(...n)))}function N6(i){return i.normalize("NFC")}function D6(i,e){var t;let n=S6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var O6=new M(bo),X0=new Uint8Array(32);X0.fill(0);function Q0(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function Il(i){let e=Te($0(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(Q0(e.slice(n))),t}function Sl(i){try{return Il(i).length!==0}catch{}return!1}function Ci(i){typeof i!="string"&&O6.throwArgumentError("invalid ENS name; not a string","name",i);let e=X0,t=Il(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return K(e)}function $a(i){return K(ye(Il(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Y0=`Ethereum Signed Message: -`;function ea(i){return typeof i=="string"&&(i=Te(i)),ce(ye([Te(Y0),Te(String(i.length)),i]))}var B6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ht=new M(bo),ny=new Uint8Array(32);ny.fill(0);var F6=F.from(-1),iy=F.from(0),ry=F.from(1),L6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function U6(i){let e=V(i),t=e.length%32;return t?_t([e,ny.slice(t)]):K(e)}var j6=me(ry.toHexString(),32),V6=me(iy.toHexString(),32),Z0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Rl=["name","version","chainId","verifyingContract","salt"];function ey(i){return function(e){return typeof e!="string"&&ht.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var H6={name:ey("name"),version:ey("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return K(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function Pl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",i);let r=L6.mask(t?n-1:n),a=t?r.add(ry).mul(F6):iy;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&ht.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&ht.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&ht.throwArgumentError(`invalid length for ${i}`,"value",n),U6(n)}}}switch(i){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?j6:V6};case"bytes":return function(e){return ce(e)};case"string":return function(e){return nn(e)}}return null}function ty(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&ht.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Pl(c)&&(n[c]||ht.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?ht.throwArgumentError("missing primary type","types",e):a.length>1&&ht.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=ty(o,e[o])+d.map(p=>ty(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=Pl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),_t(s)}}return ht.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||ht.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Pl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):ht.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=Z0[n];r||ht.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Rl.indexOf(n.name)-Rl.indexOf(r.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return ce(bt.encode(e,t,n))}static resolveNames(e,t,n,r){return B6(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let r={},a=[];Rl.forEach(d=>{let p=e[d];p!=null&&(r[d]=H6[d](p),a.push({name:d,type:Z0[d]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return K(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&ht.throwArgumentError("invalid string","value",p),p}return ht.throwArgumentError("unsupported type","type",d)})}}};var xt=new M(jn);var ta=class extends en{},na=class extends en{},Nl=class extends en{},oi=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},q6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ay(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Ii=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ft(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){xt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){xt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&&xt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Wa}static getAddress(e){return fe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];xt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching function","name",n):r.length>1&&xt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];xt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching event","name",n):r.length>1&&xt.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Ht.fromString(e).format()];return t||xt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=ft(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}xt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching error","name",n):r.length>1&&xt.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ft(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ft(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return K(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),K(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return K(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),K(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=K(n.slice(0,4)),c=q6[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return xt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:K(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),K(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&xt.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?ce(K(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),me(K(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&xt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&xt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&&xt.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(dt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new oi({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oi({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw ay(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw ay(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new na({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ta({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=K(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Nl({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var sy="abstract-provider/5.7.0";var G6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},z6=new M(sy),go=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){z6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return G6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var oy="abstract-signer/5.7.0";var An=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},dn=new M(oy),K6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],W6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){dn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)K6.indexOf(n)===-1&&dn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&dn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>An(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&dn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?dn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&dn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&dn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):dn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(W6.indexOf(r.code)>=0)throw r;return dn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&dn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ce(t)})}_checkProvider(e){this.provider||dn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ui=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{dn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ui(this.address,e)}};var pe=_n(ol()),Jn=_n(ql());function da(i,e,t){return t={path:e,exports:{},require:function(n,r){return hb(n,r??t.path)}},i(t,t.exports),t.exports}function hb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Wl=zy;function zy(i,e){if(!i)throw new Error(e||"Assertion failed")}zy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=da(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),Ao=rn.getNAF,bb=rn.getJSF,ko=rn.assert;function Pi(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pr=Pi;Pi.prototype.point=function(){throw new Error("Not implemented")};Pi.prototype.validate=function(){throw new Error("Not implemented")};Pi.prototype._fixedNafMul=function(e,t){ko(e.precomputed);var n=e._getDoubles(),r=Ao(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];ko(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Pi.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=Ao(n[v],s[v],this._bitLength),d[S]=Ao(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=bb(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};cn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(i,e,t,n){pr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Jl(Pt,pr.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var wo=da(function(i,e){"use strict";var t=e;t.base=pr,t.short=gb,t.mont=null,t.edwards=null}),_o=da(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new wo.short(o):o.type==="edwards"?this.curve=new wo.edwards(o):this.curve=new wo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ri(i){if(!(this instanceof Ri))return new Ri(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(i.entropy,i.entropyEnc||"hex"),t=Cn.toArray(i.nonce,i.nonceEnc||"hex"),n=Cn.toArray(i.pers,i.persEnc||"hex");Wl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Ky=Ri;Ri.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ri.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=Cn.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var Tb=rn.assert;function Mo(i,e){if(i instanceof Mo)return i;this._importDER(i,e)||(Tb(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var Eo=Mo;function vb(){this.place=0}function Gl(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Gy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Mo.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Gy(t),n=Gy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];zl(r,t.length),r=r.concat(t),r.push(2),zl(r,n.length);var a=r.concat(n),s=[48];return zl(s,a.length),s=s.concat(a),rn.encode(s,e)};var wb=function(){throw new Error("unsupported")},Wy=rn.assert;function pn(i){if(!(this instanceof pn))return new pn(i);typeof i=="string"&&(Wy(Object.prototype.hasOwnProperty.call(_o,i),"Unknown curve "+i),i=_o[i]),i instanceof _o.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var _b=pn;pn.prototype.keyPair=function(e){return new $l(this,e)};pn.prototype.keyFromPrivate=function(e,t){return $l.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return $l.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Ky({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||wb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new Ky({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Eo({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new Eo(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};pn.prototype.recoverPubKey=function(i,e,t,n){Wy((3&t)===t,"The recovery param is more than two bits"),e=new Eo(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};pn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new Eo(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var Ab=da(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=wo,t.curves=_o,t.ec=_b,t.eddsa=null}),Jy=Ab.ec;var $y="signing-key/5.7.0";var Xl=new M($y),Ql=null;function $n(){return Ql||(Ql=new Jy("secp256k1")),Ql}var fn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Nt(this.privateKey)!==32&&Xl.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(V(this.publicKey)),n=$n().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&Xl.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return Un({recoveryParam:r.recoveryParam,r:me("0x"+r.r.toString(16),32),s:me("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=$n().keyFromPublic(V(Ya(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Co(i,e){let t=Un(e),n={r:V(t.r),s:V(t.s)};return"0x"+$n().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function Ya(i,e){let t=V(i);if(t.length===32){let n=new fn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?K(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):K(t)}return Xl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Qy="transactions/5.7.0";var Ut=new M(Qy),Io;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Io||(Io={}));function Zl(i){return i==="0x"?null:fe(i)}function Lt(i){return i==="0x"?$r:F.from(i)}var kb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Mb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(i){let e=Ya(i);return fe(Ee(ce(Ee(e,1)),12))}function yr(i,e){return mn(Co(V(i),e))}function an(i,e){let t=Zt(F.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function Yl(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Yl(t[0],t[1])):Yl(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return Yl(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Xy(i){return sn(i).map(e=>[e.address,e.storageKeys])}function Yy(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Xy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",si(t)])}function Zy(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Xy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",si(t)])}function Eb(i,e){zr(i,Mb);let t=[];kb.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(K(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(K(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ii(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(K(n)),t.push("0x"),t.push("0x")),!e)return si(t);let r=Un(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(K(a)),t.push(Zt(V(r.r))),t.push(Zt(V(r.s))),si(t)}function Za(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),Eb(i,e);switch(i.type){case 1:return Zy(i,e);case 2:return Yy(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function ec(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=me(e[1],32),i.s=me(e[2],32);try{let n=ce(t(i));i.from=yr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function Cb(i){let e=za(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Zl(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=ce(i),ec(r,e.slice(9),Yy)),r}function Ib(i){let e=za(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Zl(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=ce(i),ec(t,e.slice(8),Zy)),t}function Sb(i){let e=za(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Zl(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(K(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(si(r));try{t.from=yr(a,{r:K(t.r),s:K(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function So(i){let e=V(i);if(e[0]>127)return Sb(e);switch(e[0]){case 1:return Ib(e);case 2:return Cb(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var tc="contracts/5.7.0";var Ni=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ie=new M(tc),Rb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Ro(i,e){return Ni(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Ie.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(i,e,t){return Ni(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>es(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield Ro(i,e):t.type==="tuple"?yield es(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(i,n,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Do(i,e,t){return Ni(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ce({override:Ro(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Ni(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=Ro(i.provider,n.from));let r=yield Ce({args:es(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ce(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Ie.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function Pb(i,e){return function(...t){return Do(i,e,t)}}function Nb(i,e){let t=i.signer||i.provider;return function(...n){return Ni(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Do(i,e,n);return yield t.estimateGas(r)})}}function ic(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ct(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function rc(i,e,t){let n=i.signer||i.provider;return function(...r){return Ni(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Do(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function Db(i,e){return function(...t){return Ni(this,void 0,void 0,function*(){i.signer||Ie.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Do(i,e,t),r=yield i.signer.sendTransaction(n);return ic(i,r),r})}}function nc(i,e,t){return e.constant?rc(i,e,t):Db(i,e)}function ac(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var cr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ed=class extends cr{constructor(){super("error",null)}},Po=class extends cr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ie.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(ac(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Wr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},No=class extends cr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},pa=class{constructor(e,t,n){B(this,"interface",ft(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Ie.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Ro(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,nc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,nc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,rc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Pb(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Nb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return ur(e)}static getInterface(e){return Ii.isInterface(e)?e:new Ii(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ui(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oi.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ed);if(e==="event")return this._normalizeRunningEvent(new cr("event",null));if(e==="*")return this._normalizeRunningEvent(new No(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Po(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Po(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new cr(ac(t),t))}return this._normalizeRunningEvent(new No(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ct(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pa{},fr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:on(t)?r=K(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Ie.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",ft(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!Rb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=K(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ni(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=ft(this.constructor,"getContractAddress")(a),o=ft(this.constructor,"getContract")(s,this.interface,this.signer);return ic(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ur(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Oo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(ci(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var Fh=Object.create;var Ws=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var Vh=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty;var Hh=(a,e,t)=>e in a?Ws(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Hi=(a,e)=>{for(var t in e)Ws(a,t,{get:e[t],enumerable:!0})},qh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Uh(e))!jh.call(a,i)&&i!==t&&Ws(a,i,{get:()=>e[i],enumerable:!(n=Lh(e,i))||n.enumerable});return a};var _n=(a,e,t)=>(t=a!=null?Fh(Vh(a)):{},qh(e||!a||!a.__esModule?Ws(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(Hh(a,typeof e!="symbol"?e+"":e,t),t);var Hp=ae(()=>{});var od=ae((qp,sd)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Hp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,le=yt>>>13,Ha=w[4]|0,Ne=Ha&8191,De=Ha>>>13,qa=w[5]|0,Oe=qa&8191,Be=qa>>>13,Ga=w[6]|0,Fe=Ga&8191,Le=Ga>>>13,za=w[7]|0,Ue=za&8191,Ve=za>>>13,Wa=w[8]|0,je=Wa&8191,He=Wa>>>13,Ka=w[9]|0,qe=Ka&8191,Ge=Ka>>>13,Ja=A[0]|0,ze=Ja&8191,We=Ja>>>13,$a=A[1]|0,Ke=$a&8191,Je=$a>>>13,Qa=A[2]|0,$e=Qa&8191,Qe=Qa>>>13,Xa=A[3]|0,Xe=Xa&8191,Ye=Xa>>>13,Ya=A[4]|0,Ze=Ya&8191,et=Ya>>>13,Za=A[5]|0,tt=Za&8191,nt=Za>>>13,ei=A[6]|0,at=ei&8191,it=ei>>>13,ti=A[7]|0,rt=ti&8191,st=ti>>>13,ni=A[8]|0,ot=ni&8191,ut=ni>>>13,ai=A[9]|0,dt=ai&8191,lt=ai>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var va=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Aa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var rd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=Wu,h[6]=Ku,h[7]=Ju,h[8]=$u,h[9]=Qu,h[10]=Xu,h[11]=Yu,h[12]=Zu,h[13]=ed,h[14]=td,h[15]=nd,h[16]=ad,h[17]=id,h[18]=rd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function E(I,u){this.x=I,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof sd>"u"||sd,qp)});var cy=ae((Vg,Ys)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Ys=="object"&&Ys.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var E=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,yt=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var yt=new Uint32Array(Q);ee>8&255,X[Q+2]=yt>>16&255,X[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],X[Q]=yt&255,V>1&&(X[Q+1]=yt>>8&255),V>2&&(X[Q+2]=yt>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Wa,je,He,Ka,qe,Ge,Ja,ze,We,$a,Ke,Je,Qa,$e,Qe,Xa,Xe,Ye,Ya,Ze,et,Za,tt,nt,ei,at,it,ti,rt,st,ni,ot,ut,ai,dt,lt,va,wa,_a,ka,Aa;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],Ha=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|Ha>>>31),D=Q^(Ha<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=Ha^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,qa=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ei=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,Ja=c[21]<<3|c[20]>>>29,wa=c[31]<<9|c[30]>>>23,_a=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Qa=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,Ga=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,ka=c[42]<<2|c[43]>>>30,Aa=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ti=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,$a=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ai=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Xa=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,za=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ni=c[46]<<24|c[47]>>>8,Za=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,Ka=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,va=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,Ya=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Wa=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Ka&Ge,c[11]=He^~qe&Ja,c[20]=Je^~$e&Xa,c[21]=Qa^~Qe&Xe,c[30]=Za^~nt&at,c[31]=tt^~ei&it,c[40]=ot^~ai<,c[41]=ut^~dt&va,c[2]=Be^~Fe&za,c[3]=Ga^~Le&Ue,c[12]=Ka^~Ge&ze,c[13]=qe^~Ja&We,c[22]=$e^~Xa&Ye,c[23]=Qe^~Xe&Ya,c[32]=nt^~at&ti,c[33]=ei^~it&rt,c[42]=ai^~lt&wa,c[43]=dt^~va&_a,c[4]=Fe^~za&Ve,c[5]=Le^~Ue&Wa,c[14]=Ge^~ze&$a,c[15]=Ja^~We&Ke,c[24]=Xa^~Ye&Ze,c[25]=Xe^~Ya&et,c[34]=at^~ti&st,c[35]=it^~rt&ni,c[44]=lt^~wa&ka,c[45]=va^~_a&Aa,c[6]=za^~Ve&qa,c[7]=Ue^~Wa&Oe,c[16]=ze^~$a&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=Ya^~et&Qa,c[36]=ti^~st&Za,c[37]=rt^~ni&tt,c[46]=wa^~ka&ot,c[47]=_a^~Aa&ut,c[8]=Ve^~qa&Be,c[9]=Wa^~Oe&Ga,c[18]=$a^~je&Ka,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Qa&Qe,c[38]=st^~Za&nt,c[39]=ni^~tt&ei,c[48]=ka^~ot&ai,c[49]=Aa^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)Ys.exports=u;else{for(b=0;b{d0.exports=u0;function u0(a,e){if(!a)throw new Error(e||"Assertion failed")}u0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var l0=ae((P3,Dd)=>{typeof Object.create=="function"?Dd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Dd.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var J6=ar(),$6=l0();Pe.inherits=$6;function Q6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function X6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):Q6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=p0;function Z6(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=e2;function t2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=t2;function n2(a,e){return a>>>e|a<<32-e}Pe.rotr32=n2;function a2(a,e){return a<>>32-e}Pe.rotl32=a2;function i2(a,e){return a+e>>>0}Pe.sum32=i2;function r2(a,e,t){return a+e+t>>>0}Pe.sum32_3=r2;function s2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=s2;function o2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=o2;function u2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=u2;function d2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=d2;function l2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=l2;function p2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=p2;function y2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=y2;function f2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=f2;function c2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=c2;function m2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=m2;function h2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=h2;function x2(a,e,t){return a>>>t}Pe.shr64_hi=x2;function b2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=b2});var ir=ae(m0=>{"use strict";var c0=An(),g2=ar();function To(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}m0.BlockHash=To;To.prototype.update=function(e,t){if(e=c0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=c0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var T2=An(),Hn=T2.rotr32;function v2(a,e,t,n){if(a===0)return h0(e,t,n);if(a===1||a===3)return b0(e,t,n);if(a===2)return x0(e,t,n)}da.ft_1=v2;function h0(a,e,t){return a&e^~a&t}da.ch32=h0;function x0(a,e,t){return a&e^a&t^e&t}da.maj32=x0;function b0(a,e,t){return a^e^t}da.p32=b0;function w2(a){return Hn(a,2)^Hn(a,13)^Hn(a,22)}da.s0_256=w2;function _2(a){return Hn(a,6)^Hn(a,11)^Hn(a,25)}da.s1_256=_2;function k2(a){return Hn(a,7)^Hn(a,18)^a>>>3}da.g0_256=k2;function A2(a){return Hn(a,17)^Hn(a,19)^a>>>10}da.g1_256=A2});var v0=ae((B3,T0)=>{"use strict";var rr=An(),M2=ir(),E2=Od(),Bd=rr.rotl32,Qr=rr.sum32,I2=rr.sum32_5,C2=E2.ft_1,g0=M2.BlockHash,S2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;g0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}rr.inherits(qn,g0);T0.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var sr=An(),R2=ir(),or=Od(),P2=ar(),Mn=sr.sum32,N2=sr.sum32_4,D2=sr.sum32_5,O2=or.ch32,B2=or.maj32,F2=or.s0_256,L2=or.s1_256,U2=or.g0_256,V2=or.g1_256,w0=R2.BlockHash,j2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;w0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=j2,this.W=new Array(64)}sr.inherits(Gn,w0);_0.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Ld=An(),k0=Fd();function la(){if(!(this instanceof la))return new la;k0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ld.inherits(la,k0);A0.exports=la;la.blockSize=512;la.outSize=224;la.hmacStrength=192;la.padLength=64;la.prototype._digest=function(e){return e==="hex"?Ld.toHex32(this.h.slice(0,7),"big"):Ld.split32(this.h.slice(0,7),"big")}});var jd=ae((U3,S0)=>{"use strict";var Qt=An(),H2=ir(),q2=ar(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,E0=Qt.shr64_hi,I0=Qt.shr64_lo,Sa=Qt.sum64,Ud=Qt.sum64_hi,Vd=Qt.sum64_lo,G2=Qt.sum64_4_hi,z2=Qt.sum64_4_lo,W2=Qt.sum64_5_hi,K2=Qt.sum64_5_lo,C0=H2.BlockHash,J2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;C0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=J2,this.W=new Array(160)}Qt.inherits(En,C0);S0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Hd=An(),R0=jd();function pa(){if(!(this instanceof pa))return new pa;R0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Hd.inherits(pa,R0);P0.exports=pa;pa.blockSize=1024;pa.outSize=384;pa.hmacStrength=192;pa.padLength=128;pa.prototype._digest=function(e){return e==="hex"?Hd.toHex32(this.h.slice(0,12),"big"):Hd.split32(this.h.slice(0,12),"big")}});var D0=ae(ur=>{"use strict";ur.sha1=v0();ur.sha224=M0();ur.sha256=Fd();ur.sha384=N0();ur.sha512=jd()});var V0=ae(U0=>{"use strict";var li=An(),o5=ir(),vo=li.rotl32,O0=li.sum32,Xr=li.sum32_3,B0=li.sum32_4,L0=o5.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;L0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Kn,L0);U0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=O0(vo(B0(n,F0(_,i,r,s),e[l5[_]+t],u5(_)),y5[_]),o);n=o,o=s,s=vo(r,10),r=i,i=v,v=O0(vo(B0(l,F0(79-_,p,f,x),e[p5[_]+t],d5(_)),f5[_]),C),l=C,C=x,x=vo(f,10),f=p,p=v}v=Xr(this.h[1],r,x),this.h[1]=Xr(this.h[2],s,C),this.h[2]=Xr(this.h[3],o,l),this.h[3]=Xr(this.h[4],n,p),this.h[4]=Xr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function F0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function u5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function d5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var l5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var H0=ae((q3,j0)=>{"use strict";var c5=An(),m5=ar();function dr(a,e,t){if(!(this instanceof dr))return new dr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(c5.toArray(e,t))}j0.exports=dr;dr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),m5(e.length<=this.blockSize);for(var t=e.length;t{var Rt=q0;Rt.utils=An();Rt.common=ir();Rt.sha=D0();Rt.ripemd=V0();Rt.hmac=H0();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var ul=ae((ol,bf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=E,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,E=E+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof fl<"u"?Tf.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(fl)});var zf=ae((P4,Gf)=>{"use strict";var zo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",bl={};for(os=0;os>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Hf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=br(e)^n>>5}for(e=br(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=Hf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=br(n)^s,i+=zo.charAt(s)}for(r=0;r<6;++r)n=br(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=zo.charAt(o)}return i}function qf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=Hf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function Z5(){var a=qf.apply(null,arguments);if(typeof a=="object")return a}function ex(a){var e=qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Wo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(zl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Kl=ae(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$dictionary=void 0;du.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Ps=ae((zA,dm)=>{dm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(La=>{var Me=Ps(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],lm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),pm=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],qx=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];La.words=()=>({type:Me.SET,set:lm(),not:!1});La.notWords=()=>({type:Me.SET,set:lm(),not:!0});La.ints=()=>({type:Me.SET,set:Jl(),not:!1});La.notInts=()=>({type:Me.SET,set:Jl(),not:!0});La.whitespace=()=>({type:Me.SET,set:pm(),not:!1});La.notWhitespace=()=>({type:Me.SET,set:pm(),not:!0});La.anyChar=()=>({type:Me.SET,set:qx(),not:!0})});var fm=ae(Ns=>{var ym=Ps(),Cr=$l(),Gx="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",zx={0:0,t:9,n:10,v:11,f:12,r:13};Ns.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?Gx.indexOf(l):zx[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Ns.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Cr.words());else if(i[2])t.push(Cr.ints());else if(i[3])t.push(Cr.whitespace());else if(i[4])t.push(Cr.notWords());else if(i[5])t.push(Cr.notInts());else if(i[6])t.push(Cr.notWhitespace());else if(i[7])t.push({type:ym.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:ym.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Ns.error(e,"Unterminated character class")};Ns.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var cm=ae(Ds=>{var lu=Ps();Ds.wordBoundary=()=>({type:lu.POSITION,value:"b"});Ds.nonWordBoundary=()=>({type:lu.POSITION,value:"B"});Ds.begin=()=>({type:lu.POSITION,value:"^"});Ds.end=()=>({type:lu.POSITION,value:"$"})});var mm=ae(($A,Ql)=>{var Sr=fm(),xn=Ps(),wi=$l(),pu=cm();Ql.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Sr.error(a,`Nothing to repeat at column ${O-1}`)},p=Sr.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};hm.exports=Ua});var gm=ae((XA,bm)=>{var yu=mm(),Os=xm(),_i=yu.types;bm.exports=class Bs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=yu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Bs.prototype.max!=null?Bs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case _i.ROOT:case _i.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var Wx=ki&&ki.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ki,"__esModule",{value:!0});ki.RandomGenerator=void 0;var Kx=Wx(gm()),Jx;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new Kx.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(Jx=ki.RandomGenerator||(ki.RandomGenerator={}))});var Fs=ae(Rr=>{"use strict";var $x=Rr&&Rr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TypeGuardError=void 0;var Qx=function(a){$x(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Rr.TypeGuardError=Qx});var vm=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$any=void 0;var Xx=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};fu.$any=Xx});var wm=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$every=void 0;var Yx=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$guard=void 0;var Zx=Fs(),eb=function(a){return function(e,t){if(e===!0)throw new Zx.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};mu.$guard=eb});var km=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_between=void 0;var tb=function(a,e,t){return e<=a&&a<=t};hu.$is_between=tb});var Am=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_custom=void 0;var nb=Kl(),ab=function(a,e,t,n){var i,r=(i=nb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};xu.$is_custom=ab});var Mm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_date=void 0;var ib=function(a){return rb.test(a)};bu.$is_date=ib;var rb=/^(\d{4})-(\d{2})-(\d{2})$/});var Em=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_datetime=void 0;var sb=function(a){return!isNaN(new Date(a).getTime())};gu.$is_datetime=sb});var Im=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_email=void 0;var ob=function(a){return ub.test(a)};Tu.$is_email=ob;var ub=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Cm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_ipv4=void 0;var db=function(a){return lb.test(a)};vu.$is_ipv4=db;var lb=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Sm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_ipv6=void 0;var pb=function(a){return yb.test(a)};wu.$is_ipv6=pb;var yb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Rm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_url=void 0;var fb=function(a){return cb.test(a)};_u.$is_url=fb;var cb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Pm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_uuid=void 0;var mb=function(a){return hb.test(a)};ku.$is_uuid=mb;var hb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Nm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$join=void 0;var xb=function(a){return bb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Au.$join=xb;var bb=function(a){return gb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},gb=function(a){return Tb.has(a)},Tb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Dm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$number=void 0;var vb=Fs(),wb=function(a){if(isFinite(a)===!1)throw new vb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};Mu.$number=wb});var Om=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$report=void 0;var _b=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Eu.$report=_b});var Bm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$rest=void 0;var kb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Iu.$rest=kb});var Fm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$string=void 0;var Ab=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Cu.$string=Ab});var Lm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$tail=void 0;var Mb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Su.$tail=Mb});var Hm=ae(Ai=>{"use strict";var Vt=Ai&&Ai.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Ub.$number,string:Hb.$string,tail:qb.$tail,rest:jb.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Eb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Um.RandomGenerator,pick:Um.RandomGenerator.pick}};var e=function(t){return function(n){throw new Vm.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(Gb=Ai.Namespace||(Ai.Namespace={}))});var qm=ae(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.MapUtil=void 0;var zb;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(zb=Ls.MapUtil||(Ls.MapUtil={}))});var zm=ae(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Km=ae(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var $m=ae(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var Xm=ae(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0})});var Zm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ae(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var dp=ae(z=>{"use strict";var Wb=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Mi=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Wb(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pr=Kl(),Ee=Hm(),Kb=qm();Mi(zm(),z);Mi(Km(),z);Mi($m(),z);Mi(Xm(),z);Mi(Zm(),z);Mi(th(),z);Mi(Fs(),z);function Xl(){re("assert")}z.assert=Xl;Object.assign(Xl,Ee.Namespace.assert("assert"));function Yl(){re("assertType")}z.assertType=Yl;Object.assign(Yl,Ee.Namespace.assert("assertType"));function Ru(){re("is")}z.is=Ru;Object.assign(Ru,Ee.Namespace.assert("is"));function Pu(){re("validate")}z.validate=Pu;Object.assign(Pu,Ee.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Ee.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Ee.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Ee.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Pr.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pr.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=Kb.MapUtil.take(Pr.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function Jb(){re("application")}z.application=Jb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Ru);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Pu);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Nu(){re("assertStringify")}z.assertStringify=Nu;Object.assign(Nu,Ee.Namespace.assert("assertStringify"));Object.assign(Nu,Ee.Namespace.stringify("assertStringify"));function Du(){re("isStringify")}z.isStringify=Du;Object.assign(Du,Ee.Namespace.is());Object.assign(Du,Ee.Namespace.stringify("isStringify"));function Ou(){re("validateStringify")}z.validateStringify=Ou;Object.assign(Ou,Ee.Namespace.validate());Object.assign(Ou,Ee.Namespace.stringify("validateStringify"));function $b(){re("metadata")}z.metadata=$b;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function Qb(){re("literals")}z.literals=Qb;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Bu(){re("assertClone")}z.assertClone=Bu;Object.assign(Bu,Ee.Namespace.assert("assertClone"));Object.assign(Bu,Ee.Namespace.clone("assertClone"));function Fu(){re("isClone")}z.isClone=Fu;Object.assign(Fu,Ee.Namespace.is());Object.assign(Fu,Ee.Namespace.clone("isClone"));function Lu(){re("validateClone")}z.validateClone=Lu;Object.assign(Lu,Ee.Namespace.validate());Object.assign(Lu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Uu(){re("assertPrune")}z.assertPrune=Uu;Object.assign(Uu,Ee.Namespace.assert("assertPrune"));Object.assign(Uu,Ee.Namespace.prune("assertPrune"));function Vu(){re("isPrune")}z.isPrune=Vu;Object.assign(Vu,Ee.Namespace.is());Object.assign(Vu,Ee.Namespace.prune("isPrune"));function ju(){re("validatePrune")}z.validatePrune=ju;Object.assign(ju,Ee.Namespace.prune("validatePrune"));Object.assign(ju,Ee.Namespace.validate());function nh(){re("createAssert")}z.createAssert=nh;Object.assign(nh,Xl);function ah(){re("createAssertType")}z.createAssertType=ah;Object.assign(ah,Yl);function ih(){re("createIs")}z.createIs=ih;Object.assign(ih,Ru);function rh(){re("createValidate")}z.createValidate=rh;Object.assign(rh,Pu);function sh(){re("createAssertEquals")}z.createAssertEquals=sh;Object.assign(sh,Zl);function oh(){re("createEquals")}z.createEquals=oh;Object.assign(oh,ep);function uh(){re("createValidateEquals")}z.createValidateEquals=uh;Object.assign(uh,tp);function dh(){re("createIsParse")}z.createIsParse=dh;Object.assign(dh,ap);function lh(){re("createAssertParse")}z.createAssertParse=lh;Object.assign(lh,np);function ph(){re("createValidateParse")}z.createValidateParse=ph;Object.assign(ph,ip);function yh(){re("createStringify")}z.createStringify=yh;Object.assign(yh,rp);function fh(){re("createAssertStringify")}z.createAssertStringify=fh;Object.assign(fh,Nu);function ch(){re("createIsStringify")}z.createIsStringify=ch;Object.assign(ch,Du);function mh(){re("createValidateStringify")}z.createValidateStringify=mh;Object.assign(mh,Ou);function hh(){re("createRandom")}z.createRandom=hh;Object.assign(hh,sp);function xh(){re("createClone")}z.createClone=xh;Object.assign(xh,op);function bh(){re("createAssertClone")}z.createAssertClone=bh;Object.assign(bh,Bu);function gh(){re("createIsClone")}z.createIsClone=gh;Object.assign(gh,Fu);function Th(){re("createValidateClone")}z.createValidateClone=Th;Object.assign(Th,Lu);function vh(){re("createPrune")}z.createPrune=vh;Object.assign(vh,up);function wh(){re("createAssertPrune")}z.createAssertPrune=wh;Object.assign(wh,Uu);function _h(){re("createIsPrune")}z.createIsPrune=_h;Object.assign(_h,Vu);function kh(){re("createValidatePrune")}z.createValidatePrune=kh;Object.assign(kh,ju);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Mh=ae(gn=>{"use strict";var Ah=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Xb=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),Yb=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&Ah(e,a,t);return Xb(e,a),e},Zb=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ah(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var e1=Yb(dp());gn.default=e1;Zb(dp(),gn)});var Nl={};Hi(Nl,{BaseContract:()=>pr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>au,logger:()=>Mc,providers:()=>ea,utils:()=>te,version:()=>ru,wordlists:()=>hi});var ty=_n(od());var Gp="logger/5.7.0";var zp=!1,Wp=!1,Ks={debug:1,default:2,info:2,warning:3,error:4,off:5},Kp=Ks.default,ud=null;function Gh(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Jp=Gh(),dd;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(dd||(dd={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var $p="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Ks[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Kp>Ks[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(Wp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=$p[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Jp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Jp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return ud||(ud=new M(Gp)),ud}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Wp=!!e,zp=!!t}static setLogLevel(e){let t=Ks[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Kp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=dd;var Qp="bytes/5.7.0";var wt=new M(Qp);function Yp(a){return!!a.toHexString}function qi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return qi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function aa(a){return ie(a)&&!(a.length%2)||on(a)}function Xp(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Xp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),qi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Yp(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),qi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),qi(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var ld="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=ld[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Yp(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+ld[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Nt(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(a){let e=pd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function pd(a){typeof a!="string"&&(a=W(a)),ie(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Un(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ii(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fr(a){return a=Un(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Js="bignumber/5.7.0";var Lr=ty.default.BN,ia=new M(Js),yd={},Zp=9007199254740991;function ny(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||on(a))}var ey=!1,F=class{constructor(e,t){e!==yd&&ia.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ia.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?ey||(ey=!0,ia.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ia.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ia.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(yd,Ur(e)):e.match(/^-?[0-9]+$/)?new F(yd,Ur(new Lr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Zp||e<=-Zp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ur(a){if(typeof a!="string")return Ur(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&ia.throwArgumentError("invalid hex","value",a),a=Ur(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Ur(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Lr("-"+e.substring(3),16):new Lr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),ia.throwError(a,M.errors.NUMERIC_FAULT,n)}function fd(a){return new Lr(a,36).toString(16)}function cd(a){return new Lr(a,16).toString(36)}var jt=new M(Js),Vr={},iy=F.from(0),ry=F.from(-1);function sy(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,M.errors.NUMERIC_FAULT,i)}var jr="0";for(;jr.length<256;)jr+=jr;function md(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+jr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Gi(a,e){e==null&&(e=0);let t=md(e);a=F.from(a);let n=a.lt(iy);n&&(a=a.mul(ry));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&sy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Vr,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Vr&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ay.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ay.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+jr.substring(0,e),this.format),i=zh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ny(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString(Gi(e,t),ra.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ra.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(iy)&&sy("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ra.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(on(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ay=ft.from(1),zh=ft.from("0.5");var oy="properties/5.7.0";var Wh=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},$s=new M(oy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function mt(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return Wh(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function zi(a,e){(!a||typeof a!="object")&&$s.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||$s.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var Kh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function uy(a){if(a==null||Kh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tct(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,ct(n))}return e}return $s.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function ct(a){return Jh(a)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var Te=new M(Vn),ri={},dy={calldata:!0,memory:!0,storage:!0},$h={calldata:!0,memory:!0};function Qs(a,e){if(a==="bytes"||a==="string"){if(dy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&$h[e])return!0;return(dy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function Qh(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(ri,{name:e.name||null,type:Wi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Qh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Hr(a,e){return Zh(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Xs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:qr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(ri,t)}static fromString(e){let t=e.match(Gr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Hr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function py(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function yy(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function fy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Dt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=fy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ri,n)}static fromString(e){let t={type:"constructor"};e=py(e,t);let n=e.match(Gr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Hr(n[2].trim(),!1),yy(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=fy(e),n={type:e.type,name:qr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ri,n)}static fromString(e){let t={type:"function"};e=py(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(Gr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&qr(t.name),t.inputs=Hr(i[2],!1),yy(i[3].trim(),t),n.length>1){let r=n[1].match(Gr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Hr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function ly(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return ly(new tn(ri,t))}static fromString(e){let t={type:"error"},n=e.match(Gr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qr(t.name),t.inputs=Hr(n[2],!1),ly(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Wi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Yh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qr(a){return(!a||!a.match(Yh))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Gr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Zh(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&hd.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},oi=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):oi.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:hd.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new oi(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var my=_n(cy());function fe(a){return"0x"+my.default.keccak_256(j(a))}var Zs={};Hi(Zs,{decode:()=>zr,encode:()=>sa});var hy="rlp/5.7.0";var jn=new M(hy);function xy(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function by(a,e,t){let n=0;for(let i=0;ie+1+n&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function vy(a,e){if(a.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=by(a,e+1,t);return e+1+t+n>a.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),gy(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),gy(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=by(a,e+1,t);e+1+t+n>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function zr(a){let e=j(a),t=vy(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",a),t.result}var wy="address/5.7.0";var Ma=new M(wy);function _y(a){ie(a,20)||Ma.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var e6=9007199254740991;function t6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var xd={};for(let a=0;a<10;a++)xd[String(a)]=String(a);for(let a=0;a<26;a++)xd[String.fromCharCode(65+a)]=String(10+a);var ky=Math.floor(t6(e6));function Ay(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>xd[n]).join("");for(;e.length>=ky;){let n=e.substring(0,ky);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Ma.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=_y(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ma.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==Ay(a)&&Ma.throwArgumentError("bad icap checksum","address",a),e=fd(a.substring(4));e.length<40;)e="0"+e;e=_y("0x"+e)}else Ma.throwArgumentError("invalid address","address",a);return e}function My(a){try{return ce(a),!0}catch{}return!1}function Ey(a){let e=cd(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Ay("XE00"+e)+e}function ui(a){let e=null;try{e=ce(a.from)}catch{Ma.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(sa([e,t])),12))}function Iy(a,e,t){return Nt(e)!==32&&Ma.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ma.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var eo=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var to=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Ji=new M(Vn);function bd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Ji.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ji.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Ji.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Ji.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(a.wordSize),r=new si(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function gd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var no=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Ji.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;ioo,EtherSymbol:()=>Ny,HashZero:()=>Qi,MaxInt256:()=>Py,MaxUint256:()=>po,MinInt256:()=>Ry,NegativeOne:()=>uo,One:()=>lo,Two:()=>Cy,WeiPerEther:()=>Sy,Zero:()=>$i});var oo="0x0000000000000000000000000000000000000000";var uo=F.from(-1),$i=F.from(0),lo=F.from(1),Cy=F.from(2),Sy=F.from("1000000000000000000"),po=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ry=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Py=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qi="0x0000000000000000000000000000000000000000000000000000000000000000";var Ny="\u039E";var yo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=po.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(lo).mul(uo)))&&this._throwError("value out-of-bounds",t)}else(n.lt($i)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Dy="strings/5.7.0";var Oy=new M(Dy),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Bt||(Bt={}));function n6(a,e,t,n,i){return Oy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function By(a,e,t,n,i){if(a===Bt.BAD_PREFIX||a===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Bt.OVERRUN?t.length-e-1:0}function a6(a,e,t,n,i){return a===Bt.OVERLONG?(n.push(i),0):(n.push(65533),By(a,e,t,n,i))}var fo=Object.freeze({error:n6,ignore:By,replace:a6});function vd(a,e){e==null&&(e=fo.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Bt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Bt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Bt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(Oy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function Td(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function wd(a,e){return'"'+vd(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Td(t):(t-=65536,Td((t>>10&1023)+55296)+Td((t&1023)+56320))}).join("")+'"'}function co(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return co(vd(a,e))}function Ea(a,e=Gt.current){return vd(ve(a,e))}function _d(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Qi]).slice(0,32))}function kd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function i6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function Fy(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Md(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var r6=Fy("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),o6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u6=Ad("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d6=Ad("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l6=Ad("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",i6),p6=Fy("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function y6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function f6(a){return!!Md(a,r6)}function c6(a){let e=Md(a,o6);if(e)return[a+e.s];let t=u6[a];if(t)return t;let n=d6[a];if(n)return[a+n[0]];let i=l6[a];return i||null}function m6(a){return!!Md(a,p6)}function Ed(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ea(a);e=y6(e.map(n=>{if(s6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=c6(n);return i||[n]})),e=Ea(co(e),Gt.NFKC),e.forEach(n=>{if(m6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(f6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=co(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var mo=class extends Wr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var di=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return bd(e,this.coders,t)}decode(e){return e.coerce(this.name,gd(e,this.coders))}};var ho=new M(Vn),h6=new RegExp(/^bytes([0-9]*)$/),x6=new RegExp(/^(u?int)([0-9]*)$/),Xi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new eo(e.name);case"bool":return new ao(e.name);case"string":return new mo(e.name);case"bytes":return new io(e.name);case"array":return new no(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new di((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new so(e.name)}let t=e.type.match(x6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&ho.throwArgumentError("invalid "+t[1]+" bit length","param",e),new yo(n/8,t[1]==="int",e.name)}if(t=e.type.match(h6),t){let n=parseInt(t[1]);return(n===0||n>32)&&ho.throwArgumentError("invalid bytes length","param",e),new ro(n,e.name)}return ho.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new oi(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new si(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new di(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&ho.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new di(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),n))}},Kr=new Xi;function nn(a){return fe(ve(a))}var xo="hash/5.7.0";var Id={};Hi(Id,{decode:()=>Yi,encode:()=>Zi});function Yi(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function b6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return E+256+(a[o++]<<8|a[o++]);case 1:return E+a[o++];default:return J-1}})}function T6(a){let e=0;return()=>a[e++]}function Vy(a){return T6(g6(a))}function v6(a){return a&1?~a>>1:a>>1}function w6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function jy(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(A6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(M6(t,a))}return b6(Uy(e))}function k6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Hy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function A6(a,e){let t=1+e(),n=e(),i=k6(e),r=Hy(i.length,1+a,e);return Uy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function M6(a,e){let t=1+e();return Hy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function qy(a){let e=Jr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Jr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Gy(){return Vy(Yi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var bo=Gy(),E6=new Set(Jr(bo)),I6=new Set(Jr(bo)),C6=jy(bo),S6=qy(bo),zy=45,Wy=95;function Ky(a){return Ea(a)}function R6(a){return a.filter(e=>e!=65039)}function Jy(a){for(let e of a.split(".")){let t=Ky(e);try{for(let n=t.lastIndexOf(Wy)-1;n>=0;n--)if(t[n]!==Wy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===zy&&t[3]===zy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function $y(a){return Jy(P6(a,R6))}function P6(a,e){let t=Ky(a).reverse(),n=[];for(;t.length;){let i=D6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(E6.has(r)){n.push(r);continue}if(I6.has(r))continue;let s=C6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Jy(N6(String.fromCodePoint(...n)))}function N6(a){return a.normalize("NFC")}function D6(a,e){var t;let n=S6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var O6=new M(xo),Xy=new Uint8Array(32);Xy.fill(0);function Qy(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Cd(a){let e=ve($y(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(Qy(e.slice(n))),t}function Sd(a){try{return Cd(a).length!==0}catch{}return!1}function Ia(a){typeof a!="string"&&O6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Xy,t=Cd(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function $r(a){return W(ye(Cd(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Yy=`Ethereum Signed Message: +`;function er(a){return typeof a=="string"&&(a=ve(a)),fe(ye([ve(Yy),ve(String(a.length)),a]))}var B6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new M(xo),n0=new Uint8Array(32);n0.fill(0);var F6=F.from(-1),a0=F.from(0),i0=F.from(1),L6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function U6(a){let e=j(a),t=e.length%32;return t?kt([e,n0.slice(t)]):W(e)}var V6=me(i0.toHexString(),32),j6=me(a0.toHexString(),32),Zy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Rd=["name","version","chainId","verifyingContract","salt"];function e0(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var H6={name:e0("name"),version:e0("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Pd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=L6.mask(t?n-1:n),r=t?i.add(i0).mul(F6):a0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),U6(n)}}}switch(a){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?V6:j6};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function t0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Pd(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=t0(o,e[o])+l.map(p=>t0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Pd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Pd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=Zy[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Rd.indexOf(n.name)-Rd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return fe(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return B6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Rd.forEach(l=>{let p=e[l];p!=null&&(i[l]=H6[l](p),r.push({name:l,type:Zy[l]}))});let s=bt.from(t),o=_e(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Vn);var tr=class extends en{},nr=class extends en{},Nd=class extends en{},oa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},q6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function r0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ca=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=q6[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return gt.throwError("call revert exception"+r,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new oa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw r0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw r0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new nr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new tr({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Nd({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var s0="abstract-provider/5.7.0";var G6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},z6=new M(s0),go=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){z6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return G6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var o0="abstract-signer/5.7.0";var kn=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ln=new M(o0),W6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],K6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){ln.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)W6.indexOf(n)===-1&&ln.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>kn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&ln.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(K6.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ua=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=_n(od()),Jn=_n(qd());function lr(a,e,t){return t={path:e,exports:{},require:function(n,i){return h5(n,i??t.path)}},a(t,t.exports),t.exports}function h5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Kd=z0;function z0(a,e){if(!a)throw new Error(e||"Assertion failed")}z0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=lr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),ko=an.getNAF,x5=an.getJSF,Ao=an.assert;function Pa(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pi=Pa;Pa.prototype.point=function(){throw new Error("Not implemented")};Pa.prototype.validate=function(){throw new Error("Not implemented")};Pa.prototype._fixedNafMul=function(e,t){Ao(e.precomputed);var n=e._getDoubles(),i=ko(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];Ao(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Pa.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=ko(n[v],s[v],this._bitLength),l[S]=ko(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=x5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(a,e,t,n){pi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Jd(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var wo=lr(function(a,e){"use strict";var t=e;t.base=pi,t.short=g5,t.mont=null,t.edwards=null}),_o=lr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new wo.short(o):o.type==="edwards"?this.curve=new wo.edwards(o):this.curve=new wo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ra(a){if(!(this instanceof Ra))return new Ra(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(a.entropy,a.entropyEnc||"hex"),t=In.toArray(a.nonce,a.nonceEnc||"hex"),n=In.toArray(a.pers,a.persEnc||"hex");Kd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var W0=Ra;Ra.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ra.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=In.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var T5=an.assert;function Mo(a,e){if(a instanceof Mo)return a;this._importDER(a,e)||(T5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var Eo=Mo;function v5(){this.place=0}function Gd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function G0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}Mo.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=G0(t),n=G0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];zd(i,t.length),i=i.concat(t),i.push(2),zd(i,n.length);var r=i.concat(n),s=[48];return zd(s,r.length),s=s.concat(r),an.encode(s,e)};var w5=function(){throw new Error("unsupported")},K0=an.assert;function pn(a){if(!(this instanceof pn))return new pn(a);typeof a=="string"&&(K0(Object.prototype.hasOwnProperty.call(_o,a),"Unknown curve "+a),a=_o[a]),a instanceof _o.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var _5=pn;pn.prototype.keyPair=function(e){return new $d(this,e)};pn.prototype.keyFromPrivate=function(e,t){return $d.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return $d.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new W0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||w5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new W0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Eo({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new Eo(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(a,e,t,n){K0((3&t)===t,"The recovery param is more than two bits"),e=new Eo(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};pn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new Eo(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var k5=lr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=wo,t.curves=_o,t.ec=_5,t.eddsa=null}),J0=k5.ec;var $0="signing-key/5.7.0";var Xd=new M($0),Qd=null;function $n(){return Qd||(Qd=new J0("secp256k1")),Qd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&Xd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(j(this.publicKey)),n=$n().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&Xd.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Un({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Io(a,e){let t=Un(e),n={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function Yr(a,e){let t=j(a);if(t.length===32){let n=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return Xd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Q0="transactions/5.7.0";var Ut=new M(Q0),Co;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Co||(Co={}));function Zd(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?$i:F.from(a)}var A5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],M5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(a){let e=Yr(a);return ce(Ie(fe(Ie(e,1)),12))}function yi(a,e){return mn(Io(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function Yd(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Yd(t[0],t[1])):Yd(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return Yd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function X0(a){return sn(a).map(e=>[e.address,e.storageKeys])}function Y0(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",X0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",sa(t)])}function Z0(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",X0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",sa(t)])}function E5(a,e){zi(a,M5);let t=[];A5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!aa(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Zr(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),E5(a,e);switch(a.type){case 1:return Z0(a,e);case 2:return Y0(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function ef(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=fe(t(a));a.from=yi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function I5(a){let e=zr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Zd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),ef(i,e.slice(9),Y0)),i}function C5(a){let e=zr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Zd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),ef(t,e.slice(8),Z0)),t}function S5(a){let e=zr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Zd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function So(a){let e=j(a);if(e[0]>127)return S5(e);switch(e[0]){case 1:return C5(e);case 2:return I5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var tf="contracts/5.7.0";var Na=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new M(tf),R5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Ro(a,e){return Na(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(a,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>es(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Ro(a,e):t.type==="tuple"?yield es(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Do(a,e,t){return Na(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:Ro(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Na(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Ro(a.provider,n.from));let i=yield Ce({args:es(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function P5(a,e){return function(...t){return Do(a,e,t)}}function N5(a,e){let t=a.signer||a.provider;return function(...n){return Na(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Do(a,e,n);return yield t.estimateGas(i)})}}function af(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function rf(a,e,t){let n=a.signer||a.provider;return function(...i){return Na(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Do(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===M.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function D5(a,e){return function(...t){return Na(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Do(a,e,t),i=yield a.signer.sendTransaction(n);return af(a,i),i})}}function nf(a,e,t){return e.constant?rf(a,e,t):D5(a,e)}function sf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var fi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},el=class extends fi{constructor(){super("error",null)}},Po=class extends fi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(sf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Ki(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},No=class extends fi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},pr=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Ro(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,nf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,nf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,rf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,P5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,N5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return ui(e)}static getInterface(e){return Ca.isInterface(e)?e:new Ca(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ua(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new el);if(e==="event")return this._normalizeRunningEvent(new fi("event",null));if(e==="*")return this._normalizeRunningEvent(new No(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Po(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Po(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fi(sf(t),t))}return this._normalizeRunningEvent(new No(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=ct(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pr{},ci=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:on(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!R5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Na(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return af(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ui(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Oo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(fa(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return pc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,me(K(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(ca,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fa));let n=new Uint8Array(37);if(e&fa){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(ci(Qn.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Bo(F.from(a).add(this.privateKey).mod(Lb)):d=new fn(K(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(ca,o,d,this.fingerprint,Bo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=fa)throw new Error("invalid path index - "+a);n=n._derive(fa+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=fa)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(ci(Qn.sha512,Ub,n));return new Ct(ca,Bo(r.slice(0,32)),null,"0x00000000",Bo(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=rd(n),e=br(ma(e,n),n),Ct._fromSeed(ad(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=yi.decode(e);(t.length!==82||pc(t.slice(0,78))!==e)&&is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=K(t.slice(5,9)),a=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),o=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(ca,null,K(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(ca,K(o.slice(1)),null,r,s,a,n,null)}return is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function ad(i,e){e||(e="");let t=Te("mnemonic"+e,Gt.NFKD);return mr(Te(i,Gt.NFKD),t,2048,64,"sha512")}function ma(i,e){e=rd(e),is.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=yc(s);if((V(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return K(n.slice(0,a/8))}function br(i,e){if(e=rd(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&jb(8-n)),n+=3);let r=i.length/4,a=V(Xt(i))[0]&yc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function cc(i,e){try{return ma(i,e),!0}catch{}return!1}function fc(i){return(typeof i!="number"||i<0||i>=fa||i%1)&&is.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var mc="random/5.7.0";var sd=new M(mc);function Vb(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hc=Vb(),Fo=hc.crypto||hc.msCrypto;(!Fo||!Fo.getRandomValues)&&(sd.warn("WARNING: Missing strong random number source"),Fo={getRandomValues:function(i){return sd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(i){(i<=0||i>1024||i%1||i!=i)&&sd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return Fo.getRandomValues(e),V(e)}function rs(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var ld=_n(ud());var Lo="json-wallets/5.7.0";function mi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function ha(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new hi.default.Counter(b),J=new hi.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:xc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(b).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=Xn(16),N=new hi.default.Counter(R),q=new hi.default.ModeOfOperation.ctr(H,N),se=V(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+ha(C.getUTCMonth()+1,2)+"-"+ha(C.getUTCDate(),2)+"T"+ha(C.getUTCHours(),2)+"-"+ha(C.getUTCMinutes(),2)+"-"+ha(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:K(R).substring(2),mnemonicCiphertext:K(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Ec(i,e,t){if(Uo(i)){t&&t(0);let n=pd(i,e);return t&&t(1),Promise.resolve(n)}return jo(i)?Mc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cc(i,e){if(Uo(i))return pd(i,e);if(jo(i))return kc(i,e);throw new Error("invalid JSON wallet")}var Ic="wallet/5.7.0";var Sc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ba=new M(Ic);function Kb(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function Wb(i){let e=i.mnemonic;return e&&e.phrase}var In=class extends St{constructor(e,t){if(super(),Kb(e)){let n=new fn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==fe(e.address)&&ba.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Wb(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||fi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);mn(s.privateKey)!==this.address&&ba.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(fn.isSigningKey(e))e.curve!=="secp256k1"&&ba.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new fn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&ba.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new In(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&ba.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(Za(t)));return Za(t,n)})}signMessage(e){return Sc(this,void 0,void 0,function*(){return Fa(this._signingKey().signDigest(ea(e)))})}_signTypedData(e,t,n){return Sc(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,a=>(this.provider==null&&ba.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Fa(this._signingKey().signDigest(bt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),hd(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=V(Ee(ce(ye([t,e.extraEntropy])),0,16)));let n=br(t,e.locale);return In.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ec(e,t,n).then(r=>new In(r))}static fromEncryptedJsonSync(e,t){return new In(Cc(e,t))}static fromMnemonic(e,t,n){return t||(t=fi),new In(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Rc(i,e){return yr(ea(i),e)}function Pc(i,e,t,n){return yr(bt.hash(i,e,t),n)}var ei={};Hr(ei,{AlchemyProvider:()=>_a,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>bs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>ka,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>Id,JsonRpcBatchProvider:()=>nu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>va,NodesmithProvider:()=>As,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>Ta,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Ms,WebSocketProvider:()=>gi,getDefaultProvider:()=>iu,getNetwork:()=>ss,isCommunityResourcable:()=>gd,isCommunityResource:()=>ls,showThrottleMessage:()=>Yn});var Nc="networks/5.7.1";var Dc=new M(Nc);function Jb(i){return i&&typeof i.renetwork=="function"}function bi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return bi(t)},e}function qo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return qo(i,n)},t}var Oc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:bi("homestead")},Bc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:bi("ropsten")},Fc={chainId:63,name:"classicMordor",_defaultProvider:qo("https://www.ethercluster.com/mordor","classicMordor")},Ho={unspecified:{chainId:0,name:"unspecified"},homestead:Oc,mainnet:Oc,morden:{chainId:2,name:"morden"},ropsten:Bc,testnet:Bc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:bi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:bi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:bi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:bi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Fc,classicTestnet:Fc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:bi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:bi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(i){if(i==null)return null;if(typeof i=="number"){for(let n in Ho){let r=Ho[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=Ho[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Ho[i.name];if(!e)return typeof i.chainId!="number"&&Dc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&Dc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(Jb(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lc="web/5.7.1";var $b=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function Uc(i,e){return $b(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var Qb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Sn=new M(Lc);function jc(i){return new Promise(e=>{setTimeout(e,i)})}function Di(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ii(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return K(i)}return i}function Xb(i){return Te(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function bd(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Sn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+Zr(Te(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yr(_[3]):Xb(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Di(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Qb(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Di(H,U.headers?U.headers["content-type"]:null),requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=Te(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return bd(i,r,n)}function Pn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var _d=_n(Gc());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(d,null),transactionIndex:Y.allowNull(d,null),confirmations:Y.allowNull(d,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:d,data:a,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(d),creates:Y.allowNull(t,null),raw:Y.allowNull(a)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(d),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(c),type:Y.allowNull(d),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:Y.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:d,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(a),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:Y.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(d),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:a,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(r,void 0),toBlock:Y.allowNull(r,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(d),blockHash:Y.allowNull(s),transactionIndex:d,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(a,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ee(e,12));return t===oo?null:t}contractAddress(e){return ur(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=Y.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return So(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function gd(i){return i&&typeof i.isCommunityResource=="function"}function ls(i){return gd(i)&&i.isCommunityResource()}var zc=!1;function Yn(){zc||(zc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},he=new M(Ae),a5=10;function Kc(i){return i==null?"null":(Nt(i)!==32&&he.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function Wc(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[Kc(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Kc(e)}).join("&")}function s5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function ga(i){if(typeof i=="string"){if(i=i.toLowerCase(),Nt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+Wc(i);if(go.isForkEvent(i))throw he.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+Wc(i.topics||[])}throw new Error("invalid event - "+i)}function ds(){return new Date().getTime()}function Jc(i){return new Promise(e=>{setTimeout(e,i)})}var o5=["block","network","pending","poll"],Ad=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=s5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||o5.indexOf(this.tag)>=0}},u5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Td(i){return me(F.from(i).toHexString(),32)}function $c(i){return yi.encode(ye([i,Ee(Xt(Xt(i)),0,4)]))}var Yc=new RegExp("^(ipfs)://(.*)$","i"),Qc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Wo(i,e){try{return Jt(ps(i,e))}catch{}return null}function ps(i,e){if(i==="0x")return null;let t=F.from(Ee(i,e,e+32)).toNumber(),n=F.from(Ee(i,t,t+32)).toNumber();return Ee(i,t+32,t+32+n)}function vd(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):he.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function Xc(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function l5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function Zc(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Ci(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",Zc([$a(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=ps(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=u5[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return $c(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return $c(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=_d.default.toWords(r.slice(2));return o.unshift(s),_d.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Qr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",Td(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=Te(e);t=ye([Td(64),Td(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",K(t));return n==null||n==="0x"?null:Jt(n)})}},wd=null,d5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ft(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return wd==null&&(wd=new Y),wd}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Rn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(ds()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=ds(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=ds();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=d5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jc(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jc(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return K(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),a=yield this.perform("getStorageAt",r);try{return K(a)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>K(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?K(a):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=a5&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Nt(a)%32===4)try{let s=Ee(a,4),o=Ee(s,0,32);F.from(o).eq(r)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ee(s,32,64)).toNumber(),c=F.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new Ta(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ci(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=Wo(yield this.call({to:n,data:"0x691f3431"+Ci(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new Ta(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Wo(yield this.call({to:s,data:"0x691f3431"+Ci(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new Ad(ga(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=ga(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=ga(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=ga(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=ga(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=ga(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var xi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new M(Ae),p5=["call","estimateGas"];function cs(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=cs(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return cs(JSON.parse(i),e)}catch{}return null}function tf(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=cs(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=cs(e.body,!1);a==null&&(a=cs(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),p5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function ef(i){return new Promise(function(e){setTimeout(e,i)})}function y5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function ys(i){return i&&i.toLowerCase()}var kd={},va=class extends St{constructor(e,t,n){if(super(),e!==kd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Md(kd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),tf("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>xi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),K(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return xi(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(bt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return xi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Md=class extends va{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},c5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=ft(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xi(this,void 0,void 0,function*(){yield ef(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ft(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new va(kd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Rn(this.connection,JSON.stringify(n),y5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return tf(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return ef(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(c5);if(t)for(let a in t)t[a]&&(n[a]=!0);zr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Ln(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=K(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var wa=null;try{if(wa=WebSocket,wa==null)throw new Error("inject please")}catch{let e=new M(Ae);wa=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ed=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Jo=new M(Ae),f5=1,gi=class extends Yt{constructor(e,t){t==="any"&&Jo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wa(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Jo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Jo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ed(this,void 0,void 0,function*(){return null})}set polling(e){!e||Jo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=f5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Ed(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return Ed(this,void 0,void 0,function*(){this.websocket.readyState===wa.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var m5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},fs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return m5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ms{constructor(e,t){fs.checkAbstract(new.target,It),e=ft(new.target,"getNetwork")(e),t=ft(new.target,"getApiKey")(t);let n=ft(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nf=new M(Ae),$o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends gi{constructor(e,t){let n=new _a(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===$o}},_a=class extends It{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?$o:(e&&typeof e!="string"&&nf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:nf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===$o&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===$o}};var h5=new M(Ae),Qo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function b5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return h5.throwArgumentError("unsupported network","name",i)}var bs=class extends It{isCommunityResource(){return this.apiKey===Qo}static getApiKey(e){return e??Qo}static getUrl(e,t){t==null&&(t=Qo);let n={allowGzip:!0,url:"https://"+b5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Qo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var x5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},rf=new M(Ae),xs=class extends It{static getApiKey(e){return e!=null&&rf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:rf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return x5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Xo=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Oi=new M(Ae);function af(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(K(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=K(n),e[t]=n)}return e}function g5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function sf(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function of(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Cd(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;Oi.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oi.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oi.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Oi.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Xo(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?sf:g5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Rn(o,d,s||sf);return this.emit("debug",{action:"response",request:r,response:ct(p),provider:this}),p})}detectNetwork(){return Xo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Xo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Cd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=af(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Cd("call",a,t.transaction)}}case"estimateGas":{let r=af(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Cd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=of(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=of(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oi.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oi.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var eu=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},xr=new M(Ae);function Yo(){return new Date().getTime()}function uf(i){let e=null;for(let t=0;te?null:(n+r)/2}function Aa(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Aa(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Aa(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var T5=1;function df(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var v5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],w5=["address","args","errorArgs","errorSignature","method","transaction"];function Zo(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function _5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function A5(i,e,t){let n=Aa;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=lf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return lf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Aa(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Aa(r))}:n=function(r){return r==null?null:Aa(r)};break;default:throw new Error("unknown method: "+e)}return _5(n,i.quorum)}function Ts(i,e){return eu(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function k5(i,e,t,n){return eu(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield Ts(i,e)),r.getLogs(a)}}return xr.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&xr.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=ls(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=ls(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&xr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&xr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=uf(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return eu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return uf(e)})}perform(e,t){return eu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=Yo(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=k5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Yo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Yo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield df(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return v5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};w5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),xr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),xr.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>Zo(d)),provider:this})})}};var Id=null;var tu=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends gi{constructor(e,t){let n=new ka(e,t),r=n.connection;r.password&&tu.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},ka=class extends It{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(tu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),tu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:tu.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===ws}};var nu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Sd=new M(Ae),M5="ETHERS_JS_SHARED",As=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Sd.throwArgumentError("invalid apiKey","apiKey",e),e||M5}static getUrl(e,t){Sd.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Sd.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var pf=new M(Ae),yf="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=yf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:pf.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===yf}};var cf=new M(Ae),E5=1;function ff(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:E5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function C5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Ms=class extends Yt{constructor(e,t){e==null&&cf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=C5(e)):e.sendAsync?r=ff(e,e.sendAsync.bind(e)):e.send?r=ff(e,e.send.bind(e)):cf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var mf=new M(Ae);function iu(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new gi(i);default:mf.throwArgumentError("unsupported URL scheme","network",i)}}let t=ss(i);return(!t||!t._defaultProvider)&&mf.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_a,AnkrProvider:bs,CloudflareProvider:xs,EtherscanProvider:gs,InfuraProvider:ka,JsonRpcProvider:Yt,NodesmithProvider:As,PocketProvider:ks,Web3Provider:Ms,IpcProvider:null},e)}var te={};Hr(te,{AbiCoder:()=>Xr,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>xe,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oi,Interface:()=>Ii,LogDescription:()=>ta,Logger:()=>M,ParamType:()=>dt,RLP:()=>Zs,SigningKey:()=>fn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>na,TransactionTypes:()=>Io,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>co,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>bd,_toEscapedUtf8String:()=>wl,accessListify:()=>sn,arrayify:()=>V,base58:()=>yi,base64:()=>Cl,checkProperties:()=>zr,checkResultErrors:()=>Wr,commify:()=>_f,computeAddress:()=>mn,computeHmac:()=>ci,computePublicKey:()=>Ya,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Wa,defaultPath:()=>fi,defineReadOnly:()=>B,dnsEncode:()=>$a,entropyToMnemonic:()=>br,fetchJson:()=>Rn,formatBytes32String:()=>_l,formatEther:()=>Af,formatUnits:()=>Rd,getAccountPath:()=>fc,getAddress:()=>fe,getContractAddress:()=>ur,getCreate2Address:()=>C0,getIcapAddress:()=>E0,getJsonWalletAddress:()=>yd,getStatic:()=>ft,hashMessage:()=>ea,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ee,hexStripZeros:()=>pl,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>M0,isBytes:()=>on,isBytesLike:()=>ii,isHexString:()=>re,isValidMnemonic:()=>cc,isValidName:()=>Sl,joinSignature:()=>Fa,keccak256:()=>ce,mnemonicToEntropy:()=>ma,mnemonicToSeed:()=>ad,namehash:()=>Ci,nameprep:()=>El,parseBytes32String:()=>Al,parseEther:()=>kf,parseTransaction:()=>So,parseUnits:()=>Pd,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yr,recoverPublicKey:()=>Co,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Za,sha256:()=>Xt,sha512:()=>td,shallowCopy:()=>we,shuffled:()=>rs,solidityKeccak256:()=>xf,solidityPack:()=>ru,soliditySha256:()=>gf,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>Te,toUtf8CodePoints:()=>Ei,toUtf8String:()=>Jt,verifyMessage:()=>Rc,verifyTypedData:()=>Pc,zeroPad:()=>rr});var hf="solidity/5.7.0";var I5=new RegExp("^bytes([0-9]+)$"),S5=new RegExp("^(u?int)([0-9]*)$"),R5=new RegExp("^(.*)\\[([0-9]*)\\]$"),P5="0000000000000000000000000000000000000000000000000000000000000000",Ma=new M(hf);function bf(i,e,t){switch(i){case"address":return t?rr(e,32):V(e);case"string":return Te(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?rr(e,32):V(e)}let n=i.match(S5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ma.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),rr(e,r/8)}if(n=i.match(I5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ma.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ma.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+P5).substring(0,66)):e}if(n=i.match(R5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ma.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(bf(r,o,!0))}),ye(s)}return Ma.throwArgumentError("invalid type","type",i)}function ru(i,e){i.length!=e.length&&Ma.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(bf(n,e[r]))}),K(ye(t))}function xf(i,e){return ce(ru(i,e))}function gf(i,e){return Xt(ru(i,e))}var Tf="units/5.7.0";var vf=new M(Tf),wf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function _f(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&vf.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Rd(i,e){if(typeof e=="string"){let t=wf.indexOf(e);t!==-1&&(e=3*t)}return Gr(i,e??18)}function Pd(i,e){if(typeof i!="string"&&vf.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=wf.indexOf(e);t!==-1&&(e=3*t)}return ln(i,e??18)}function Af(i){return Rd(i,18)}function kf(i){return Pd(i,18)}var au="ethers/5.7.2";var Mf=new M(au);try{let i=window;i._ethers==null&&(i._ethers=Nd)}catch{}var Nn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Nn||(Nn={}));var su;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(su||(su={}));var Ea;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Ea||(Ea={}));var ou;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(ou||(ou={}));var Es;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(Es||(Es={}));var Cs;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Cs||(Cs={}));var Is;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Is||(Is={}));var Ss;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Ss||(Ss={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var Od="0x12345678",Dd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Dd||(Dd={}));var Tt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Tt||(Tt={}));var ve;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ve||(ve={}));var Bd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gr=class{static createInterface(){return new te.Interface(Bd)}static connect(e,t){return new oe(e,Bd,t)}};Mt(gr,"abi",Bd);var Fd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Tr=class{static createInterface(){return new te.Interface(Fd)}static connect(e,t){return new oe(e,Fd,t)}};Mt(Tr,"abi",Fd);var Ef=(i,e)=>{throw new Error(`${e}: ${i}`)},Ld=i=>i!=null;var{keccak256:D5,toUtf8Bytes:O5}=te,{MaxUint256:B5}=mt;var Ud=i=>te.formatEther(i);var jd=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(Tt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ld)},vr=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return B5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Bi=i=>D5(O5(i));var Ca=async(i,e)=>(await Tr.connect(i,e).version()).toNumber(),Vd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ld);var{hexDataSlice:Hd}=te,{MaxUint256:F5}=mt,Cf=i=>{let e=Hd(i,0,3),t=F.from(Hd(i,4,35)),n=F.from(Hd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},If=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),F5,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await vr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},L5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>If(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ti(i,e,t,n[0],r):L5(i,e,t,n,r):If(i,e,t,n,r);var{MaxUint256:Sf}=mt,{AddressZero:U5}=mt;async function j5(i,e){let t;try{return t=await i.getCapabilityRoles(te.hexZeroPad(e,4)),uu(t)}catch{return[]}}async function Rs(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Cf(s),I=gr.connect(a,n.signer||n.provider),_=await j5(I,p);if(_.includes(Tt.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Sf}else{let{skillId:U}=await e.getDomain(c),H=await i.getChildSkillId(U,b);if(H.eq(d))o=Sf;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,U5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:V5}=mt,ni=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ea[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ni.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return ni.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${V5}/noProof`,s=await ni.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var Rf=10,fA=wt(Rf),Pf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nf=Rf-1;var Df=6,bA=wt(Df),Of={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Bf=Df-1;var Ff=7,TA=wt(Ff),Lf={1:[],2:[],3:[],4:[],5:[],6:[]},Uf=Ff-1;var jf=7,_A=wt(jf),Vf={1:[],2:[],3:[],4:[],5:[],6:[]},Hf=jf-1;var qf=4,MA=wt(qf),Gf={1:[],2:[],3:[]},zf=qf-1;var Kf=5,IA=wt(Kf),Wf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Jf=Kf-1;var $f=2,PA=wt($f),Qf={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Xf=$f-1;var Yf=4,OA=wt(Yf),Zf={1:[1,2,3],2:[1,2,3],3:[1,2,3]},em=Yf-1;var tm=7,LA=wt(tm),nm={1:[],2:[],3:[],4:[],5:[],6:[]},im=tm-1;var rm=11,VA=wt(rm),qd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gd=rm-1;var am=6,GA=wt(am),sm={1:[],2:[],3:[],4:[],5:[]},om=am-1;var Fi=(i,e,t)=>{switch(i){case ve.CoinMachine:{let n=Pf[e];return!!n&&!n.includes(t)}case ve.EvaluatedExpenditure:{let n=Of[e];return!!n&&!n.includes(t)}case ve.FundingQueue:{let n=Lf[e];return!!n&&!n.includes(t)}case ve.IVotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.OneTxPayment:{let n=Vf[e];return!!n&&!n.includes(t)}case ve.ReputationBootstrapper:{let n=Gf[e];return!!n&&!n.includes(t)}case ve.StagedExpenditure:{let n=Qf[e];return!!n&&!n.includes(t)}case ve.StakedExpenditure:{let n=Wf[e];return!!n&&!n.includes(t)}case ve.StreamingPayments:{let n=Zf[e];return!!n&&!n.includes(t)}case ve.TokenSupplier:{let n=nm[e];return!!n&&!n.includes(t)}case ve.VotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.Whitelist:{let n=sm[e];return!!n&&!n.includes(t)}default:return Ef(i,"Could not find extension with name")}};var H5={[ve.CoinMachine]:Nf,[ve.EvaluatedExpenditure]:Bf,[ve.FundingQueue]:Uf,[ve.IVotingReputation]:Gd,[ve.OneTxPayment]:Hf,[ve.ReputationBootstrapper]:zf,[ve.StagedExpenditure]:Xf,[ve.StakedExpenditure]:Jf,[ve.StreamingPayments]:em,[ve.TokenSupplier]:im,[ve.VotingReputation]:Gd,[ve.Whitelist]:om};var Ih=_n(um(),1);var yp=_n(Mh(),1);var Se;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Se||(Se={}));var pp=2,dp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(dp||(dp={}));var Eh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,tx=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),cp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Se.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Eh(t.errors);throw new Error(n)};var Ch=(i,e)=>{let t=i===Se.Colony?tx(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:pp});if(!n.success){let r=Eh(n.errors);throw new Error(r)}return n.data};var fp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=fp;var hp=(0,Ih.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Us={[Se.Annotation]:"Annotation(address,bytes32,string)",[Se.Colony]:"ColonyMetadata(address,string)",[Se.Decision]:"Annotation(address,bytes32,string)",[Se.Domain]:"DomainMetadata(address,uint256,string)",[Se.Misc]:"",[Se.DEFAULT]:""},Na=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await hp(n)).json();return cp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await hp(n)).json(),s=Object.entries(Us).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return cp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Ch(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var bM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};Mt(Tn,"abi",bp);var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};Mt(vn,"abi",xp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Er=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};Mt(Er,"abi",gp);var Hu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Sh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",ax=i=>i.length>1,Dn=class extends fr{constructor(...e){ax(e)?super(...e):super(Hu,Sh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Hu)}static connect(e,t){return new oe(e,Hu,t)}};Mt(Dn,"bytecode",Sh),Mt(Dn,"abi",Hu);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Cr=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};Mt(Cr,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ir=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};Mt(Ir,"abi",vp);var Sr;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Sr||(Sr={}));var wn;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(wn||(wn={}));var{AddressZero:Rh}=mt;async function ux(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var lx=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Dn.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await ux(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{r=!1}try{await t.nonces(Rh)}catch{a=!1}return n?r?t.tokenClientType=wn.Colony:(t=Cr.connect(i,e),t.tokenClientType=wn.ColonyLegacy):a?(t=vn.connect(i,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(i,e),t.tokenClientType=wn.Erc20),t.clientType=Sr.TokenClient,t},wp=lx;var dx=(i,e)=>{let t=Ir.connect(i,e);return t.clientType=Sr.TokenLockingClient,t},_p=dx;var{AddressZero:Ap}=mt,px=Tn.connect(Ap,new ei.BaseProvider(3656691)).interface,yx=Er.connect(Ap,new ei.BaseProvider(3656691)).interface,cx=vn.connect(Ap,new ei.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],js=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};js.abi=kp;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Vs.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Rr=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Rr.abi=Ep;var Ti=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:mx,solidityKeccak256:hx,splitSignature:bx}=te,Pr=class extends Ti{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Nn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=hx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=mx(d),c=await n.signMessage(p),{r:b,s:I,v:_}=bx(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},qu=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Nr=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Nr.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Dr=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Dr.abi=Ip;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Or.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Br=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Br.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fr=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fr.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Lr=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Lr.abi=Np;var{AddressZero:Ax}=mt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(On.extensionType),e.address);if(t===Ax)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=On.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,a,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding],this.oneTxPaymentContract.address),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},ji=On;ji.supportedVersions=[{version:3,factory:Br},{version:4,factory:Fr},{version:5,factory:Lr}],ji.extensionType=ve.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Hs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var qs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ne("Approval",r)}))}};var Ph=async(i,e)=>{let t=await wp(e,i.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Hs(i,t);case wn.Erc20:return new Bn(i,t);case wn.Erc2612:return new qs(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ur=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ur.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],jr=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};jr.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Vr.abi=Bp;var{AddressZero:Fp}=mt;var Gu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,a,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Od);return[e,t,Fp,Od,n,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Se.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...qu("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ud(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Tt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Vi=Fn;Vi.supportedVersions=[{version:7,factory:Ur},{version:8,factory:jr},{version:9,factory:Vr}],Vi.extensionType=ve.VotingReputation;var Cx={["motion"]:Vi,["oneTx"]:ji},Oa=class{static async connect(e,t){let n=await Ca(t,e.signerOrProvider),r=Oa.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await Ph(e,s),d=new Oa(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return Oa.supportedVersions[Oa.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ni(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Vi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ji.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Se.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Se.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Se.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Tt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ti(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Tt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await vr(b,this.colony,a,s),_=await vr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Se.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Annotation})}installExtension(e){let t=Cx[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Fi(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Bi(r),t.getLatestSupportedVersion()],async s=>({...qu("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return uu(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Tt.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},Ba=Oa;Ba.supportedVersions=[{version:11,factory:Nr},{version:12,factory:Dr},{version:13,factory:Or}];var{splitSignature:Ix}=te,zu=class extends Ti{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Ix(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Gs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Nh}=te,{AddressZero:Lp}=mt,zs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Na(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||ou[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Ea[this.network]},this.networkContract=Rr.connect(t?.customNetworkAddress||su[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new Ti({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Pr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new zu({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Se.Colony,n),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Se.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return Ba.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.network],""):null}async getColonyAddress(e){let t=Nh(`${e}${Cs[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.network],""):null}async getUserAddress(e){let t=Nh(`${e}${Is[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...ne("TokenDeployed",r)}))}};var{formatEther:Sx,isAddress:Rx}=te,Px=new ei.JsonRpcProvider(Es.Gnosis),Nx=async i=>{let n=await(await new zs(Px).getColony(i)).getBalance(Ss.Gnosis.CLNY);return Sx(n)},jp=document.querySelector("#address"),Oh=document.querySelector("#button"),Vp=document.querySelector("#error"),Bh=document.querySelector("#result");if(!jp||!Oh||!Vp||!Bh)throw new Error("Could not find all required HTML elements");var Dh=i=>{Vp.innerText=i},Dx=()=>{Vp.innerText=""},Up=i=>{Bh.innerText=i};Oh.addEventListener("click",async()=>{Dx();let i=jp?.value;if(!Rx(i))return Dh("This is not a valid address");Up("Thinking..."),jp.value="";let e;try{e=await Nx(i),Up(`${e} CLNY in root domain of Colony with address: ${i}`)}catch(t){Dh(`Found an error: ${t.message}`),Up("")}return null});})(); +`)}static register(e,t){if(t||(t=e.locale),B5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var F5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ns=null;function lf(a){if(ns==null&&(ns=F5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ns=null,new Error("BIP39 Wordlist for en (English) FAILED")}var nl=class extends hn{constructor(){super("en")}getWord(e){return lf(this),ns[e]}getWordIndex(e){return lf(this),ns.indexOf(e)}},al=new nl;hn.register(al);var hi={en:al};var pf="hdnode/5.7.0";var as=new M(pf),L5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),U5=ve("Bitcoin seed"),cr=2147483648;function ff(a){return(1<=256)throw new Error("Depth too large!");return yf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(fr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~cr));let n=new Uint8Array(37);if(e&cr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Bo(F.from(r).add(this.privateKey).mod(L5)):l=new cn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(fr,o,l,this.fingerprint,Bo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=cr)throw new Error("invalid path index - "+r);n=n._derive(cr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=cr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,U5,n));return new It(fr,Bo(i.slice(0,32)),null,"0x00000000",Bo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=il(n),e=xi(mr(e,n),n),It._fromSeed(rl(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||yf(t.slice(0,78))!==e)&&as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(fr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(fr,W(o.slice(1)),null,i,s,r,n,null)}return as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function rl(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function mr(a,e){e=il(e),as.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=ff(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function xi(a,e){if(e=il(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&V5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&ff(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function cf(a,e){try{return mr(a,e),!0}catch{}return!1}function mf(a){return(typeof a!="number"||a<0||a>=cr||a%1)&&as.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var hf="random/5.7.0";var sl=new M(hf);function j5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var xf=j5(),Fo=xf.crypto||xf.msCrypto;(!Fo||!Fo.getRandomValues)&&(sl.warn("WARNING: Missing strong random number source"),Fo={getRandomValues:function(a){return sl.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(a){(a<=0||a>1024||a%1||a!=a)&&sl.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Fo.getRandomValues(e),j(e)}function is(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var dl=_n(ul());var Lo="json-wallets/5.7.0";function ma(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function hr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:gf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Xn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+hr(I.getUTCMonth()+1,2)+"-"+hr(I.getUTCDate(),2)+"T"+hr(I.getUTCHours(),2)+"-"+hr(I.getUTCMinutes(),2)+"-"+hr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function If(a,e,t){if(Uo(a)){t&&t(0);let n=pl(a,e);return t&&t(1),Promise.resolve(n)}return Vo(a)?Ef(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(a,e){if(Uo(a))return pl(a,e);if(Vo(a))return Mf(a,e);throw new Error("invalid JSON wallet")}var Sf="wallet/5.7.0";var Rf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xr=new M(Sf);function W5(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function K5(a){let e=a.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),W5(e)){let n=new cn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&xr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),K5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&xr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&xr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&xr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&xr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(Zr(t)));return Zr(t,n)})}signMessage(e){return Rf(this,void 0,void 0,function*(){return Fr(this._signingKey().signDigest(er(e)))})}_signTypedData(e,t,n){return Rf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&xr.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Fr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),hl(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=xi(t,e.locale);return Cn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return If(e,t,n).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Cf(e,t))}static fromMnemonic(e,t,n){return t||(t=ca),new Cn(It.fromMnemonic(e,null,n).derivePath(t))}};function Pf(a,e){return yi(er(a),e)}function Nf(a,e,t,n){return yi(bt.hash(a,e,t),n)}var ea={};Hi(ea,{AlchemyProvider:()=>_r,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>xs,BaseProvider:()=>Zn,CloudflareProvider:()=>bs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>Ar,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>Cl,JsonRpcBatchProvider:()=>nu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>vr,NodesmithProvider:()=>ks,PocketProvider:()=>As,Provider:()=>$t,Resolver:()=>Tr,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>Ms,WebSocketProvider:()=>ga,getDefaultProvider:()=>au,getNetwork:()=>ss,isCommunityResourcable:()=>gl,isCommunityResource:()=>ds,showThrottleMessage:()=>Yn});var Df="networks/5.7.1";var Of=new M(Df);function J5(a){return a&&typeof a.renetwork=="function"}function xa(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function qo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return qo(a,n)},t}var Bf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Ff={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Lf={chainId:63,name:"classicMordor",_defaultProvider:qo("https://www.ethercluster.com/mordor","classicMordor")},Ho={unspecified:{chainId:0,name:"unspecified"},homestead:Bf,mainnet:Bf,morden:{chainId:2,name:"morden"},ropsten:Ff,testnet:Ff,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Lf,classicTestnet:Lf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(a){if(a==null)return null;if(typeof a=="number"){for(let n in Ho){let i=Ho[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Ho[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Ho[a.name];if(!e)return typeof a.chainId!="number"&&Of.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Of.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(J5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Uf="web/5.7.1";var $5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Vf(a,e){return $5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var Q5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new M(Uf);function jf(a){return new Promise(e=>{setTimeout(e,a)})}function Da(a,e){if(a==null)return null;if(typeof a=="string")return a;if(aa(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function X5(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function xl(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+Zi(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):X5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Q5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return xl(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var _l=_n(zf());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===oo?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return So(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function gl(a){return a&&typeof a.isCommunityResource=="function"}function ds(a){return gl(a)&&a.isCommunityResource()}var Wf=!1;function Yn(){Wf||(Wf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new M(Ae),rx=10;function Kf(a){return a==null?"null":(Nt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Jf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Kf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Kf(e)}).join("&")}function sx(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function gr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Nt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Jf(a);if(go.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Jf(a.topics||[])}throw new Error("invalid event - "+a)}function ls(){return new Date().getTime()}function $f(a){return new Promise(e=>{setTimeout(e,a)})}var ox=["block","network","pending","poll"],kl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=sx(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||ox.indexOf(this.tag)>=0}},ux={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Tl(a){return me(F.from(a).toHexString(),32)}function Qf(a){return ya.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var Zf=new RegExp("^(ipfs)://(.*)$","i"),Xf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Zf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ko(a,e){try{return Jt(ps(a,e))}catch{}return null}function ps(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function vl(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Yf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function dx(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function ec(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",ec([$r(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ps(r,0)),r}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=ux[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Qf(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Qf(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=_l.default.toWords(i.slice(2));return o.unshift(s),_l.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Qi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===M.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Tl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Tl(64),Tl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},wl=null,lx=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return wl==null&&(wl=new Y),wl}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,M.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ls()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ls(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ls();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=lx++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield $f(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ls();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield $f(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=rx&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new Tr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ia(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Ko(yield this.call({to:n,data:"0x691f3431"+Ia(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Tr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Ko(yield this.call({to:s,data:"0x691f3431"+Ia(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new kl(gr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=gr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=gr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=gr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=gr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=gr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var ba=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new M(Ae),px=["call","estimateGas"];function fs(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=fs(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return fs(JSON.parse(a),e)}catch{}return null}function nc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=fs(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=fs(e.body,!1);r==null&&(r=fs(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),px.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function tc(a){return new Promise(function(e){setTimeout(e,a)})}function yx(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ys(a){return a&&a.toLowerCase()}var Al={},vr=class extends St{constructor(e,t,n){if(super(),e!==Al)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ml(Al,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ba(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),nc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Ml=class extends vr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},fx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield tc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new vr(Al,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),yx).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return nc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return tc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(fx);if(t)for(let r in t)t[r]&&(n[r]=!0);zi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var wr=null;try{if(wr=WebSocket,wr==null)throw new Error("inject please")}catch{let e=new M(Ae);wr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var El=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Jo=new M(Ae),cx=1,ga=class extends Yt{constructor(e,t){t==="any"&&Jo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Jo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Jo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return El(this,void 0,void 0,function*(){return null})}set polling(e){!e||Jo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=cx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return El(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return El(this,void 0,void 0,function*(){this.websocket.readyState===wr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var mx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},cs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return mx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||cs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends ms{constructor(e,t){cs.checkAbstract(new.target,Ct),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){cs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return cs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return cs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var ac=new M(Ae),$o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends ga{constructor(e,t){let n=new _r(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===$o}},_r=class extends Ct{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?$o:(e&&typeof e!="string"&&ac.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===$o&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===$o}};var hx=new M(Ae),Qo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function xx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return hx.throwArgumentError("unsupported network","name",a)}var xs=class extends Ct{isCommunityResource(){return this.apiKey===Qo}static getApiKey(e){return e??Qo}static getUrl(e,t){t==null&&(t=Qo);let n={allowGzip:!0,url:"https://"+xx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Qo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var bx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ic=new M(Ae),bs=class extends Ct{static getApiKey(e){return e!=null&&ic.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:ic.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return bx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Xo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Oa=new M(Ae);function rc(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function gx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function sc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function oc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Il(a,e,t){if(a==="call"&&e.code===M.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Xo(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?sc:gx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||sc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Xo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Xo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Il("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=rc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Il("call",r,t.transaction)}}case"estimateGas":{let i=rc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Il("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=oc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=oc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var eu=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bi=new M(Ae);function Yo(){return new Date().getTime()}function uc(a){let e=null;for(let t=0;te?null:(n+i)/2}function kr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>kr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=kr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Tx=1;function lc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var vx=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],wx=["address","args","errorArgs","errorSignature","method","transaction"];function Zo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function _x(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function kx(a,e,t){let n=kr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=dc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return dc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,kr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),kr(i))}:n=function(i){return i==null?null:kr(i)};break;default:throw new Error("unknown method: "+e)}return _x(n,a.quorum)}function Ts(a,e){return eu(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function Ax(a,e,t,n){return eu(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Ts(a,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=ds(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ds(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=uc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return eu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return uc(e)})}perform(e,t){return eu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Yo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Ax(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Yo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Yo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield lc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return vx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};wx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Zo(l)),provider:this})})}};var Cl=null;var tu=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends ga{constructor(e,t){let n=new Ar(e,t),i=n.connection;i.password&&tu.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},Ar=class extends Ct{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(tu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),tu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:tu.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ws}};var nu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Sl=new M(Ae),Mx="ETHERS_JS_SHARED",ks=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&Sl.throwArgumentError("invalid apiKey","apiKey",e),e||Mx}static getUrl(e,t){Sl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Sl.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var pc=new M(Ae),yc="62e1ad51b37b8e00394bda3b",As=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=yc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:pc.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===yc}};var fc=new M(Ae),Ex=1;function cc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Ex++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Ix(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Ms=class extends Yt{constructor(e,t){e==null&&fc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Ix(e)):e.sendAsync?i=cc(e,e.sendAsync.bind(e)):e.send?i=cc(e,e.send.bind(e)):fc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var mc=new M(Ae);function au(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new ga(a);default:mc.throwArgumentError("unsupported URL scheme","network",a)}}let t=ss(a);return(!t||!t._defaultProvider)&&mc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_r,AnkrProvider:xs,CloudflareProvider:bs,EtherscanProvider:gs,InfuraProvider:Ar,JsonRpcProvider:Yt,NodesmithProvider:ks,PocketProvider:As,Web3Provider:Ms,IpcProvider:null},e)}var te={};Hi(te,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>It,Indexed:()=>oa,Interface:()=>Ca,LogDescription:()=>tr,Logger:()=>M,ParamType:()=>pt,RLP:()=>Zs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>nr,TransactionTypes:()=>Co,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>fo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>xl,_toEscapedUtf8String:()=>wd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Id,checkProperties:()=>zi,checkResultErrors:()=>Ki,commify:()=>_c,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>$r,entropyToMnemonic:()=>xi,fetchJson:()=>Rn,formatBytes32String:()=>_d,formatEther:()=>kc,formatUnits:()=>Rl,getAccountPath:()=>mf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Iy,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>yl,getStatic:()=>mt,hashMessage:()=>er,hexConcat:()=>kt,hexDataLength:()=>Nt,hexDataSlice:()=>Ie,hexStripZeros:()=>pd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>My,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>cf,isValidName:()=>Sd,joinSignature:()=>Fr,keccak256:()=>fe,mnemonicToEntropy:()=>mr,mnemonicToSeed:()=>rl,namehash:()=>Ia,nameprep:()=>Ed,parseBytes32String:()=>kd,parseEther:()=>Ac,parseTransaction:()=>So,parseUnits:()=>Pl,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Io,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Zr,sha256:()=>Xt,sha512:()=>tl,shallowCopy:()=>_e,shuffled:()=>is,solidityKeccak256:()=>bc,solidityPack:()=>iu,soliditySha256:()=>gc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Pf,verifyTypedData:()=>Nf,zeroPad:()=>ii});var hc="solidity/5.7.0";var Cx=new RegExp("^bytes([0-9]+)$"),Sx=new RegExp("^(u?int)([0-9]*)$"),Rx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Px="0000000000000000000000000000000000000000000000000000000000000000",Mr=new M(hc);function xc(a,e,t){switch(a){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let n=a.match(Sx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(n=a.match(Cx),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Px).substring(0,66)):e}if(n=a.match(Rx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(xc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",a)}function iu(a,e){a.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(xc(n,e[i]))}),W(ye(t))}function bc(a,e){return fe(iu(a,e))}function gc(a,e){return Xt(iu(a,e))}var Tc="units/5.7.0";var vc=new M(Tc),wc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function _c(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&vc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Rl(a,e){if(typeof e=="string"){let t=wc.indexOf(e);t!==-1&&(e=3*t)}return Gi(a,e??18)}function Pl(a,e){if(typeof a!="string"&&vc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=wc.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function kc(a){return Rl(a,18)}function Ac(a){return Pl(a,18)}var ru="ethers/5.7.2";var Mc=new M(ru);try{let a=window;a._ethers==null&&(a._ethers=Nl)}catch{}var Nn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Nn||(Nn={}));var su;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(su||(su={}));var Er;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Er||(Er={}));var ou;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(ou||(ou={}));var Es;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Es||(Es={}));var Is;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Is||(Is={}));var Cs;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Cs||(Cs={}));var Ss;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Ss||(Ss={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new te.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new te.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Ec=(a,e)=>{throw new Error(`${e}: ${a}`)},Ll=a=>a!=null;var{keccak256:Dx,toUtf8Bytes:Ox}=te,{MaxUint256:Bx}=ht;var Ul=a=>te.formatEther(a);var Vl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Bx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Ba=a=>Dx(Ox(a));var Ir=async(a,e)=>(await Ti.connect(a,e).version()).toNumber(),jl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=te,{MaxUint256:Fx}=ht,Ic=a=>{let e=Hl(a,0,3),t=F.from(Hl(a,4,35)),n=F.from(Hl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Cc=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Fx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await vi(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},Lx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Cc(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ta(a,e,t,n[0],i):Lx(a,e,t,n,i):Cc(a,e,t,n,i);var{MaxUint256:Sc}=ht,{AddressZero:Ux}=ht;async function Vx(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),uu(t)}catch{return[]}}async function Rs(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ic(s),C=gi.connect(r,n.signer||n.provider),_=await Vx(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:E}=await a.getSkill(l),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Ux);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:jx}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${jx}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Rc=10,Nk=_t(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=6,Bk=_t(Dc),Oc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Bc=Dc-1;var Fc=7,Uk=_t(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[]},Uc=Fc-1;var Vc=7,Hk=_t(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=4,zk=_t(qc),Gc={1:[],2:[],3:[]},zc=qc-1;var Wc=5,Jk=_t(Wc),Kc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Jc=Wc-1;var $c=2,Xk=_t($c),Qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Xc=$c-1;var Yc=4,eA=_t(Yc),Zc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},em=Yc-1;var tm=7,aA=_t(tm),nm={1:[],2:[],3:[],4:[],5:[],6:[]},am=tm-1;var im=11,sA=_t(im),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gl=im-1;var rm=6,dA=_t(rm),sm={1:[],2:[],3:[],4:[],5:[]},om=rm-1;var Fa=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Pc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Oc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Lc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=jc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=Gc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=Qc[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=Kc[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=Zc[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=nm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=sm[e];return!!n&&!n.includes(t)}default:return Ec(a,"Could not find extension with name")}};var Hx={[we.CoinMachine]:Nc,[we.EvaluatedExpenditure]:Bc,[we.FundingQueue]:Uc,[we.IVotingReputation]:Gl,[we.OneTxPayment]:Hc,[we.ReputationBootstrapper]:zc,[we.StagedExpenditure]:Xc,[we.StakedExpenditure]:Jc,[we.StreamingPayments]:em,[we.TokenSupplier]:am,[we.VotingReputation]:Gl,[we.Whitelist]:om};var Ch=_n(um(),1);var yp=_n(Mh(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var Eh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,t1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),fp=(a,e)=>{let t=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Eh(t.errors);throw new Error(n)};var Ih=(a,e)=>{let t=a===Re.Colony?t1(e):e,n=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:pp});if(!n.success){let i=Eh(n.errors);throw new Error(i)}return n.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,Ch.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Us={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Nr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await hp(n)).json();return fp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await hp(n)).json(),s=Object.entries(Us).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Ih(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var BM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ei,"abi",gp);var Hu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Sh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",k1=a=>a.length>1,Dn=class extends ci{constructor(...e){k1(e)?super(...e):super(Hu,Sh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Hu)}static connect(e,t){return new oe(e,Hu,t)}};xe(Dn,"bytecode",Sh),xe(Dn,"abi",Hu);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ci=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};xe(Ci,"abi",vp);var Si;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:Rh}=ht;async function E1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Dn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await E1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{i=!1}try{await t.nonces(Rh)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Ii.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Si.TokenClient,t},wp=I1;var C1=(a,e)=>{let t=Ci.connect(a,e);return t.clientType=Si.TokenLockingClient,t},_p=C1;var{AddressZero:kp}=ht,S1=Tn.connect(kp,new ea.BaseProvider(3656691)).interface,R1=Ei.connect(kp,new ea.BaseProvider(3656691)).interface,P1=vn.connect(kp,new ea.BaseProvider(3656691)).interface;var Ap=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Vs.abi=Ap;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],js=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};js.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:D1,solidityKeccak256:O1,splitSignature:B1}=te,Pi=class extends Ta{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=O1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=D1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=B1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},qu=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Ni.abi=Ip;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Di.abi=Cp;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var{AddressZero:q1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===q1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,r,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Va.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Hs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var qs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ne("Approval",i)}))}};var Ph=async(a,e)=>{let t=await wp(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Hs(a,t);case wn.Erc20:return new Bn(a,t);case wn.Erc2612:return new qs(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};ji.abi=Bp;var{AddressZero:Fp}=ht;var Gu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,r,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Ol);return[e,t,Fp,Ol,n,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...qu("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Ul(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],ja.extensionType=we.VotingReputation;var K1={["motion"]:ja,["oneTx"]:Va},Or=class{static async connect(e,t){let n=await Ir(t,e.signerOrProvider),i=Or.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Ph(e,s),l=new Or(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=K1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Fa(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return uu(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Br=Or;Br.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:J1}=te,zu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:f}),{r:C,s:_,v}=J1(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:f,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Gs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Nh}=te,{AddressZero:Lp}=ht,zs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Nr(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||ou[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Er[this.network]},this.networkContract=Ri.connect(t?.customNetworkAddress||su[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new Ta({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Pi({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new zu({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Re.Colony,n),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Br.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.network],""):null}async getColonyAddress(e){let t=Nh(`${e}${Is[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.network],""):null}async getUserAddress(e){let t=Nh(`${e}${Cs[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...ne("TokenDeployed",i)}))}};var{formatEther:$1,isAddress:Q1}=te,X1=new ea.JsonRpcProvider(Es.Gnosis),Y1=async a=>{let n=await(await new zs(X1).getColony(a)).getBalance(Ss.Gnosis.CLNY);return $1(n)},Vp=document.querySelector("#address"),Oh=document.querySelector("#button"),jp=document.querySelector("#error"),Bh=document.querySelector("#result");if(!Vp||!Oh||!jp||!Bh)throw new Error("Could not find all required HTML elements");var Dh=a=>{jp.innerText=a},Z1=()=>{jp.innerText=""},Up=a=>{Bh.innerText=a};Oh.addEventListener("click",async()=>{Z1();let a=Vp?.value;if(!Q1(a))return Dh("This is not a valid address");Up("Thinking..."),Vp.value="";let e;try{e=await Y1(a),Up(`${e} CLNY in root domain of Colony with address: ${a}`)}catch(t){Dh(`Found an error: ${t.message}`),Up("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/events.js b/events.js index e3071a710..e3a0bd5eb 100644 --- a/events.js +++ b/events.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var Oh=Object.create;var qs=Object.defineProperty;var Bh=Object.getOwnPropertyDescriptor;var Fh=Object.getOwnPropertyNames;var Lh=Object.getPrototypeOf,Uh=Object.prototype.hasOwnProperty;var Vh=(a,e,t)=>e in a?qs(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ne=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),ji=(a,e)=>{for(var t in e)qs(a,t,{get:e[t],enumerable:!0})},jh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fh(e))!Uh.call(a,i)&&i!==t&&qs(a,i,{get:()=>e[i],enumerable:!(n=Bh(e,i))||n.enumerable});return a};var _n=(a,e,t)=>(t=a!=null?Oh(Lh(a)):{},jh(e||!a||!a.__esModule?qs(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(Vh(a,typeof e!="symbol"?e+"":e,t),t);var jp=ne(()=>{});var td=ne((Hp,ed)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=jp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>13,qa=w[4]|0,Ne=qa&8191,De=qa>>>13,Ga=w[5]|0,Oe=Ga&8191,Be=Ga>>>13,za=w[6]|0,Fe=za&8191,Le=za>>>13,Wa=w[7]|0,Ue=Wa&8191,Ve=Wa>>>13,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Ja=w[9]|0,qe=Ja&8191,Ge=Ja>>>13,$a=A[0]|0,ze=$a&8191,We=$a>>>13,Qa=A[1]|0,Ke=Qa&8191,Je=Qa>>>13,Xa=A[2]|0,$e=Xa&8191,Qe=Xa>>>13,Ya=A[3]|0,Xe=Ya&8191,Ye=Ya>>>13,Za=A[4]|0,Ze=Za&8191,et=Za>>>13,ei=A[5]|0,tt=ei&8191,nt=ei>>>13,ti=A[6]|0,at=ti&8191,it=ti>>>13,ni=A[7]|0,rt=ni&8191,st=ni>>>13,ai=A[8]|0,ot=ai&8191,ut=ai>>>13,ii=A[9]|0,dt=ii&8191,lt=ii>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var Ta=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var va=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Vu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ju>>>26)|0,ju&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Hu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(qu>>>26)|0,qu&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var Gu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var Zu=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,h[0]=Ta,h[1]=va,h[2]=wa,h[3]=_a,h[4]=ka,h[5]=Vu,h[6]=ju,h[7]=Hu,h[8]=qu,h[9]=Gu,h[10]=zu,h[11]=Wu,h[12]=Ku,h[13]=Ju,h[14]=$u,h[15]=Qu,h[16]=Xu,h[17]=Yu,h[18]=Zu,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function E(I,u){this.x=I,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof ed>"u"||ed,Hp)});var fy=ne((Bg,$s)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof $s=="object"&&$s.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var E=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,ft=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var ft=new Uint32Array(Q);ee>8&255,X[Q+2]=ft>>16&255,X[Q+3]=ft>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,ft=P[K],X[Q]=ft&255,V>1&&(X[Q+1]=ft>>8&255),V>2&&(X[Q+2]=ft>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,ft,Z,le,qa,Ne,De,Ga,Oe,Be,za,Fe,Le,Wa,Ue,Ve,Ka,je,He,Ja,qe,Ge,$a,ze,We,Qa,Ke,Je,Xa,$e,Qe,Ya,Xe,Ye,Za,Ze,et,ei,tt,nt,ti,at,it,ni,rt,st,ai,ot,ut,ii,dt,lt,Ta,va,wa,_a,ka;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],ft=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],qa=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(ft<<1|Z>>>31),D=ee^(Z<<1|ft>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|qa>>>31),D=Q^(qa<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=ft^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=qa^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,Ga=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ti=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,$a=c[21]<<3|c[20]>>>29,va=c[31]<<9|c[30]>>>23,wa=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Xa=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,za=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,_a=c[42]<<2|c[43]>>>30,ka=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ni=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,Qa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ii=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Ya=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,Wa=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ai=c[46]<<24|c[47]>>>8,ei=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,Ja=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,Ta=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,Za=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=Ga^~Be&Fe,c[1]=Oe^~za&Le,c[10]=je^~Ja&Ge,c[11]=He^~qe&$a,c[20]=Je^~$e&Ya,c[21]=Xa^~Qe&Xe,c[30]=ei^~nt&at,c[31]=tt^~ti&it,c[40]=ot^~ii<,c[41]=ut^~dt&Ta,c[2]=Be^~Fe&Wa,c[3]=za^~Le&Ue,c[12]=Ja^~Ge&ze,c[13]=qe^~$a&We,c[22]=$e^~Ya&Ye,c[23]=Qe^~Xe&Za,c[32]=nt^~at&ni,c[33]=ti^~it&rt,c[42]=ii^~lt&va,c[43]=dt^~Ta&wa,c[4]=Fe^~Wa&Ve,c[5]=Le^~Ue&Ka,c[14]=Ge^~ze&Qa,c[15]=$a^~We&Ke,c[24]=Ya^~Ye&Ze,c[25]=Xe^~Za&et,c[34]=at^~ni&st,c[35]=it^~rt&ai,c[44]=lt^~va&_a,c[45]=Ta^~wa&ka,c[6]=Wa^~Ve&Ga,c[7]=Ue^~Ka&Oe,c[16]=ze^~Qa&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=Za^~et&Xa,c[36]=ni^~st&ei,c[37]=rt^~ai&tt,c[46]=va^~_a&ot,c[47]=wa^~ka&ut,c[8]=Ve^~Ga&Be,c[9]=Ka^~Oe&za,c[18]=Qa^~je&Ja,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Xa&Qe,c[38]=st^~ei&nt,c[39]=ai^~tt&ti,c[48]=_a^~ot&ii,c[49]=ka^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)$s.exports=u;else{for(b=0;b{u0.exports=o0;function o0(a,e){if(!a)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var d0=ne((I3,Id)=>{typeof Object.create=="function"?Id.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Id.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var An=ne(Pe=>{"use strict";var W6=nr(),K6=d0();Pe.inherits=K6;function J6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function $6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):J6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=l0;function X6(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=Y6;function Z6(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=Z6;function e2(a,e){return a>>>e|a<<32-e}Pe.rotr32=e2;function t2(a,e){return a<>>32-e}Pe.rotl32=t2;function n2(a,e){return a+e>>>0}Pe.sum32=n2;function a2(a,e,t){return a+e+t>>>0}Pe.sum32_3=a2;function i2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=i2;function r2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=r2;function s2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=s2;function o2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=o2;function u2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=u2;function d2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=d2;function l2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=l2;function p2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=p2;function y2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=y2;function f2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=f2;function c2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=c2;function m2(a,e,t){return a>>>t}Pe.shr64_hi=m2;function h2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=h2});var ar=ne(c0=>{"use strict";var f0=An(),x2=nr();function xo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}c0.BlockHash=xo;xo.prototype.update=function(e,t){if(e=f0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=f0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var b2=An(),jn=b2.rotr32;function g2(a,e,t,n){if(a===0)return m0(e,t,n);if(a===1||a===3)return x0(e,t,n);if(a===2)return h0(e,t,n)}ua.ft_1=g2;function m0(a,e,t){return a&e^~a&t}ua.ch32=m0;function h0(a,e,t){return a&e^a&t^e&t}ua.maj32=h0;function x0(a,e,t){return a^e^t}ua.p32=x0;function T2(a){return jn(a,2)^jn(a,13)^jn(a,22)}ua.s0_256=T2;function v2(a){return jn(a,6)^jn(a,11)^jn(a,25)}ua.s1_256=v2;function w2(a){return jn(a,7)^jn(a,18)^a>>>3}ua.g0_256=w2;function _2(a){return jn(a,17)^jn(a,19)^a>>>10}ua.g1_256=_2});var T0=ne((P3,g0)=>{"use strict";var ir=An(),k2=ar(),A2=Cd(),Sd=ir.rotl32,$r=ir.sum32,M2=ir.sum32_5,E2=A2.ft_1,b0=k2.BlockHash,I2=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;b0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ir.inherits(Hn,b0);g0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var rr=An(),C2=ar(),sr=Cd(),S2=nr(),Mn=rr.sum32,R2=rr.sum32_4,P2=rr.sum32_5,N2=sr.ch32,D2=sr.maj32,O2=sr.s0_256,B2=sr.s1_256,F2=sr.g0_256,L2=sr.g1_256,v0=C2.BlockHash,U2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function qn(){if(!(this instanceof qn))return new qn;v0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=U2,this.W=new Array(64)}rr.inherits(qn,v0);w0.exports=qn;qn.blockSize=512;qn.outSize=256;qn.hmacStrength=192;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Pd=An(),_0=Rd();function da(){if(!(this instanceof da))return new da;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Pd.inherits(da,_0);k0.exports=da;da.blockSize=512;da.outSize=224;da.hmacStrength=192;da.padLength=64;da.prototype._digest=function(e){return e==="hex"?Pd.toHex32(this.h.slice(0,7),"big"):Pd.split32(this.h.slice(0,7),"big")}});var Od=ne((O3,C0)=>{"use strict";var Qt=An(),V2=ar(),j2=nr(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,M0=Qt.shr64_hi,E0=Qt.shr64_lo,Ca=Qt.sum64,Nd=Qt.sum64_hi,Dd=Qt.sum64_lo,H2=Qt.sum64_4_hi,q2=Qt.sum64_4_lo,G2=Qt.sum64_5_hi,z2=Qt.sum64_5_lo,I0=V2.BlockHash,W2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;I0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W2,this.W=new Array(160)}Qt.inherits(En,I0);C0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Bd=An(),S0=Od();function la(){if(!(this instanceof la))return new la;S0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Bd.inherits(la,S0);R0.exports=la;la.blockSize=1024;la.outSize=384;la.hmacStrength=192;la.padLength=128;la.prototype._digest=function(e){return e==="hex"?Bd.toHex32(this.h.slice(0,12),"big"):Bd.split32(this.h.slice(0,12),"big")}});var N0=ne(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Rd();or.sha384=P0();or.sha512=Od()});var U0=ne(L0=>{"use strict";var pi=An(),r5=ar(),bo=pi.rotl32,D0=pi.sum32,Qr=pi.sum32_3,O0=pi.sum32_4,F0=r5.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;F0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pi.inherits(Wn,F0);L0.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=D0(bo(O0(n,B0(_,i,r,s),e[u5[_]+t],s5(_)),l5[_]),o);n=o,o=s,s=bo(r,10),r=i,i=v,v=D0(bo(O0(l,B0(79-_,p,f,x),e[d5[_]+t],o5(_)),p5[_]),C),l=C,C=x,x=bo(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,C),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],n,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h,"little"):pi.split32(this.h,"little")};function B0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function s5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function o5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var u5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var j0=ne((U3,V0)=>{"use strict";var y5=An(),f5=nr();function ur(a,e,t){if(!(this instanceof ur))return new ur(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(y5.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),f5(e.length<=this.blockSize);for(var t=e.length;t{var St=H0;St.utils=An();St.common=ar();St.sha=N0();St.ripemd=U0();St.hmac=j0();St.sha1=St.sha.sha1;St.sha256=St.sha.sha256;St.sha224=St.sha.sha224;St.sha384=St.sha.sha384;St.sha512=St.sha.sha512;St.ripemd160=St.ripemd.ripemd160});var nl=ne((tl,xf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=E,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,E=E+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof ol<"u"?gf.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(ol)});var Gf=ne((I4,qf)=>{"use strict";var Ho="qpzry9x8gf2tvdw0s3jn54khce6mua7l",yl={};for(ss=0;ss>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function jf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=xr(e)^n>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=jf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=xr(n)^s,i+=Ho.charAt(s)}for(r=0;r<6;++r)n=xr(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Ho.charAt(o)}return i}function Hf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=jf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function X5(){var a=Hf.apply(null,arguments);if(typeof a=="object")return a}function Y5(a){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function qo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof Wl=="object"&&typeof Kl<"u"?Kl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(Wl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Jl=ne(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$dictionary=void 0;iu.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Cs=ne((ZM,um)=>{um.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Ql=ne(Fa=>{var Me=Cs(),$l=()=>[{type:Me.RANGE,from:48,to:57}],dm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat($l()),lm=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],rb=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];Fa.words=()=>({type:Me.SET,set:dm(),not:!1});Fa.notWords=()=>({type:Me.SET,set:dm(),not:!0});Fa.ints=()=>({type:Me.SET,set:$l(),not:!1});Fa.notInts=()=>({type:Me.SET,set:$l(),not:!0});Fa.whitespace=()=>({type:Me.SET,set:lm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:lm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:rb(),not:!0})});var ym=ne(Ss=>{var pm=Cs(),Er=Ql(),sb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",ob={0:0,t:9,n:10,v:11,f:12,r:13};Ss.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?sb.indexOf(l):ob[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Ss.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Er.words());else if(i[2])t.push(Er.ints());else if(i[3])t.push(Er.whitespace());else if(i[4])t.push(Er.notWords());else if(i[5])t.push(Er.notInts());else if(i[6])t.push(Er.notWhitespace());else if(i[7])t.push({type:pm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:pm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var fm=ne(Rs=>{var ru=Cs();Rs.wordBoundary=()=>({type:ru.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:ru.POSITION,value:"B"});Rs.begin=()=>({type:ru.POSITION,value:"^"});Rs.end=()=>({type:ru.POSITION,value:"$"})});var cm=ne((aE,Xl)=>{var Ir=ym(),xn=Cs(),ki=Ql(),su=fm();Xl.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(a,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};mm.exports=La});var bm=ne((rE,xm)=>{var ou=cm(),Ps=hm(),Ai=ou.types;xm.exports=class Ns{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=ou(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ns.prototype.max!=null?Ns.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case Ai.ROOT:case Ai.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var ub=Mi&&Mi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.RandomGenerator=void 0;var db=ub(bm()),lb;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new db.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(lb=Mi.RandomGenerator||(Mi.RandomGenerator={}))});var Ds=ne(Cr=>{"use strict";var pb=Cr&&Cr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.TypeGuardError=void 0;var yb=function(a){pb(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Cr.TypeGuardError=yb});var Tm=ne(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$any=void 0;var fb=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};uu.$any=fb});var vm=ne(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$every=void 0;var cb=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$guard=void 0;var mb=Ds(),hb=function(a){return function(e,t){if(e===!0)throw new mb.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};lu.$guard=hb});var _m=ne(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_between=void 0;var xb=function(a,e,t){return e<=a&&a<=t};pu.$is_between=xb});var km=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_custom=void 0;var bb=Jl(),gb=function(a,e,t,n){var i,r=(i=bb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};yu.$is_custom=gb});var Am=ne(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_date=void 0;var Tb=function(a){return vb.test(a)};fu.$is_date=Tb;var vb=/^(\d{4})-(\d{2})-(\d{2})$/});var Mm=ne(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_datetime=void 0;var wb=function(a){return!isNaN(new Date(a).getTime())};cu.$is_datetime=wb});var Em=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_email=void 0;var _b=function(a){return kb.test(a)};mu.$is_email=_b;var kb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Im=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_ipv4=void 0;var Ab=function(a){return Mb.test(a)};hu.$is_ipv4=Ab;var Mb=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Cm=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_ipv6=void 0;var Eb=function(a){return Ib.test(a)};xu.$is_ipv6=Eb;var Ib=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Sm=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_url=void 0;var Cb=function(a){return Sb.test(a)};bu.$is_url=Cb;var Sb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Rm=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_uuid=void 0;var Rb=function(a){return Pb.test(a)};gu.$is_uuid=Rb;var Pb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Pm=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$join=void 0;var Nb=function(a){return Db(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Tu.$join=Nb;var Db=function(a){return Ob(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},Ob=function(a){return Bb.has(a)},Bb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Nm=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$number=void 0;var Fb=Ds(),Lb=function(a){if(isFinite(a)===!1)throw new Fb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};vu.$number=Lb});var Dm=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$report=void 0;var Ub=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};wu.$report=Ub});var Om=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$rest=void 0;var Vb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};_u.$rest=Vb});var Bm=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$string=void 0;var jb=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};ku.$string=jb});var Fm=ne(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$tail=void 0;var Hb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Au.$tail=Hb});var jm=ne(Ei=>{"use strict";var Vt=Ei&&Ei.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:t1.$number,string:i1.$string,tail:r1.$tail,rest:a1.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:qb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Lm.RandomGenerator,pick:Lm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Um.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(s1=Ei.Namespace||(Ei.Namespace={}))});var Hm=ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var o1;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(o1=Os.MapUtil||(Os.MapUtil={}))});var Gm=ne(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Wm=ne(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ne(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var Qm=ne($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var Ym=ne(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ne(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var lp=ne(z=>{"use strict";var u1=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Ii=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&u1(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Sr=Jl(),Ee=jm(),d1=Hm();Ii(Gm(),z);Ii(Wm(),z);Ii(Jm(),z);Ii(Qm(),z);Ii(Ym(),z);Ii(eh(),z);Ii(Ds(),z);function Yl(){re("assert")}z.assert=Yl;Object.assign(Yl,Ee.Namespace.assert("assert"));function Zl(){re("assertType")}z.assertType=Zl;Object.assign(Zl,Ee.Namespace.assert("assertType"));function Mu(){re("is")}z.is=Mu;Object.assign(Mu,Ee.Namespace.assert("is"));function Eu(){re("validate")}z.validate=Eu;Object.assign(Eu,Ee.Namespace.validate());function ep(){re("assertEquals")}z.assertEquals=ep;Object.assign(ep,Ee.Namespace.assert("assertEquals"));function tp(){re("equals")}z.equals=tp;Object.assign(tp,Ee.Namespace.is());function np(){re("validateEquals")}z.validateEquals=np;Object.assign(np,Ee.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Sr.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Sr.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=d1.MapUtil.take(Sr.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function l1(){re("application")}z.application=l1;function ap(){re("assertParse")}z.assertParse=ap;Object.assign(ap,Ee.Namespace.assert("assertParse"));function ip(){re("isParse")}z.isParse=ip;Object.assign(ip,Mu);function rp(){re("validateParse")}z.validateParse=rp;Object.assign(rp,Eu);function sp(){re("stringify")}z.stringify=sp;Object.assign(sp,Ee.Namespace.stringify("stringify"));function Iu(){re("assertStringify")}z.assertStringify=Iu;Object.assign(Iu,Ee.Namespace.assert("assertStringify"));Object.assign(Iu,Ee.Namespace.stringify("assertStringify"));function Cu(){re("isStringify")}z.isStringify=Cu;Object.assign(Cu,Ee.Namespace.is());Object.assign(Cu,Ee.Namespace.stringify("isStringify"));function Su(){re("validateStringify")}z.validateStringify=Su;Object.assign(Su,Ee.Namespace.validate());Object.assign(Su,Ee.Namespace.stringify("validateStringify"));function p1(){re("metadata")}z.metadata=p1;function op(){re("random")}z.random=op;Object.assign(op,Ee.Namespace.random());function y1(){re("literals")}z.literals=y1;function up(){re("clone")}z.clone=up;Object.assign(up,Ee.Namespace.clone("clone"));function Ru(){re("assertClone")}z.assertClone=Ru;Object.assign(Ru,Ee.Namespace.assert("assertClone"));Object.assign(Ru,Ee.Namespace.clone("assertClone"));function Pu(){re("isClone")}z.isClone=Pu;Object.assign(Pu,Ee.Namespace.is());Object.assign(Pu,Ee.Namespace.clone("isClone"));function Nu(){re("validateClone")}z.validateClone=Nu;Object.assign(Nu,Ee.Namespace.validate());Object.assign(Nu,Ee.Namespace.clone("validateClone"));function dp(){re("prune")}z.prune=dp;Object.assign(dp,Ee.Namespace.prune("prune"));function Du(){re("assertPrune")}z.assertPrune=Du;Object.assign(Du,Ee.Namespace.assert("assertPrune"));Object.assign(Du,Ee.Namespace.prune("assertPrune"));function Ou(){re("isPrune")}z.isPrune=Ou;Object.assign(Ou,Ee.Namespace.is());Object.assign(Ou,Ee.Namespace.prune("isPrune"));function Bu(){re("validatePrune")}z.validatePrune=Bu;Object.assign(Bu,Ee.Namespace.prune("validatePrune"));Object.assign(Bu,Ee.Namespace.validate());function th(){re("createAssert")}z.createAssert=th;Object.assign(th,Yl);function nh(){re("createAssertType")}z.createAssertType=nh;Object.assign(nh,Zl);function ah(){re("createIs")}z.createIs=ah;Object.assign(ah,Mu);function ih(){re("createValidate")}z.createValidate=ih;Object.assign(ih,Eu);function rh(){re("createAssertEquals")}z.createAssertEquals=rh;Object.assign(rh,ep);function sh(){re("createEquals")}z.createEquals=sh;Object.assign(sh,tp);function oh(){re("createValidateEquals")}z.createValidateEquals=oh;Object.assign(oh,np);function uh(){re("createIsParse")}z.createIsParse=uh;Object.assign(uh,ip);function dh(){re("createAssertParse")}z.createAssertParse=dh;Object.assign(dh,ap);function lh(){re("createValidateParse")}z.createValidateParse=lh;Object.assign(lh,rp);function ph(){re("createStringify")}z.createStringify=ph;Object.assign(ph,sp);function yh(){re("createAssertStringify")}z.createAssertStringify=yh;Object.assign(yh,Iu);function fh(){re("createIsStringify")}z.createIsStringify=fh;Object.assign(fh,Cu);function ch(){re("createValidateStringify")}z.createValidateStringify=ch;Object.assign(ch,Su);function mh(){re("createRandom")}z.createRandom=mh;Object.assign(mh,op);function hh(){re("createClone")}z.createClone=hh;Object.assign(hh,up);function xh(){re("createAssertClone")}z.createAssertClone=xh;Object.assign(xh,Ru);function bh(){re("createIsClone")}z.createIsClone=bh;Object.assign(bh,Pu);function gh(){re("createValidateClone")}z.createValidateClone=gh;Object.assign(gh,Nu);function Th(){re("createPrune")}z.createPrune=Th;Object.assign(Th,dp);function vh(){re("createAssertPrune")}z.createAssertPrune=vh;Object.assign(vh,Du);function wh(){re("createIsPrune")}z.createIsPrune=wh;Object.assign(wh,Ou);function _h(){re("createValidatePrune")}z.createValidatePrune=_h;Object.assign(_h,Bu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Ah=ne(gn=>{"use strict";var kh=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),f1=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),c1=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&kh(e,a,t);return f1(e,a),e},m1=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kh(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var h1=c1(lp());gn.default=h1;m1(lp(),gn)});var El={};ji(El,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>mi,FixedNumber:()=>ct,Signer:()=>Bt,VoidSigner:()=>oa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>yt,errors:()=>Wt,getDefaultProvider:()=>eu,logger:()=>Ac,providers:()=>Zn,utils:()=>te,version:()=>nu,wordlists:()=>xi});var ey=_n(td());var qp="logger/5.7.0";var Gp=!1,zp=!1,Gs={debug:1,default:2,info:2,warning:3,error:4,off:5},Wp=Gs.default,nd=null;function Hh(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Kp=Hh(),ad;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(ad||(ad={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Gs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>Gs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=Jp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Kp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Kp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return nd||(nd=new M(qp)),nd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=Gs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Wp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=ad;var $p="bytes/5.7.0";var wt=new M($p);function Xp(a){return!!a.toHexString}function Hi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function na(a){return ae(a)&&!(a.length%2)||on(a)}function Qp(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Qp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a)&&(a=a.toHexString()),ae(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),Hi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),Hi(t)}function ae(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var id="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=id[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a))return a.toHexString();if(ae(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+id[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Pt(a){if(typeof a!="string")a=W(a);else if(!ae(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ae(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Fn(a){let e=rd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function rd(a){typeof a!="string"&&(a=W(a)),ae(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Ln(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(na(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ri(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ae(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ae(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ae(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(a){return a=Ln(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var zs="bignumber/5.7.0";var Fr=ey.default.BN,aa=new M(zs),sd={},Yp=9007199254740991;function ty(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ae(a)||typeof a=="bigint"||on(a))}var Zp=!1,F=class{constructor(e,t){e!==sd&&aa.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return aa.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zp||(Zp=!0,aa.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?aa.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):aa.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(sd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(sd,Lr(new Fr(e))):aa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Yp||e<=-Yp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ae(n)||n[0]==="-"&&ae(n.substring(1))))return F.from(n)}return aa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(a){if(typeof a!="string")return Lr(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&aa.throwArgumentError("invalid hex","value",a),a=Lr(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Lr(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),aa.throwError(a,M.errors.NUMERIC_FAULT,n)}function od(a){return new Fr(a,36).toString(16)}function ud(a){return new Fr(a,16).toString(36)}var jt=new M(zs),Ur={},ay=F.from(0),iy=F.from(-1);function ry(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function dd(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+Vr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function qi(a,e){e==null&&(e=0);let t=dd(e);a=F.from(a);let n=a.lt(ay);n&&(a=a.mul(iy));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&ry("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ia(Ur,t,n,i)}},ct=class{constructor(e,t,n,i){e!==Ur&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ny.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ny.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ct.from("1"+Vr.substring(0,e),this.format),i=qh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ct.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ty(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ct.fromString(qi(e,t),ia.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ia.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=qi(i,n.decimals);return new ct(Ur,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ia.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=qi(i,n.decimals);return new ct(Ur,r,s,n)}static from(e,t){if(typeof e=="string")return ct.fromString(e,t);if(on(e))return ct.fromBytes(e,t);try{return ct.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ct.from(1),qh=ct.from("0.5");var sy="properties/5.7.0";var Gh=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ws=new M(sy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function ht(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return Gh(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Gi(a,e){(!a||typeof a!="object")&&Ws.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Ws.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var zh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(a){if(a==null||zh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tmt(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,mt(n))}return e}return Ws.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function mt(a){return Wh(a)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Un="abi/5.7.0";var Te=new M(Un),si={},uy={calldata:!0,memory:!0,storage:!0},Kh={calldata:!0,memory:!0};function Ks(a,e){if(a==="bytes"||a==="string"){if(uy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&Kh[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function Jh(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(si,{name:e.name||null,type:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Jh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(a,e){return Xh(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==si&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Js(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Dt.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Nt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Dt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Nt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Hr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(si,t)}static fromString(e){let t=e.match(qr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function py(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function yy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Nt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Nt.fromString(e):Nt.fromObject(e)}static fromObject(e){if(Nt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=yy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Nt(si,n)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let n=e.match(qr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(n[2].trim(),!1),py(n[3].trim(),t),Nt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Dt=class extends Nt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=yy(e),n={type:e.type,name:Hr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(si,n)}static fromString(e){let t={type:"function"};e=ly(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(qr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Hr(t.name),t.inputs=jr(i[2],!1),py(i[3].trim(),t),n.length>1){let r=n[1].match(qr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=jr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Hr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return dy(new tn(si,t))}static fromString(e){let t={type:"error"},n=e.match(qr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Hr(t.name),t.inputs=jr(n[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Qh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(a){return(!a||!a.match(Qh))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Xh(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&ld.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ui=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ui.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:ld.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new ui(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var cy=_n(fy());function fe(a){return"0x"+cy.default.keccak_256(j(a))}var Qs={};ji(Qs,{decode:()=>Gr,encode:()=>ra});var my="rlp/5.7.0";var Vn=new M(my);function hy(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function xy(a,e,t){let n=0;for(let i=0;ie+1+n&&Vn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Ty(a,e){if(a.length===0&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Vn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);return e+1+t+n>a.length&&Vn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);e+1+t+n>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function Gr(a){let e=j(a),t=Ty(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",a),t.result}var vy="address/5.7.0";var Aa=new M(vy);function wy(a){ae(a,20)||Aa.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var Yh=9007199254740991;function Zh(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var pd={};for(let a=0;a<10;a++)pd[String(a)]=String(a);for(let a=0;a<26;a++)pd[String.fromCharCode(65+a)]=String(10+a);var _y=Math.floor(Zh(Yh));function ky(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>pd[n]).join("");for(;e.length>=_y;){let n=e.substring(0,_y);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Aa.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=wy(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Aa.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==ky(a)&&Aa.throwArgumentError("bad icap checksum","address",a),e=od(a.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Aa.throwArgumentError("invalid address","address",a);return e}function Ay(a){try{return ce(a),!0}catch{}return!1}function My(a){let e=ud(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function di(a){let e=null;try{e=ce(a.from)}catch{Aa.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(ra([e,t])),12))}function Ey(a,e,t){return Pt(e)!==32&&Aa.throwArgumentError("salt must be 32 bytes","salt",e),Pt(t)!==32&&Aa.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var Xs=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Ys=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Ki=new M(Un);function yd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Ki.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ki.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Ki.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Ki.throwArgumentError("types/value length mismatch","tuple",t);let i=new oi(a.wordSize),r=new oi(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function fd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var Zs=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Ki.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;iio,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>oo,MinInt256:()=>Sy,NegativeOne:()=>ro,One:()=>so,Two:()=>Iy,WeiPerEther:()=>Cy,Zero:()=>Ji});var io="0x0000000000000000000000000000000000000000";var ro=F.from(-1),Ji=F.from(0),so=F.from(1),Iy=F.from(2),Cy=F.from("1000000000000000000"),oo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var uo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=oo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(so).mul(ro)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Ji)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Ny="strings/5.7.0";var Dy=new M(Ny),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Ot;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Ot||(Ot={}));function e6(a,e,t,n,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function Oy(a,e,t,n,i){if(a===Ot.BAD_PREFIX||a===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Ot.OVERRUN?t.length-e-1:0}function t6(a,e,t,n,i){return a===Ot.OVERLONG?(n.push(i),0):(n.push(65533),Oy(a,e,t,n,i))}var lo=Object.freeze({error:e6,ignore:Oy,replace:t6});function md(a,e){e==null&&(e=lo.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Ot.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Ot.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Ot.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Ot.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Ot.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Ot.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(Dy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function cd(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function hd(a,e){return'"'+md(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?cd(t):(t-=65536,cd((t>>10&1023)+55296)+cd((t&1023)+56320))}).join("")+'"'}function po(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return po(md(a,e))}function Ma(a,e=Gt.current){return md(ve(a,e))}function xd(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,$i]).slice(0,32))}function bd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function n6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function By(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Td(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var a6=By("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),i6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),r6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],s6=gd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),o6=gd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),u6=gd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",n6),d6=By("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function l6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function p6(a){return!!Td(a,a6)}function y6(a){let e=Td(a,r6);if(e)return[a+e.s];let t=s6[a];if(t)return t;let n=o6[a];if(n)return[a+n[0]];let i=u6[a];return i||null}function f6(a){return!!Td(a,d6)}function vd(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ma(a);e=l6(e.map(n=>{if(i6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=y6(n);return i||[n]})),e=Ma(po(e),Gt.NFKC),e.forEach(n=>{if(f6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(p6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=po(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var yo=class extends zr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var li=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return yd(e,this.coders,t)}decode(e){return e.coerce(this.name,fd(e,this.coders))}};var fo=new M(Un),c6=new RegExp(/^bytes([0-9]*)$/),m6=new RegExp(/^(u?int)([0-9]*)$/),Qi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xs(e.name);case"bool":return new eo(e.name);case"string":return new yo(e.name);case"bytes":return new to(e.name);case"array":return new Zs(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new li((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new ao(e.name)}let t=e.type.match(m6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&fo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new uo(n/8,t[1]==="int",e.name)}if(t=e.type.match(c6),t){let n=parseInt(t[1]);return(n===0||n>32)&&fo.throwArgumentError("invalid bytes length","param",e),new no(n,e.name)}return fo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ui(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new oi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new li(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&fo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new li(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new li(i,"_").decode(this._getReader(j(t),n))}},Wr=new Qi;function nn(a){return fe(ve(a))}var co="hash/5.7.0";var wd={};ji(wd,{decode:()=>Xi,encode:()=>Yi});function Xi(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function h6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return E+256+(a[o++]<<8|a[o++]);case 1:return E+a[o++];default:return J-1}})}function b6(a){let e=0;return()=>a[e++]}function Uy(a){return b6(x6(a))}function g6(a){return a&1?~a>>1:a>>1}function T6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function Vy(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(_6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(k6(t,a))}return h6(Ly(e))}function w6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function jy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function _6(a,e){let t=1+e(),n=e(),i=w6(e),r=jy(i.length,1+a,e);return Ly(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function k6(a,e){let t=1+e();return jy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function Hy(a){let e=Kr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Kr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function qy(){return Uy(Xi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var mo=qy(),A6=new Set(Kr(mo)),M6=new Set(Kr(mo)),E6=Vy(mo),I6=Hy(mo),Gy=45,zy=95;function Wy(a){return Ma(a)}function C6(a){return a.filter(e=>e!=65039)}function Ky(a){for(let e of a.split(".")){let t=Wy(e);try{for(let n=t.lastIndexOf(zy)-1;n>=0;n--)if(t[n]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function Jy(a){return Ky(S6(a,C6))}function S6(a,e){let t=Wy(a).reverse(),n=[];for(;t.length;){let i=P6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(A6.has(r)){n.push(r);continue}if(M6.has(r))continue;let s=E6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(R6(String.fromCodePoint(...n)))}function R6(a){return a.normalize("NFC")}function P6(a,e){var t;let n=I6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var N6=new M(co),Qy=new Uint8Array(32);Qy.fill(0);function $y(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function _d(a){let e=ve(Jy(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push($y(e.slice(n))),t}function kd(a){try{return _d(a).length!==0}catch{}return!1}function Ea(a){typeof a!="string"&&N6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Qy,t=_d(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Jr(a){return W(ye(_d(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Xy=`Ethereum Signed Message: +"use strict";(()=>{var Oh=Object.create;var qs=Object.defineProperty;var Bh=Object.getOwnPropertyDescriptor;var Fh=Object.getOwnPropertyNames;var Lh=Object.getPrototypeOf,Uh=Object.prototype.hasOwnProperty;var Vh=(a,e,t)=>e in a?qs(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ne=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),ji=(a,e)=>{for(var t in e)qs(a,t,{get:e[t],enumerable:!0})},jh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fh(e))!Uh.call(a,i)&&i!==t&&qs(a,i,{get:()=>e[i],enumerable:!(n=Bh(e,i))||n.enumerable});return a};var _n=(a,e,t)=>(t=a!=null?Oh(Lh(a)):{},jh(e||!a||!a.__esModule?qs(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(Vh(a,typeof e!="symbol"?e+"":e,t),t);var jp=ne(()=>{});var td=ne((Hp,ed)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=jp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>13,qa=w[4]|0,Ne=qa&8191,De=qa>>>13,Ga=w[5]|0,Oe=Ga&8191,Be=Ga>>>13,za=w[6]|0,Fe=za&8191,Le=za>>>13,Wa=w[7]|0,Ue=Wa&8191,Ve=Wa>>>13,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Ja=w[9]|0,qe=Ja&8191,Ge=Ja>>>13,$a=A[0]|0,ze=$a&8191,We=$a>>>13,Qa=A[1]|0,Ke=Qa&8191,Je=Qa>>>13,Xa=A[2]|0,$e=Xa&8191,Qe=Xa>>>13,Ya=A[3]|0,Xe=Ya&8191,Ye=Ya>>>13,Za=A[4]|0,Ze=Za&8191,et=Za>>>13,ei=A[5]|0,tt=ei&8191,nt=ei>>>13,ti=A[6]|0,at=ti&8191,it=ti>>>13,ni=A[7]|0,rt=ni&8191,st=ni>>>13,ai=A[8]|0,ot=ai&8191,ut=ai>>>13,ii=A[9]|0,dt=ii&8191,lt=ii>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var Ta=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var va=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Vu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ju>>>26)|0,ju&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Hu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(qu>>>26)|0,qu&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var Gu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var Zu=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,h[0]=Ta,h[1]=va,h[2]=wa,h[3]=_a,h[4]=ka,h[5]=Vu,h[6]=ju,h[7]=Hu,h[8]=qu,h[9]=Gu,h[10]=zu,h[11]=Wu,h[12]=Ku,h[13]=Ju,h[14]=$u,h[15]=Qu,h[16]=Xu,h[17]=Yu,h[18]=Zu,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function E(I,u){this.x=I,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof ed>"u"||ed,Hp)});var fy=ne((Bg,$s)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof $s=="object"&&$s.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var E=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,ft=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var ft=new Uint32Array(Q);ee>8&255,X[Q+2]=ft>>16&255,X[Q+3]=ft>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,ft=P[K],X[Q]=ft&255,V>1&&(X[Q+1]=ft>>8&255),V>2&&(X[Q+2]=ft>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,ft,Z,le,qa,Ne,De,Ga,Oe,Be,za,Fe,Le,Wa,Ue,Ve,Ka,je,He,Ja,qe,Ge,$a,ze,We,Qa,Ke,Je,Xa,$e,Qe,Ya,Xe,Ye,Za,Ze,et,ei,tt,nt,ti,at,it,ni,rt,st,ai,ot,ut,ii,dt,lt,Ta,va,wa,_a,ka;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],ft=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],qa=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(ft<<1|Z>>>31),D=ee^(Z<<1|ft>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|qa>>>31),D=Q^(qa<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=ft^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=qa^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,Ga=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ti=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,$a=c[21]<<3|c[20]>>>29,va=c[31]<<9|c[30]>>>23,wa=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Xa=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,za=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,_a=c[42]<<2|c[43]>>>30,ka=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ni=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,Qa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ii=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Ya=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,Wa=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ai=c[46]<<24|c[47]>>>8,ei=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,Ja=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,Ta=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,Za=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=Ga^~Be&Fe,c[1]=Oe^~za&Le,c[10]=je^~Ja&Ge,c[11]=He^~qe&$a,c[20]=Je^~$e&Ya,c[21]=Xa^~Qe&Xe,c[30]=ei^~nt&at,c[31]=tt^~ti&it,c[40]=ot^~ii<,c[41]=ut^~dt&Ta,c[2]=Be^~Fe&Wa,c[3]=za^~Le&Ue,c[12]=Ja^~Ge&ze,c[13]=qe^~$a&We,c[22]=$e^~Ya&Ye,c[23]=Qe^~Xe&Za,c[32]=nt^~at&ni,c[33]=ti^~it&rt,c[42]=ii^~lt&va,c[43]=dt^~Ta&wa,c[4]=Fe^~Wa&Ve,c[5]=Le^~Ue&Ka,c[14]=Ge^~ze&Qa,c[15]=$a^~We&Ke,c[24]=Ya^~Ye&Ze,c[25]=Xe^~Za&et,c[34]=at^~ni&st,c[35]=it^~rt&ai,c[44]=lt^~va&_a,c[45]=Ta^~wa&ka,c[6]=Wa^~Ve&Ga,c[7]=Ue^~Ka&Oe,c[16]=ze^~Qa&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=Za^~et&Xa,c[36]=ni^~st&ei,c[37]=rt^~ai&tt,c[46]=va^~_a&ot,c[47]=wa^~ka&ut,c[8]=Ve^~Ga&Be,c[9]=Ka^~Oe&za,c[18]=Qa^~je&Ja,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Xa&Qe,c[38]=st^~ei&nt,c[39]=ai^~tt&ti,c[48]=_a^~ot&ii,c[49]=ka^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)$s.exports=u;else{for(b=0;b{u0.exports=o0;function o0(a,e){if(!a)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var d0=ne((I3,Id)=>{typeof Object.create=="function"?Id.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Id.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var An=ne(Pe=>{"use strict";var W6=nr(),K6=d0();Pe.inherits=K6;function J6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function $6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):J6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=l0;function X6(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=Y6;function Z6(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=Z6;function e2(a,e){return a>>>e|a<<32-e}Pe.rotr32=e2;function t2(a,e){return a<>>32-e}Pe.rotl32=t2;function n2(a,e){return a+e>>>0}Pe.sum32=n2;function a2(a,e,t){return a+e+t>>>0}Pe.sum32_3=a2;function i2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=i2;function r2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=r2;function s2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=s2;function o2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=o2;function u2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=u2;function d2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=d2;function l2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=l2;function p2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=p2;function y2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=y2;function f2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=f2;function c2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=c2;function m2(a,e,t){return a>>>t}Pe.shr64_hi=m2;function h2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=h2});var ar=ne(c0=>{"use strict";var f0=An(),x2=nr();function xo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}c0.BlockHash=xo;xo.prototype.update=function(e,t){if(e=f0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=f0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var b2=An(),jn=b2.rotr32;function g2(a,e,t,n){if(a===0)return m0(e,t,n);if(a===1||a===3)return x0(e,t,n);if(a===2)return h0(e,t,n)}ua.ft_1=g2;function m0(a,e,t){return a&e^~a&t}ua.ch32=m0;function h0(a,e,t){return a&e^a&t^e&t}ua.maj32=h0;function x0(a,e,t){return a^e^t}ua.p32=x0;function T2(a){return jn(a,2)^jn(a,13)^jn(a,22)}ua.s0_256=T2;function v2(a){return jn(a,6)^jn(a,11)^jn(a,25)}ua.s1_256=v2;function w2(a){return jn(a,7)^jn(a,18)^a>>>3}ua.g0_256=w2;function _2(a){return jn(a,17)^jn(a,19)^a>>>10}ua.g1_256=_2});var T0=ne((P3,g0)=>{"use strict";var ir=An(),k2=ar(),A2=Cd(),Sd=ir.rotl32,$r=ir.sum32,M2=ir.sum32_5,E2=A2.ft_1,b0=k2.BlockHash,I2=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;b0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ir.inherits(Hn,b0);g0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var rr=An(),C2=ar(),sr=Cd(),S2=nr(),Mn=rr.sum32,R2=rr.sum32_4,P2=rr.sum32_5,N2=sr.ch32,D2=sr.maj32,O2=sr.s0_256,B2=sr.s1_256,F2=sr.g0_256,L2=sr.g1_256,v0=C2.BlockHash,U2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function qn(){if(!(this instanceof qn))return new qn;v0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=U2,this.W=new Array(64)}rr.inherits(qn,v0);w0.exports=qn;qn.blockSize=512;qn.outSize=256;qn.hmacStrength=192;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Pd=An(),_0=Rd();function da(){if(!(this instanceof da))return new da;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Pd.inherits(da,_0);k0.exports=da;da.blockSize=512;da.outSize=224;da.hmacStrength=192;da.padLength=64;da.prototype._digest=function(e){return e==="hex"?Pd.toHex32(this.h.slice(0,7),"big"):Pd.split32(this.h.slice(0,7),"big")}});var Od=ne((O3,C0)=>{"use strict";var Qt=An(),V2=ar(),j2=nr(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,M0=Qt.shr64_hi,E0=Qt.shr64_lo,Ca=Qt.sum64,Nd=Qt.sum64_hi,Dd=Qt.sum64_lo,H2=Qt.sum64_4_hi,q2=Qt.sum64_4_lo,G2=Qt.sum64_5_hi,z2=Qt.sum64_5_lo,I0=V2.BlockHash,W2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;I0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W2,this.W=new Array(160)}Qt.inherits(En,I0);C0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Bd=An(),S0=Od();function la(){if(!(this instanceof la))return new la;S0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Bd.inherits(la,S0);R0.exports=la;la.blockSize=1024;la.outSize=384;la.hmacStrength=192;la.padLength=128;la.prototype._digest=function(e){return e==="hex"?Bd.toHex32(this.h.slice(0,12),"big"):Bd.split32(this.h.slice(0,12),"big")}});var N0=ne(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Rd();or.sha384=P0();or.sha512=Od()});var U0=ne(L0=>{"use strict";var pi=An(),r5=ar(),bo=pi.rotl32,D0=pi.sum32,Qr=pi.sum32_3,O0=pi.sum32_4,F0=r5.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;F0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pi.inherits(Wn,F0);L0.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=D0(bo(O0(n,B0(_,i,r,s),e[u5[_]+t],s5(_)),l5[_]),o);n=o,o=s,s=bo(r,10),r=i,i=v,v=D0(bo(O0(l,B0(79-_,p,f,x),e[d5[_]+t],o5(_)),p5[_]),C),l=C,C=x,x=bo(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,C),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],n,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h,"little"):pi.split32(this.h,"little")};function B0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function s5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function o5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var u5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var j0=ne((U3,V0)=>{"use strict";var y5=An(),f5=nr();function ur(a,e,t){if(!(this instanceof ur))return new ur(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(y5.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),f5(e.length<=this.blockSize);for(var t=e.length;t{var St=H0;St.utils=An();St.common=ar();St.sha=N0();St.ripemd=U0();St.hmac=j0();St.sha1=St.sha.sha1;St.sha256=St.sha.sha256;St.sha224=St.sha.sha224;St.sha384=St.sha.sha384;St.sha512=St.sha.sha512;St.ripemd160=St.ripemd.ripemd160});var nl=ne((tl,xf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=E,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,E=E+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof ol<"u"?gf.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(ol)});var Gf=ne((I4,qf)=>{"use strict";var Ho="qpzry9x8gf2tvdw0s3jn54khce6mua7l",yl={};for(ss=0;ss>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function jf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=xr(e)^n>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=jf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=xr(n)^s,i+=Ho.charAt(s)}for(r=0;r<6;++r)n=xr(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Ho.charAt(o)}return i}function Hf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=jf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function X5(){var a=Hf.apply(null,arguments);if(typeof a=="object")return a}function Y5(a){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function qo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(zl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Kl=ne(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$dictionary=void 0;iu.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Cs=ne((jA,um)=>{um.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ne(Fa=>{var Me=Cs(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],dm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),lm=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],jx=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];Fa.words=()=>({type:Me.SET,set:dm(),not:!1});Fa.notWords=()=>({type:Me.SET,set:dm(),not:!0});Fa.ints=()=>({type:Me.SET,set:Jl(),not:!1});Fa.notInts=()=>({type:Me.SET,set:Jl(),not:!0});Fa.whitespace=()=>({type:Me.SET,set:lm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:lm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:jx(),not:!0})});var ym=ne(Ss=>{var pm=Cs(),Er=$l(),Hx="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",qx={0:0,t:9,n:10,v:11,f:12,r:13};Ss.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?Hx.indexOf(l):qx[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Ss.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Er.words());else if(i[2])t.push(Er.ints());else if(i[3])t.push(Er.whitespace());else if(i[4])t.push(Er.notWords());else if(i[5])t.push(Er.notInts());else if(i[6])t.push(Er.notWhitespace());else if(i[7])t.push({type:pm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:pm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var fm=ne(Rs=>{var ru=Cs();Rs.wordBoundary=()=>({type:ru.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:ru.POSITION,value:"B"});Rs.begin=()=>({type:ru.POSITION,value:"^"});Rs.end=()=>({type:ru.POSITION,value:"$"})});var cm=ne((zA,Ql)=>{var Ir=ym(),xn=Cs(),_i=$l(),su=fm();Ql.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(a,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};mm.exports=La});var bm=ne((KA,xm)=>{var ou=cm(),Ps=hm(),ki=ou.types;xm.exports=class Ns{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=ou(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ns.prototype.max!=null?Ns.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case ki.ROOT:case ki.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var Gx=Ai&&Ai.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var zx=Gx(bm()),Wx;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new zx.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(Wx=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ds=ne(Cr=>{"use strict";var Kx=Cr&&Cr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.TypeGuardError=void 0;var Jx=function(a){Kx(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Cr.TypeGuardError=Jx});var Tm=ne(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$any=void 0;var $x=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};uu.$any=$x});var vm=ne(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$every=void 0;var Qx=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$guard=void 0;var Xx=Ds(),Yx=function(a){return function(e,t){if(e===!0)throw new Xx.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};lu.$guard=Yx});var _m=ne(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_between=void 0;var Zx=function(a,e,t){return e<=a&&a<=t};pu.$is_between=Zx});var km=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_custom=void 0;var eb=Kl(),tb=function(a,e,t,n){var i,r=(i=eb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};yu.$is_custom=tb});var Am=ne(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_date=void 0;var nb=function(a){return ab.test(a)};fu.$is_date=nb;var ab=/^(\d{4})-(\d{2})-(\d{2})$/});var Mm=ne(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_datetime=void 0;var ib=function(a){return!isNaN(new Date(a).getTime())};cu.$is_datetime=ib});var Em=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_email=void 0;var rb=function(a){return sb.test(a)};mu.$is_email=rb;var sb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Im=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_ipv4=void 0;var ob=function(a){return ub.test(a)};hu.$is_ipv4=ob;var ub=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Cm=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_ipv6=void 0;var db=function(a){return lb.test(a)};xu.$is_ipv6=db;var lb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Sm=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_url=void 0;var pb=function(a){return yb.test(a)};bu.$is_url=pb;var yb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Rm=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_uuid=void 0;var fb=function(a){return cb.test(a)};gu.$is_uuid=fb;var cb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Pm=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$join=void 0;var mb=function(a){return hb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Tu.$join=mb;var hb=function(a){return xb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},xb=function(a){return bb.has(a)},bb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Nm=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$number=void 0;var gb=Ds(),Tb=function(a){if(isFinite(a)===!1)throw new gb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};vu.$number=Tb});var Dm=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$report=void 0;var vb=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};wu.$report=vb});var Om=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$rest=void 0;var wb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};_u.$rest=wb});var Bm=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$string=void 0;var _b=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};ku.$string=_b});var Fm=ne(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$tail=void 0;var kb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Au.$tail=kb});var jm=ne(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Fb.$number,string:Vb.$string,tail:jb.$tail,rest:Ub.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Ab.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Lm.RandomGenerator,pick:Lm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Um.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(Hb=Mi.Namespace||(Mi.Namespace={}))});var Hm=ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var qb;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(qb=Os.MapUtil||(Os.MapUtil={}))});var Gm=ne(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Wm=ne(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ne(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var Qm=ne($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var Ym=ne(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ne(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var dp=ne(z=>{"use strict";var Gb=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Ei=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Gb(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Sr=Kl(),Ee=jm(),zb=Hm();Ei(Gm(),z);Ei(Wm(),z);Ei(Jm(),z);Ei(Qm(),z);Ei(Ym(),z);Ei(eh(),z);Ei(Ds(),z);function Xl(){re("assert")}z.assert=Xl;Object.assign(Xl,Ee.Namespace.assert("assert"));function Yl(){re("assertType")}z.assertType=Yl;Object.assign(Yl,Ee.Namespace.assert("assertType"));function Mu(){re("is")}z.is=Mu;Object.assign(Mu,Ee.Namespace.assert("is"));function Eu(){re("validate")}z.validate=Eu;Object.assign(Eu,Ee.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Ee.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Ee.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Ee.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Sr.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Sr.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=zb.MapUtil.take(Sr.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Sr.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function Wb(){re("application")}z.application=Wb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Mu);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Eu);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Iu(){re("assertStringify")}z.assertStringify=Iu;Object.assign(Iu,Ee.Namespace.assert("assertStringify"));Object.assign(Iu,Ee.Namespace.stringify("assertStringify"));function Cu(){re("isStringify")}z.isStringify=Cu;Object.assign(Cu,Ee.Namespace.is());Object.assign(Cu,Ee.Namespace.stringify("isStringify"));function Su(){re("validateStringify")}z.validateStringify=Su;Object.assign(Su,Ee.Namespace.validate());Object.assign(Su,Ee.Namespace.stringify("validateStringify"));function Kb(){re("metadata")}z.metadata=Kb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function Jb(){re("literals")}z.literals=Jb;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Ru(){re("assertClone")}z.assertClone=Ru;Object.assign(Ru,Ee.Namespace.assert("assertClone"));Object.assign(Ru,Ee.Namespace.clone("assertClone"));function Pu(){re("isClone")}z.isClone=Pu;Object.assign(Pu,Ee.Namespace.is());Object.assign(Pu,Ee.Namespace.clone("isClone"));function Nu(){re("validateClone")}z.validateClone=Nu;Object.assign(Nu,Ee.Namespace.validate());Object.assign(Nu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Du(){re("assertPrune")}z.assertPrune=Du;Object.assign(Du,Ee.Namespace.assert("assertPrune"));Object.assign(Du,Ee.Namespace.prune("assertPrune"));function Ou(){re("isPrune")}z.isPrune=Ou;Object.assign(Ou,Ee.Namespace.is());Object.assign(Ou,Ee.Namespace.prune("isPrune"));function Bu(){re("validatePrune")}z.validatePrune=Bu;Object.assign(Bu,Ee.Namespace.prune("validatePrune"));Object.assign(Bu,Ee.Namespace.validate());function th(){re("createAssert")}z.createAssert=th;Object.assign(th,Xl);function nh(){re("createAssertType")}z.createAssertType=nh;Object.assign(nh,Yl);function ah(){re("createIs")}z.createIs=ah;Object.assign(ah,Mu);function ih(){re("createValidate")}z.createValidate=ih;Object.assign(ih,Eu);function rh(){re("createAssertEquals")}z.createAssertEquals=rh;Object.assign(rh,Zl);function sh(){re("createEquals")}z.createEquals=sh;Object.assign(sh,ep);function oh(){re("createValidateEquals")}z.createValidateEquals=oh;Object.assign(oh,tp);function uh(){re("createIsParse")}z.createIsParse=uh;Object.assign(uh,ap);function dh(){re("createAssertParse")}z.createAssertParse=dh;Object.assign(dh,np);function lh(){re("createValidateParse")}z.createValidateParse=lh;Object.assign(lh,ip);function ph(){re("createStringify")}z.createStringify=ph;Object.assign(ph,rp);function yh(){re("createAssertStringify")}z.createAssertStringify=yh;Object.assign(yh,Iu);function fh(){re("createIsStringify")}z.createIsStringify=fh;Object.assign(fh,Cu);function ch(){re("createValidateStringify")}z.createValidateStringify=ch;Object.assign(ch,Su);function mh(){re("createRandom")}z.createRandom=mh;Object.assign(mh,sp);function hh(){re("createClone")}z.createClone=hh;Object.assign(hh,op);function xh(){re("createAssertClone")}z.createAssertClone=xh;Object.assign(xh,Ru);function bh(){re("createIsClone")}z.createIsClone=bh;Object.assign(bh,Pu);function gh(){re("createValidateClone")}z.createValidateClone=gh;Object.assign(gh,Nu);function Th(){re("createPrune")}z.createPrune=Th;Object.assign(Th,up);function vh(){re("createAssertPrune")}z.createAssertPrune=vh;Object.assign(vh,Du);function wh(){re("createIsPrune")}z.createIsPrune=wh;Object.assign(wh,Ou);function _h(){re("createValidatePrune")}z.createValidatePrune=_h;Object.assign(_h,Bu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Ah=ne(gn=>{"use strict";var kh=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),$b=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),Qb=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&kh(e,a,t);return $b(e,a),e},Xb=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kh(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Yb=Qb(dp());gn.default=Yb;Xb(dp(),gn)});var El={};ji(El,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>mi,FixedNumber:()=>ct,Signer:()=>Bt,VoidSigner:()=>oa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>yt,errors:()=>Wt,getDefaultProvider:()=>eu,logger:()=>Ac,providers:()=>Zn,utils:()=>te,version:()=>nu,wordlists:()=>xi});var ey=_n(td());var qp="logger/5.7.0";var Gp=!1,zp=!1,Gs={debug:1,default:2,info:2,warning:3,error:4,off:5},Wp=Gs.default,nd=null;function Hh(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Kp=Hh(),ad;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(ad||(ad={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Gs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>Gs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=Jp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Kp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Kp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return nd||(nd=new M(qp)),nd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=Gs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Wp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=ad;var $p="bytes/5.7.0";var wt=new M($p);function Xp(a){return!!a.toHexString}function Hi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function na(a){return ae(a)&&!(a.length%2)||on(a)}function Qp(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Qp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a)&&(a=a.toHexString()),ae(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),Hi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),Hi(t)}function ae(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var id="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=id[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a))return a.toHexString();if(ae(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+id[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Pt(a){if(typeof a!="string")a=W(a);else if(!ae(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ae(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Fn(a){let e=rd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function rd(a){typeof a!="string"&&(a=W(a)),ae(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Ln(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(na(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ri(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ae(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ae(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ae(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(a){return a=Ln(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var zs="bignumber/5.7.0";var Fr=ey.default.BN,aa=new M(zs),sd={},Yp=9007199254740991;function ty(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ae(a)||typeof a=="bigint"||on(a))}var Zp=!1,F=class{constructor(e,t){e!==sd&&aa.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return aa.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zp||(Zp=!0,aa.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?aa.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):aa.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(sd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(sd,Lr(new Fr(e))):aa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Yp||e<=-Yp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ae(n)||n[0]==="-"&&ae(n.substring(1))))return F.from(n)}return aa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(a){if(typeof a!="string")return Lr(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&aa.throwArgumentError("invalid hex","value",a),a=Lr(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Lr(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),aa.throwError(a,M.errors.NUMERIC_FAULT,n)}function od(a){return new Fr(a,36).toString(16)}function ud(a){return new Fr(a,16).toString(36)}var jt=new M(zs),Ur={},ay=F.from(0),iy=F.from(-1);function ry(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function dd(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+Vr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function qi(a,e){e==null&&(e=0);let t=dd(e);a=F.from(a);let n=a.lt(ay);n&&(a=a.mul(iy));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&ry("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ia(Ur,t,n,i)}},ct=class{constructor(e,t,n,i){e!==Ur&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ny.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ny.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ct.from("1"+Vr.substring(0,e),this.format),i=qh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ct.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ty(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ct.fromString(qi(e,t),ia.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ia.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=qi(i,n.decimals);return new ct(Ur,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ia.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=qi(i,n.decimals);return new ct(Ur,r,s,n)}static from(e,t){if(typeof e=="string")return ct.fromString(e,t);if(on(e))return ct.fromBytes(e,t);try{return ct.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ct.from(1),qh=ct.from("0.5");var sy="properties/5.7.0";var Gh=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ws=new M(sy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function ht(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return Gh(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Gi(a,e){(!a||typeof a!="object")&&Ws.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Ws.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var zh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(a){if(a==null||zh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tmt(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,mt(n))}return e}return Ws.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function mt(a){return Wh(a)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Un="abi/5.7.0";var Te=new M(Un),si={},uy={calldata:!0,memory:!0,storage:!0},Kh={calldata:!0,memory:!0};function Ks(a,e){if(a==="bytes"||a==="string"){if(uy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&Kh[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function Jh(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(si,{name:e.name||null,type:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Jh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(a,e){return Xh(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==si&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Js(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Dt.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Nt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Dt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Nt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Hr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(si,t)}static fromString(e){let t=e.match(qr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function py(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function yy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Nt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Nt.fromString(e):Nt.fromObject(e)}static fromObject(e){if(Nt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=yy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Nt(si,n)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let n=e.match(qr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(n[2].trim(),!1),py(n[3].trim(),t),Nt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Dt=class extends Nt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=yy(e),n={type:e.type,name:Hr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(si,n)}static fromString(e){let t={type:"function"};e=ly(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(qr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Hr(t.name),t.inputs=jr(i[2],!1),py(i[3].trim(),t),n.length>1){let r=n[1].match(qr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=jr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Hr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return dy(new tn(si,t))}static fromString(e){let t={type:"error"},n=e.match(qr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Hr(t.name),t.inputs=jr(n[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Qh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(a){return(!a||!a.match(Qh))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Xh(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&ld.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ui=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ui.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:ld.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new ui(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var cy=_n(fy());function fe(a){return"0x"+cy.default.keccak_256(j(a))}var Qs={};ji(Qs,{decode:()=>Gr,encode:()=>ra});var my="rlp/5.7.0";var Vn=new M(my);function hy(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function xy(a,e,t){let n=0;for(let i=0;ie+1+n&&Vn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Ty(a,e){if(a.length===0&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Vn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);return e+1+t+n>a.length&&Vn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);e+1+t+n>a.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function Gr(a){let e=j(a),t=Ty(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",a),t.result}var vy="address/5.7.0";var Aa=new M(vy);function wy(a){ae(a,20)||Aa.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var Yh=9007199254740991;function Zh(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var pd={};for(let a=0;a<10;a++)pd[String(a)]=String(a);for(let a=0;a<26;a++)pd[String.fromCharCode(65+a)]=String(10+a);var _y=Math.floor(Zh(Yh));function ky(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>pd[n]).join("");for(;e.length>=_y;){let n=e.substring(0,_y);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Aa.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=wy(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Aa.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==ky(a)&&Aa.throwArgumentError("bad icap checksum","address",a),e=od(a.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Aa.throwArgumentError("invalid address","address",a);return e}function Ay(a){try{return ce(a),!0}catch{}return!1}function My(a){let e=ud(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function di(a){let e=null;try{e=ce(a.from)}catch{Aa.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(ra([e,t])),12))}function Ey(a,e,t){return Pt(e)!==32&&Aa.throwArgumentError("salt must be 32 bytes","salt",e),Pt(t)!==32&&Aa.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var Xs=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Ys=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Ki=new M(Un);function yd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Ki.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ki.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Ki.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Ki.throwArgumentError("types/value length mismatch","tuple",t);let i=new oi(a.wordSize),r=new oi(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function fd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var Zs=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Ki.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;iio,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>oo,MinInt256:()=>Sy,NegativeOne:()=>ro,One:()=>so,Two:()=>Iy,WeiPerEther:()=>Cy,Zero:()=>Ji});var io="0x0000000000000000000000000000000000000000";var ro=F.from(-1),Ji=F.from(0),so=F.from(1),Iy=F.from(2),Cy=F.from("1000000000000000000"),oo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var uo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=oo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(so).mul(ro)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Ji)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Ny="strings/5.7.0";var Dy=new M(Ny),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Ot;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Ot||(Ot={}));function e6(a,e,t,n,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function Oy(a,e,t,n,i){if(a===Ot.BAD_PREFIX||a===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Ot.OVERRUN?t.length-e-1:0}function t6(a,e,t,n,i){return a===Ot.OVERLONG?(n.push(i),0):(n.push(65533),Oy(a,e,t,n,i))}var lo=Object.freeze({error:e6,ignore:Oy,replace:t6});function md(a,e){e==null&&(e=lo.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Ot.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Ot.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Ot.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Ot.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Ot.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Ot.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(Dy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function cd(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function hd(a,e){return'"'+md(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?cd(t):(t-=65536,cd((t>>10&1023)+55296)+cd((t&1023)+56320))}).join("")+'"'}function po(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return po(md(a,e))}function Ma(a,e=Gt.current){return md(ve(a,e))}function xd(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,$i]).slice(0,32))}function bd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function n6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function By(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Td(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var a6=By("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),i6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),r6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],s6=gd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),o6=gd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),u6=gd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",n6),d6=By("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function l6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function p6(a){return!!Td(a,a6)}function y6(a){let e=Td(a,r6);if(e)return[a+e.s];let t=s6[a];if(t)return t;let n=o6[a];if(n)return[a+n[0]];let i=u6[a];return i||null}function f6(a){return!!Td(a,d6)}function vd(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ma(a);e=l6(e.map(n=>{if(i6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=y6(n);return i||[n]})),e=Ma(po(e),Gt.NFKC),e.forEach(n=>{if(f6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(p6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=po(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var yo=class extends zr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var li=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return yd(e,this.coders,t)}decode(e){return e.coerce(this.name,fd(e,this.coders))}};var fo=new M(Un),c6=new RegExp(/^bytes([0-9]*)$/),m6=new RegExp(/^(u?int)([0-9]*)$/),Qi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xs(e.name);case"bool":return new eo(e.name);case"string":return new yo(e.name);case"bytes":return new to(e.name);case"array":return new Zs(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new li((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new ao(e.name)}let t=e.type.match(m6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&fo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new uo(n/8,t[1]==="int",e.name)}if(t=e.type.match(c6),t){let n=parseInt(t[1]);return(n===0||n>32)&&fo.throwArgumentError("invalid bytes length","param",e),new no(n,e.name)}return fo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ui(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new oi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new li(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&fo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new li(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new li(i,"_").decode(this._getReader(j(t),n))}},Wr=new Qi;function nn(a){return fe(ve(a))}var co="hash/5.7.0";var wd={};ji(wd,{decode:()=>Xi,encode:()=>Yi});function Xi(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function h6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return E+256+(a[o++]<<8|a[o++]);case 1:return E+a[o++];default:return J-1}})}function b6(a){let e=0;return()=>a[e++]}function Uy(a){return b6(x6(a))}function g6(a){return a&1?~a>>1:a>>1}function T6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function Vy(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(_6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(k6(t,a))}return h6(Ly(e))}function w6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function jy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function _6(a,e){let t=1+e(),n=e(),i=w6(e),r=jy(i.length,1+a,e);return Ly(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function k6(a,e){let t=1+e();return jy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function Hy(a){let e=Kr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Kr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function qy(){return Uy(Xi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var mo=qy(),A6=new Set(Kr(mo)),M6=new Set(Kr(mo)),E6=Vy(mo),I6=Hy(mo),Gy=45,zy=95;function Wy(a){return Ma(a)}function C6(a){return a.filter(e=>e!=65039)}function Ky(a){for(let e of a.split(".")){let t=Wy(e);try{for(let n=t.lastIndexOf(zy)-1;n>=0;n--)if(t[n]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function Jy(a){return Ky(S6(a,C6))}function S6(a,e){let t=Wy(a).reverse(),n=[];for(;t.length;){let i=P6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(A6.has(r)){n.push(r);continue}if(M6.has(r))continue;let s=E6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(R6(String.fromCodePoint(...n)))}function R6(a){return a.normalize("NFC")}function P6(a,e){var t;let n=I6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var N6=new M(co),Qy=new Uint8Array(32);Qy.fill(0);function $y(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function _d(a){let e=ve(Jy(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push($y(e.slice(n))),t}function kd(a){try{return _d(a).length!==0}catch{}return!1}function Ea(a){typeof a!="string"&&N6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Qy,t=_d(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Jr(a){return W(ye(_d(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Xy=`Ethereum Signed Message: `;function Zi(a){return typeof a=="string"&&(a=ve(a)),fe(ye([ve(Xy),ve(String(a.length)),a]))}var D6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new M(co),t0=new Uint8Array(32);t0.fill(0);var O6=F.from(-1),n0=F.from(0),a0=F.from(1),B6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function F6(a){let e=j(a),t=e.length%32;return t?kt([e,t0.slice(t)]):W(e)}var L6=me(a0.toHexString(),32),U6=me(n0.toHexString(),32),Yy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ad=["name","version","chainId","verifyingContract","salt"];function Zy(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var V6={name:Zy("name"),version:Zy("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Md(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=B6.mask(t?n-1:n),r=t?i.add(a0).mul(O6):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),F6(n)}}}switch(a){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?L6:U6};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(mt(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Md(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=e0(o,e[o])+l.map(p=>e0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Md(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Md(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=Yy[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Ad.indexOf(n.name)-Ad.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return fe(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return D6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ae(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ae(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Ad.forEach(l=>{let p=e[l];p!=null&&(i[l]=V6[l](p),r.push({name:l,type:Yy[l]}))});let s=bt.from(t),o=_e(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Un);var er=class extends en{},tr=class extends en{},Ed=class extends en{},sa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},j6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function i0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ia=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ht(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Nt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Wr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ae(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ae(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ae(e)){let n=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ht(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ht(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=j6[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return gt.throwError("call revert exception"+r,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ae(n[0],32)||n[0].toLowerCase()!==C)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new sa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new sa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw i0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new tr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new er({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Ed({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var r0="abstract-provider/5.7.0";var H6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},q6=new M(r0),ho=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){q6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return H6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var s0="abstract-signer/5.7.0";var kn=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ln=new M(s0),G6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],z6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],Bt=class{constructor(){ln.checkAbstract(new.target,Bt),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)G6.indexOf(n)===-1&&ln.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>kn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&ln.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(z6.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},oa=class extends Bt{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new oa(this.address,e)}};var pe=_n(td()),Kn=_n(Fd());function dr(a,e,t){return t={path:e,exports:{},require:function(n,i){return c5(n,i??t.path)}},a(t,t.exports),t.exports}function c5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var jd=G0;function G0(a,e){if(!a)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=dr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),vo=an.getNAF,m5=an.getJSF,wo=an.assert;function Ra(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var yi=Ra;Ra.prototype.point=function(){throw new Error("Not implemented")};Ra.prototype.validate=function(){throw new Error("Not implemented")};Ra.prototype._fixedNafMul=function(e,t){wo(e.precomputed);var n=e._getDoubles(),i=vo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];wo(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Ra.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=vo(n[v],s[v],this._bitLength),l[S]=vo(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=m5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Rt(a,e,t,n){yi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Hd(Rt,yi.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Rt(this,e,t,n)};Rt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Rt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Rt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Rt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var go=dr(function(a,e){"use strict";var t=e;t.base=yi,t.short=x5,t.mont=null,t.edwards=null}),To=dr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new go.short(o):o.type==="edwards"?this.curve=new go.edwards(o):this.curve=new go.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Kn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Kn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Kn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Kn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Kn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Kn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Kn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Kn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Sa(a){if(!(this instanceof Sa))return new Sa(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(a.entropy,a.entropyEnc||"hex"),t=In.toArray(a.nonce,a.nonceEnc||"hex"),n=In.toArray(a.pers,a.persEnc||"hex");jd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var z0=Sa;Sa.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Sa.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=In.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var b5=an.assert;function _o(a,e){if(a instanceof _o)return a;this._importDER(a,e)||(b5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var ko=_o;function g5(){this.place=0}function Ld(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function q0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}_o.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=q0(t),n=q0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Ud(i,t.length),i=i.concat(t),i.push(2),Ud(i,n.length);var r=i.concat(n),s=[48];return Ud(s,r.length),s=s.concat(r),an.encode(s,e)};var T5=function(){throw new Error("unsupported")},W0=an.assert;function pn(a){if(!(this instanceof pn))return new pn(a);typeof a=="string"&&(W0(Object.prototype.hasOwnProperty.call(To,a),"Unknown curve "+a),a=To[a]),a instanceof To.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var v5=pn;pn.prototype.keyPair=function(e){return new qd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return qd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return qd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||T5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new z0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new ko({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new ko(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(a,e,t,n){W0((3&t)===t,"The recovery param is more than two bits"),e=new ko(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};pn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new ko(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var w5=dr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=go,t.curves=To,t.ec=v5,t.eddsa=null}),K0=w5.ec;var J0="signing-key/5.7.0";var zd=new M(J0),Gd=null;function Jn(){return Gd||(Gd=new K0("secp256k1")),Gd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Pt(this.privateKey)!==32&&zd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Jn().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Jn().keyFromPublic(j(this.publicKey)),n=Jn().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&zd.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Ln({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Jn().keyFromPrivate(j(this.privateKey)),n=Jn().keyFromPublic(j(Xr(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Ao(a,e){let t=Ln(e),n={r:j(t.r),s:j(t.s)};return"0x"+Jn().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function Xr(a,e){let t=j(a);if(t.length===32){let n=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return zd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $0="transactions/5.7.0";var Ut=new M($0),Mo;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Mo||(Mo={}));function Kd(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?Ji:F.from(a)}var _5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],k5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(a){let e=Xr(a);return ce(Ie(fe(Ie(e,1)),12))}function fi(a,e){return mn(Ao(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function Wd(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Pt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Wd(t[0],t[1])):Wd(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return Wd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Q0(a){return sn(a).map(e=>[e.address,e.storageKeys])}function X0(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",Q0(a.accessList||[])];if(e){let n=Ln(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",ra(t)])}function Y0(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",Q0(a.accessList||[])];if(e){let n=Ln(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",ra(t)])}function A5(a,e){Gi(a,k5);let t=[];_5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!na(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return ra(t);let i=Ln(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),ra(t)}function Yr(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),A5(a,e);switch(a.type){case 1:return Y0(a,e);case 2:return X0(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function Z0(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=fe(t(a));a.from=fi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function M5(a){let e=Gr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Kd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),Z0(i,e.slice(9),X0)),i}function E5(a){let e=Gr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Kd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),Z0(t,e.slice(8),Y0)),t}function I5(a){let e=Gr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Kd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(ra(i));try{t.from=fi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function Eo(a){let e=j(a);if(e[0]>127)return I5(e);switch(e[0]){case 1:return E5(e);case 2:return M5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ef="contracts/5.7.0";var Pa=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new M(ef),C5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Io(a,e){return Pa(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function Zr(a,e,t){return Pa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>Zr(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Io(a,e):t.type==="tuple"?yield Zr(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Zr(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Ro(a,e,t){return Pa(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:Io(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Pa(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Io(a.provider,n.from));let i=yield Ce({args:Zr(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function S5(a,e){return function(...t){return Ro(a,e,t)}}function R5(a,e){let t=a.signer||a.provider;return function(...n){return Pa(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Ro(a,e,n);return yield t.estimateGas(i)})}}function nf(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=mt(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function af(a,e,t){let n=a.signer||a.provider;return function(...i){return Pa(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Ro(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===M.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function P5(a,e){return function(...t){return Pa(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Ro(a,e,t),i=yield a.signer.sendTransaction(n);return nf(a,i),i})}}function tf(a,e,t){return e.constant?af(a,e,t):P5(a,e)}function rf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var ci=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Jd=class extends ci{constructor(){super("error",null)}},Co=class extends ci{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(rf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Wi(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},So=class extends ci{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,n){B(this,"interface",ht(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):Bt.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Io(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,tf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,tf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,af(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,S5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,R5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return di(e)}static getInterface(e){return Ia.isInterface(e)?e:new Ia(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new oa(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return sa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Jd);if(e==="event")return this._normalizeRunningEvent(new ci("event",null));if(e==="*")return this._normalizeRunningEvent(new So(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Co(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Co(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new ci(rf(t),t))}return this._normalizeRunningEvent(new So(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=mt(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ae(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends lr{},mi=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:on(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ae(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!Bt.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",ht(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!C5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Pa(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield Zr(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return nf(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return di(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Po=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(ya(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return pf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(yr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fr));let n=new Uint8Array(37);if(e&fr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(ya($n.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=No(F.from(r).add(this.privateKey).mod(B5)):l=new cn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(yr,o,l,this.fingerprint,No(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);n=n._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(ya($n.sha512,F5,n));return new It(yr,No(i.slice(0,32)),null,"0x00000000",No(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=Yd(n),e=bi(cr(e,n),n),It._fromSeed(Zd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=pa.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(yr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(yr,W(o.slice(1)),null,i,s,r,n,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Zd(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return hi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function cr(a,e){e=Yd(e),ns.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=yf(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function bi(a,e){if(e=Yd(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&L5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&yf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function ff(a,e){try{return cr(a,e),!0}catch{}return!1}function cf(a){return(typeof a!="number"||a<0||a>=fr||a%1)&&ns.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var mf="random/5.7.0";var el=new M(mf);function U5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hf=U5(),Do=hf.crypto||hf.msCrypto;(!Do||!Do.getRandomValues)&&(el.warn("WARNING: Missing strong random number source"),Do={getRandomValues:function(a){return el.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(a){(a<=0||a>1024||a%1||a!=a)&&el.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Do.getRandomValues(e),j(e)}function as(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var al=_n(nl());var Oo="json-wallets/5.7.0";function ca(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function mr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new ma.default.Counter(x),J=new ma.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:bf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Qn(16),N=new ma.default.Counter(R),q=new ma.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+mr(I.getUTCMonth()+1,2)+"-"+mr(I.getUTCDate(),2)+"T"+mr(I.getUTCHours(),2)+"-"+mr(I.getUTCMinutes(),2)+"-"+mr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(a,e,t){if(Bo(a)){t&&t(0);let n=rl(a,e);return t&&t(1),Promise.resolve(n)}return Fo(a)?Mf(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function If(a,e){if(Bo(a))return rl(a,e);if(Fo(a))return Af(a,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var Sf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},hr=new M(Cf);function G5(a){return a!=null&&ae(a.privateKey,32)&&a.address!=null}function z5(a){let e=a.mnemonic;return e&&e.phrase}var Cn=class extends Bt{constructor(e,t){if(super(),G5(e)){let n=new cn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),z5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||fa,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&hr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&hr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&hr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,n)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,n){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Br(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),ll(this,e,t,n)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=bi(t,e.locale);return Cn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ef(e,t,n).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(If(e,t))}static fromMnemonic(e,t,n){return t||(t=fa),new Cn(It.fromMnemonic(e,null,n).derivePath(t))}};function Rf(a,e){return fi(Zi(a),e)}function Pf(a,e,t,n){return fi(bt.hash(a,e,t),n)}var Zn={};ji(Zn,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Yn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>Y,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>_l,JsonRpcBatchProvider:()=>Zo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>As,WebSocketProvider:()=>ba,getDefaultProvider:()=>eu,getNetwork:()=>rs,isCommunityResourcable:()=>fl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new M(Nf);function W5(a){return a&&typeof a.renetwork=="function"}function ha(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ha(t)},e}function Vo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return Vo(a,n)},t}var Of={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ha("homestead")},Bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ha("ropsten")},Ff={chainId:63,name:"classicMordor",_defaultProvider:Vo("https://www.ethercluster.com/mordor","classicMordor")},Uo={unspecified:{chainId:0,name:"unspecified"},homestead:Of,mainnet:Of,morden:{chainId:2,name:"morden"},ropsten:Bf,testnet:Bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ha("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ha("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ha("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ha("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Vo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Vo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ha("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ha("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function rs(a){if(a==null)return null;if(typeof a=="number"){for(let n in Uo){let i=Uo[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Uo[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Uo[a.name];if(!e)return typeof a.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(W5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lf="web/5.7.1";var K5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Uf(a,e){return K5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var J5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new M(Lf);function Vf(a){return new Promise(e=>{setTimeout(e,a)})}function Na(a,e){if(a==null)return null;if(typeof a=="string")return a;if(na(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function $5(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function pl(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+Yi(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):$5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Na(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return J5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Na(H,U.headers?U.headers["content-type"]:null),requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return pl(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var xl=_n(Gf());var Ae="providers/5.7.2";var os=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ae(e))?e.toLowerCase():os.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ae(e,32))return null;let t=ce(Ie(e,12));return t===io?null:t}contractAddress(e){return di(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ae(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Pt(n)!==32?os.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ae(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ae(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ae(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Eo(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):os.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&os.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function fl(a){return a&&typeof a.isCommunityResource=="function"}function us(a){return fl(a)&&a.isCommunityResource()}var zf=!1;function Xn(){zf||(zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new M(Ae),ax=10;function Wf(a){return a==null?"null":(Pt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Kf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Wf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Wf(e)}).join("&")}function ix(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function br(a){if(typeof a=="string"){if(a=a.toLowerCase(),Pt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Kf(a);if(ho.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Kf(a.topics||[])}throw new Error("invalid event - "+a)}function ds(){return new Date().getTime()}function Jf(a){return new Promise(e=>{setTimeout(e,a)})}var rx=["block","network","pending","poll"],bl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=ix(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||rx.indexOf(this.tag)>=0}},sx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function cl(a){return me(F.from(a).toHexString(),32)}function $f(a){return pa.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var Yf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Go(a,e){try{return Jt(ls(a,e))}catch{}return null}function ls(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function ml(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Xf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function ox(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function Zf(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",Zf([Jr(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ls(r,0)),r}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ls(n,0):null})}_getAddress(e,t){let n=sx[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=xl.default.toWords(i.slice(2));return o.unshift(s),xl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===$i?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===M.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",cl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([cl(64),cl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},hl=null,ux=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return hl==null&&(hl=new Y),hl}static getNetwork(e){return rs(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,M.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ds();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=ux++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jf(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=ax&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new gr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ae(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Go(yield this.call({to:n,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ae(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new gr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Go(yield this.call({to:s,data:"0x691f3431"+Ea(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new bl(br(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=br(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=br(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=br(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=br(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=br(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var xa=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new M(Ae),dx=["call","estimateGas"];function ys(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ae(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=ys(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return ys(JSON.parse(a),e)}catch{}return null}function tc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=ys(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),dx.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function ec(a){return new Promise(function(e){setTimeout(e,a)})}function lx(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ps(a){return a&&a.toLowerCase()}var gl={},Tr=class extends Bt{constructor(e,t,n){if(super(),e!==gl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Tl(gl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xa(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),tc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>xa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return xa(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return xa(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Tl=class extends Tr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},px={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xa(this,void 0,void 0,function*(){yield ec(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(gl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),lx).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ps(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ps(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ps(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ps(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ps(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return tc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return ec(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(px);if(t)for(let r in t)t[r]&&(n[r]=!0);Gi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new M(Ae);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var vl=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},zo=new M(Ae),yx=1,ba=class extends Yt{constructor(e,t){t==="any"&&zo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new vr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){zo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){zo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return vl(this,void 0,void 0,function*(){return null})}set polling(e){!e||zo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=yx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return vl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return vl(this,void 0,void 0,function*(){this.websocket.readyState===vr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var fx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},fs=new M(Ae),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return fx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends cs{constructor(e,t){fs.checkAbstract(new.target,Ct),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let n=ht(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new M(Ae),Wo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ba{constructor(e,t){let n=new wr(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Wo}},wr=class extends Ct{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Wo:(e&&typeof e!="string"&&nc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Wo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Wo}};var cx=new M(Ae),Ko="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function mx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return cx.throwArgumentError("unsupported network","name",a)}var hs=class extends Ct{isCommunityResource(){return this.apiKey===Ko}static getApiKey(e){return e??Ko}static getUrl(e,t){t==null&&(t=Ko);let n={allowGzip:!0,url:"https://"+mx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ko&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var hx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ac=new M(Ae),xs=class extends Ct{static getApiKey(e){return e!=null&&ac.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return hx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Jo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Da=new M(Ae);function ic(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Fn(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function xx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function rc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function sc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function wl(a,e,t){if(a==="call"&&e.code===M.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ae(r))return r;Da.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Da.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Da.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Da.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Da.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var bs=class extends Yn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Da.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Jo(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?rc:xx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Jo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Jo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>wl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ic(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return wl("call",r,t.transaction)}}case"estimateGas":{let i=ic(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return wl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=sc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=sc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Da.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Da.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Xo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},gi=new M(Ae);function $o(){return new Date().getTime()}function oc(a){let e=null;for(let t=0;te?null:(n+i)/2}function _r(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>_r(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=_r(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var bx=1;function dc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var gx=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],Tx=["address","args","errorArgs","errorSignature","method","transaction"];function Qo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function vx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function wx(a,e,t){let n=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=uc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return uc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),_r(i))}:n=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return vx(n,a.quorum)}function gs(a,e){return Xo(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function _x(a,e,t,n){return Xo(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ae(r.fromBlock)||r.toBlock&&ae(r.toBlock))&&(i=yield gs(a,e)),i.getLogs(r)}}return gi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var Ts=class extends Yn{constructor(e,t){e.length===0&&gi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=us(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=us(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&gi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&gi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Xo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return oc(e)})}perform(e,t){return Xo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=$o(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=_x(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,$o()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,$o()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return gx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};Tx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),gi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),gi.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Qo(l)),provider:this})})}};var _l=null;var Yo=new M(Ae),vs="84842078b09946638c03157f83405213",ws=class extends ba{constructor(e,t){let n=new kr(e,t),i=n.connection;i.password&&Yo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends Ct{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){let t={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Yo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Yo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Yo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var Zo=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var kl=new M(Ae),kx="ETHERS_JS_SHARED",_s=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&kl.throwArgumentError("invalid apiKey","apiKey",e),e||kx}static getUrl(e,t){kl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:kl.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var lc=new M(Ae),pc="62e1ad51b37b8e00394bda3b",ks=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:lc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:lc.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===pc}};var yc=new M(Ae),Ax=1;function fc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Ax++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Mx(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var As=class extends Yt{constructor(e,t){e==null&&yc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Mx(e)):e.sendAsync?i=fc(e,e.sendAsync.bind(e)):e.send?i=fc(e,e.send.bind(e)):yc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new M(Ae);function eu(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new ba(a);default:cc.throwArgumentError("unsupported URL scheme","network",a)}}let t=rs(a);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Yt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var te={};ji(te,{AbiCoder:()=>Qi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Dt,HDNode:()=>It,Indexed:()=>sa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Qs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>tr,TransactionTypes:()=>Mo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>lo,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>pl,_toEscapedUtf8String:()=>hd,accessListify:()=>sn,arrayify:()=>j,base58:()=>pa,base64:()=>wd,checkProperties:()=>Gi,checkResultErrors:()=>Wi,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>ya,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Wr,defaultPath:()=>fa,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>bi,fetchJson:()=>Rn,formatBytes32String:()=>xd,formatEther:()=>_c,formatUnits:()=>Al,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>di,getCreate2Address:()=>Ey,getIcapAddress:()=>My,getJsonWalletAddress:()=>sl,getStatic:()=>ht,hashMessage:()=>Zi,hexConcat:()=>kt,hexDataLength:()=>Pt,hexDataSlice:()=>Ie,hexStripZeros:()=>rd,hexValue:()=>Fn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>na,isHexString:()=>ae,isValidMnemonic:()=>ff,isValidName:()=>kd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>Zd,namehash:()=>Ea,nameprep:()=>vd,parseBytes32String:()=>bd,parseEther:()=>kc,parseTransaction:()=>Eo,parseUnits:()=>Ml,poll:()=>Pn,randomBytes:()=>Qn,recoverAddress:()=>fi,recoverPublicKey:()=>Ao,resolveProperties:()=>Ce,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>$d,shallowCopy:()=>_e,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>tu,soliditySha256:()=>bc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ri});var mc="solidity/5.7.0";var Ex=new RegExp("^bytes([0-9]+)$"),Ix=new RegExp("^(u?int)([0-9]*)$"),Cx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Sx="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(mc);function hc(a,e,t){switch(a){case"address":return t?ri(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ri(e,32):j(e)}let n=a.match(Ix);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ri(e,i/8)}if(n=a.match(Ex),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Sx).substring(0,66)):e}if(n=a.match(Cx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",a)}function tu(a,e){a.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(hc(n,e[i]))}),W(ye(t))}function xc(a,e){return fe(tu(a,e))}function bc(a,e){return Xt(tu(a,e))}var gc="units/5.7.0";var Tc=new M(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Tc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Al(a,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(a,e??18)}function Ml(a,e){if(typeof a!="string"&&Tc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function _c(a){return Al(a,18)}function kc(a){return Ml(a,18)}var nu="ethers/5.7.2";var Ac=new M(nu);try{let a=window;a._ethers==null&&(a._ethers=El)}catch{}var Il=[{anonymous:!1,inputs:[{indexed:!1,name:"colonyNetwork",type:"address"},{indexed:!1,name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"users",type:"address[]"},{indexed:!1,name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldVersion",type:"uint256"},{indexed:!1,name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!0,name:"domainId",type:"uint256"},{indexed:!0,name:"role",type:"uint8"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPot",type:"uint256"},{indexed:!0,name:"toPot",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"},{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"domainId",type:"uint256"}],name:"TaskDomainSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!0,name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fundingPotId",type:"uint256"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyFundingRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyAdministrationRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyArchitectureRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRootRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenPayout",type:"uint256"}],name:"PayoutClaimed",type:"event"}],Ti=class{static createInterface(){return new te.Interface(Il)}static connect(e,t){return new oe(e,Il,t)}};xe(Ti,"abi",Il);var ga;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(ga||(ga={}));var Cl;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(Cl||(Cl={}));var Ms;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Ms||(Ms={}));var Sl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(Sl||(Sl={}));var Es;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Es||(Es={}));var Rl;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Rl||(Rl={}));var Pl;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Pl||(Pl={}));var Nl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Nl||(Nl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],vi=class{static createInterface(){return new te.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(vi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(wi,"abi",Fl);var Mc=(a,e)=>{throw new Error(`${e}: ${a}`)},Ll=a=>a!=null;var{keccak256:Qx,toUtf8Bytes:Xx}=te,{MaxUint256:Yx}=yt,Ul=(a,e)=>a.toLowerCase()===e.toLowerCase(),Vl=a=>te.formatEther(a);var jl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},_i=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Yx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Oa=a=>Qx(Xx(a));var Mr=async(a,e)=>(await wi.connect(a,e).version()).toNumber(),Hl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:ql}=te,{MaxUint256:Zx}=yt,Ec=a=>{let e=ql(a,0,3),t=F.from(ql(a,4,35)),n=F.from(ql(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ic=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Zx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await _i(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},eb=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Ic(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ea(a,e,t,n[0],i):eb(a,e,t,n,i):Ic(a,e,t,n,i);var{MaxUint256:Cc}=yt,{AddressZero:tb}=yt;async function nb(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),au(t)}catch{return[]}}async function Is(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),C=vi.connect(r,n.signer||n.provider),_=await nb(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Cc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Cc;else{let{children:E}=await a.getSkill(l),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,tb);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:ab}=yt,ta=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||ga.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ms[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ta.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return ta.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${ab}/noProof`,s=await ta.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Sc=10,jA=_t(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=6,GA=_t(Nc),Dc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Oc=Nc-1;var Bc=7,KA=_t(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[]},Lc=Bc-1;var Uc=7,QA=_t(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=4,ZA=_t(Hc),qc={1:[],2:[],3:[]},Gc=Hc-1;var zc=5,nM=_t(zc),Wc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Kc=zc-1;var Jc=2,rM=_t(Jc),$c={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Qc=Jc-1;var Xc=4,uM=_t(Xc),Yc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Zc=Xc-1;var em=7,pM=_t(em),tm={1:[],2:[],3:[],4:[],5:[],6:[]},nm=em-1;var am=11,cM=_t(am),Gl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},zl=am-1;var im=6,xM=_t(im),rm={1:[],2:[],3:[],4:[],5:[]},sm=im-1;var Ba=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Rc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Dc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Fc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=Gl[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=Vc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=qc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=$c[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=Wc[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=Yc[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=tm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=Gl[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=rm[e];return!!n&&!n.includes(t)}default:return Mc(a,"Could not find extension with name")}};var ib={[we.CoinMachine]:Pc,[we.EvaluatedExpenditure]:Oc,[we.FundingQueue]:Lc,[we.IVotingReputation]:zl,[we.OneTxPayment]:jc,[we.ReputationBootstrapper]:Gc,[we.StagedExpenditure]:Qc,[we.StakedExpenditure]:Kc,[we.StreamingPayments]:Zc,[we.TokenSupplier]:nm,[we.VotingReputation]:zl,[we.Whitelist]:sm};var Ih=_n(om(),1);var fp=_n(Ah(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var yp=2,pp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(pp||(pp={}));var Mh=a=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),D5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var O5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function df(a){if(ts==null&&(ts=O5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var Qd=class extends hn{constructor(){super("en")}getWord(e){return df(this),ts[e]}getWordIndex(e){return df(this),ts.indexOf(e)}},Xd=new Qd;hn.register(Xd);var xi={en:Xd};var lf="hdnode/5.7.0";var ns=new M(lf),B5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),F5=ve("Bitcoin seed"),fr=2147483648;function yf(a){return(1<=256)throw new Error("Depth too large!");return pf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(yr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fr));let n=new Uint8Array(37);if(e&fr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(ya($n.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=No(F.from(r).add(this.privateKey).mod(B5)):l=new cn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(yr,o,l,this.fingerprint,No(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);n=n._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(ya($n.sha512,F5,n));return new It(yr,No(i.slice(0,32)),null,"0x00000000",No(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=Yd(n),e=bi(cr(e,n),n),It._fromSeed(Zd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=pa.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(yr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(yr,W(o.slice(1)),null,i,s,r,n,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Zd(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return hi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function cr(a,e){e=Yd(e),ns.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=yf(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function bi(a,e){if(e=Yd(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&L5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&yf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function ff(a,e){try{return cr(a,e),!0}catch{}return!1}function cf(a){return(typeof a!="number"||a<0||a>=fr||a%1)&&ns.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var mf="random/5.7.0";var el=new M(mf);function U5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hf=U5(),Do=hf.crypto||hf.msCrypto;(!Do||!Do.getRandomValues)&&(el.warn("WARNING: Missing strong random number source"),Do={getRandomValues:function(a){return el.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(a){(a<=0||a>1024||a%1||a!=a)&&el.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Do.getRandomValues(e),j(e)}function as(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var al=_n(nl());var Oo="json-wallets/5.7.0";function ca(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function mr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new ma.default.Counter(x),J=new ma.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:bf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Qn(16),N=new ma.default.Counter(R),q=new ma.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+mr(I.getUTCMonth()+1,2)+"-"+mr(I.getUTCDate(),2)+"T"+mr(I.getUTCHours(),2)+"-"+mr(I.getUTCMinutes(),2)+"-"+mr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(a,e,t){if(Bo(a)){t&&t(0);let n=rl(a,e);return t&&t(1),Promise.resolve(n)}return Fo(a)?Mf(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function If(a,e){if(Bo(a))return rl(a,e);if(Fo(a))return Af(a,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var Sf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},hr=new M(Cf);function G5(a){return a!=null&&ae(a.privateKey,32)&&a.address!=null}function z5(a){let e=a.mnemonic;return e&&e.phrase}var Cn=class extends Bt{constructor(e,t){if(super(),G5(e)){let n=new cn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),z5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||fa,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&hr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&hr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&hr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,n)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,n){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Br(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),ll(this,e,t,n)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=bi(t,e.locale);return Cn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ef(e,t,n).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(If(e,t))}static fromMnemonic(e,t,n){return t||(t=fa),new Cn(It.fromMnemonic(e,null,n).derivePath(t))}};function Rf(a,e){return fi(Zi(a),e)}function Pf(a,e,t,n){return fi(bt.hash(a,e,t),n)}var Zn={};ji(Zn,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Yn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>Y,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>_l,JsonRpcBatchProvider:()=>Zo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>As,WebSocketProvider:()=>ba,getDefaultProvider:()=>eu,getNetwork:()=>rs,isCommunityResourcable:()=>fl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new M(Nf);function W5(a){return a&&typeof a.renetwork=="function"}function ha(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ha(t)},e}function Vo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return Vo(a,n)},t}var Of={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ha("homestead")},Bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ha("ropsten")},Ff={chainId:63,name:"classicMordor",_defaultProvider:Vo("https://www.ethercluster.com/mordor","classicMordor")},Uo={unspecified:{chainId:0,name:"unspecified"},homestead:Of,mainnet:Of,morden:{chainId:2,name:"morden"},ropsten:Bf,testnet:Bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ha("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ha("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ha("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ha("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Vo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Vo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ha("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ha("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function rs(a){if(a==null)return null;if(typeof a=="number"){for(let n in Uo){let i=Uo[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Uo[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Uo[a.name];if(!e)return typeof a.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(W5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lf="web/5.7.1";var K5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Uf(a,e){return K5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var J5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new M(Lf);function Vf(a){return new Promise(e=>{setTimeout(e,a)})}function Na(a,e){if(a==null)return null;if(typeof a=="string")return a;if(na(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function $5(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function pl(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+Yi(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):$5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Na(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return J5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Na(H,U.headers?U.headers["content-type"]:null),requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return pl(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var xl=_n(Gf());var Ae="providers/5.7.2";var os=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ae(e))?e.toLowerCase():os.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ae(e,32))return null;let t=ce(Ie(e,12));return t===io?null:t}contractAddress(e){return di(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ae(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Pt(n)!==32?os.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ae(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ae(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ae(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Eo(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):os.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&os.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function fl(a){return a&&typeof a.isCommunityResource=="function"}function us(a){return fl(a)&&a.isCommunityResource()}var zf=!1;function Xn(){zf||(zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new M(Ae),ax=10;function Wf(a){return a==null?"null":(Pt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Kf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Wf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Wf(e)}).join("&")}function ix(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function br(a){if(typeof a=="string"){if(a=a.toLowerCase(),Pt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Kf(a);if(ho.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Kf(a.topics||[])}throw new Error("invalid event - "+a)}function ds(){return new Date().getTime()}function Jf(a){return new Promise(e=>{setTimeout(e,a)})}var rx=["block","network","pending","poll"],bl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=ix(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||rx.indexOf(this.tag)>=0}},sx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function cl(a){return me(F.from(a).toHexString(),32)}function $f(a){return pa.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var Yf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Go(a,e){try{return Jt(ls(a,e))}catch{}return null}function ls(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function ml(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Xf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function ox(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function Zf(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",Zf([Jr(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ls(r,0)),r}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ls(n,0):null})}_getAddress(e,t){let n=sx[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=xl.default.toWords(i.slice(2));return o.unshift(s),xl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===$i?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===M.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",cl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([cl(64),cl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},hl=null,ux=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return hl==null&&(hl=new Y),hl}static getNetwork(e){return rs(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,M.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ds();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=ux++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jf(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=ax&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new gr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ae(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Go(yield this.call({to:n,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ae(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new gr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Go(yield this.call({to:s,data:"0x691f3431"+Ea(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new bl(br(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=br(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=br(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=br(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=br(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=br(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var xa=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new M(Ae),dx=["call","estimateGas"];function ys(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ae(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=ys(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return ys(JSON.parse(a),e)}catch{}return null}function tc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=ys(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),dx.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function ec(a){return new Promise(function(e){setTimeout(e,a)})}function lx(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ps(a){return a&&a.toLowerCase()}var gl={},Tr=class extends Bt{constructor(e,t,n){if(super(),e!==gl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Tl(gl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xa(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),tc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>xa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return xa(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return xa(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Tl=class extends Tr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},px={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xa(this,void 0,void 0,function*(){yield ec(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(gl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),lx).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ps(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ps(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ps(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ps(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ps(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return tc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return ec(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(px);if(t)for(let r in t)t[r]&&(n[r]=!0);Gi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new M(Ae);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var vl=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},zo=new M(Ae),yx=1,ba=class extends Yt{constructor(e,t){t==="any"&&zo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new vr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){zo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){zo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return vl(this,void 0,void 0,function*(){return null})}set polling(e){!e||zo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=yx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return vl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return vl(this,void 0,void 0,function*(){this.websocket.readyState===vr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var fx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},fs=new M(Ae),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return fx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends cs{constructor(e,t){fs.checkAbstract(new.target,Ct),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let n=ht(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new M(Ae),Wo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ba{constructor(e,t){let n=new wr(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Wo}},wr=class extends Ct{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Wo:(e&&typeof e!="string"&&nc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Wo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Wo}};var cx=new M(Ae),Ko="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function mx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return cx.throwArgumentError("unsupported network","name",a)}var hs=class extends Ct{isCommunityResource(){return this.apiKey===Ko}static getApiKey(e){return e??Ko}static getUrl(e,t){t==null&&(t=Ko);let n={allowGzip:!0,url:"https://"+mx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ko&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var hx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ac=new M(Ae),xs=class extends Ct{static getApiKey(e){return e!=null&&ac.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return hx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Jo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Da=new M(Ae);function ic(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Fn(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function xx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function rc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function sc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function wl(a,e,t){if(a==="call"&&e.code===M.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ae(r))return r;Da.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Da.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Da.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Da.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Da.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var bs=class extends Yn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Da.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Jo(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?rc:xx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Jo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Jo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>wl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ic(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return wl("call",r,t.transaction)}}case"estimateGas":{let i=ic(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return wl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=sc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=sc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Da.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Da.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Xo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},gi=new M(Ae);function $o(){return new Date().getTime()}function oc(a){let e=null;for(let t=0;te?null:(n+i)/2}function _r(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>_r(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=_r(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var bx=1;function dc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var gx=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],Tx=["address","args","errorArgs","errorSignature","method","transaction"];function Qo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function vx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function wx(a,e,t){let n=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=uc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return uc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),_r(i))}:n=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return vx(n,a.quorum)}function gs(a,e){return Xo(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function _x(a,e,t,n){return Xo(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ae(n.blockTag)&&(i=yield gs(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ae(r.fromBlock)||r.toBlock&&ae(r.toBlock))&&(i=yield gs(a,e)),i.getLogs(r)}}return gi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var Ts=class extends Yn{constructor(e,t){e.length===0&&gi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=us(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=us(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&gi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&gi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Xo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return oc(e)})}perform(e,t){return Xo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=$o(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=_x(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,$o()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,$o()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Qo(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return gx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};Tx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),gi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),gi.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Qo(l)),provider:this})})}};var _l=null;var Yo=new M(Ae),vs="84842078b09946638c03157f83405213",ws=class extends ba{constructor(e,t){let n=new kr(e,t),i=n.connection;i.password&&Yo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends Ct{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){let t={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Yo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Yo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Yo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var Zo=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var kl=new M(Ae),kx="ETHERS_JS_SHARED",_s=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&kl.throwArgumentError("invalid apiKey","apiKey",e),e||kx}static getUrl(e,t){kl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:kl.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var lc=new M(Ae),pc="62e1ad51b37b8e00394bda3b",ks=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:lc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:lc.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===pc}};var yc=new M(Ae),Ax=1;function fc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Ax++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Mx(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var As=class extends Yt{constructor(e,t){e==null&&yc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Mx(e)):e.sendAsync?i=fc(e,e.sendAsync.bind(e)):e.send?i=fc(e,e.send.bind(e)):yc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new M(Ae);function eu(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new ba(a);default:cc.throwArgumentError("unsupported URL scheme","network",a)}}let t=rs(a);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Yt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var te={};ji(te,{AbiCoder:()=>Qi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Dt,HDNode:()=>It,Indexed:()=>sa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Qs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>tr,TransactionTypes:()=>Mo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>lo,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>pl,_toEscapedUtf8String:()=>hd,accessListify:()=>sn,arrayify:()=>j,base58:()=>pa,base64:()=>wd,checkProperties:()=>Gi,checkResultErrors:()=>Wi,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>ya,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Wr,defaultPath:()=>fa,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>bi,fetchJson:()=>Rn,formatBytes32String:()=>xd,formatEther:()=>_c,formatUnits:()=>Al,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>di,getCreate2Address:()=>Ey,getIcapAddress:()=>My,getJsonWalletAddress:()=>sl,getStatic:()=>ht,hashMessage:()=>Zi,hexConcat:()=>kt,hexDataLength:()=>Pt,hexDataSlice:()=>Ie,hexStripZeros:()=>rd,hexValue:()=>Fn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>na,isHexString:()=>ae,isValidMnemonic:()=>ff,isValidName:()=>kd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>Zd,namehash:()=>Ea,nameprep:()=>vd,parseBytes32String:()=>bd,parseEther:()=>kc,parseTransaction:()=>Eo,parseUnits:()=>Ml,poll:()=>Pn,randomBytes:()=>Qn,recoverAddress:()=>fi,recoverPublicKey:()=>Ao,resolveProperties:()=>Ce,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>$d,shallowCopy:()=>_e,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>tu,soliditySha256:()=>bc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ri});var mc="solidity/5.7.0";var Ex=new RegExp("^bytes([0-9]+)$"),Ix=new RegExp("^(u?int)([0-9]*)$"),Cx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Sx="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(mc);function hc(a,e,t){switch(a){case"address":return t?ri(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ri(e,32):j(e)}let n=a.match(Ix);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ri(e,i/8)}if(n=a.match(Ex),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Sx).substring(0,66)):e}if(n=a.match(Cx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",a)}function tu(a,e){a.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(hc(n,e[i]))}),W(ye(t))}function xc(a,e){return fe(tu(a,e))}function bc(a,e){return Xt(tu(a,e))}var gc="units/5.7.0";var Tc=new M(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Tc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Al(a,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(a,e??18)}function Ml(a,e){if(typeof a!="string"&&Tc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function _c(a){return Al(a,18)}function kc(a){return Ml(a,18)}var nu="ethers/5.7.2";var Ac=new M(nu);try{let a=window;a._ethers==null&&(a._ethers=El)}catch{}var ga;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(ga||(ga={}));var Il;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(Il||(Il={}));var Ms;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Ms||(Ms={}));var Cl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(Cl||(Cl={}));var Es;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Es||(Es={}));var Sl;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Sl||(Sl={}));var Rl;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Rl||(Rl={}));var Pl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Pl||(Pl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Dl="0x12345678",Nl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Nl||(Nl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var Ol=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ti=class{static createInterface(){return new te.Interface(Ol)}static connect(e,t){return new oe(e,Ol,t)}};xe(Ti,"abi",Ol);var Bl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],vi=class{static createInterface(){return new te.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(vi,"abi",Bl);var Mc=(a,e)=>{throw new Error(`${e}: ${a}`)},Fl=a=>a!=null;var{keccak256:Px,toUtf8Bytes:Nx}=te,{MaxUint256:Dx}=yt,Ll=(a,e)=>a.toLowerCase()===e.toLowerCase(),Ul=a=>te.formatEther(a);var Vl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Fl)},wi=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Dx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Oa=a=>Px(Nx(a));var Mr=async(a,e)=>(await vi.connect(a,e).version()).toNumber(),jl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Fl);var{hexDataSlice:Hl}=te,{MaxUint256:Ox}=yt,Ec=a=>{let e=Hl(a,0,3),t=F.from(Hl(a,4,35)),n=F.from(Hl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ic=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Ox,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await wi(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},Bx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Ic(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ea(a,e,t,n[0],i):Bx(a,e,t,n,i):Ic(a,e,t,n,i);var{MaxUint256:Cc}=yt,{AddressZero:Fx}=yt;async function Lx(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),au(t)}catch{return[]}}async function Is(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),C=Ti.connect(r,n.signer||n.provider),_=await Lx(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Cc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Cc;else{let{children:E}=await a.getSkill(l),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Fx);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:Ux}=yt,ta=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||ga.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ms[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ta.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return ta.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${Ux}/noProof`,s=await ta.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Sc=10,Ck=_t(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=6,Pk=_t(Nc),Dc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Oc=Nc-1;var Bc=7,Ok=_t(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[]},Lc=Bc-1;var Uc=7,Lk=_t(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=4,jk=_t(Hc),qc={1:[],2:[],3:[]},Gc=Hc-1;var zc=5,Gk=_t(zc),Wc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Kc=zc-1;var Jc=2,Kk=_t(Jc),$c={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Qc=Jc-1;var Xc=4,Qk=_t(Xc),Yc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Zc=Xc-1;var em=7,Zk=_t(em),tm={1:[],2:[],3:[],4:[],5:[],6:[]},nm=em-1;var am=11,nA=_t(am),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gl=am-1;var im=6,rA=_t(im),rm={1:[],2:[],3:[],4:[],5:[]},sm=im-1;var Ba=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Rc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Dc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Fc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=Vc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=qc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=$c[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=Wc[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=Yc[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=tm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=rm[e];return!!n&&!n.includes(t)}default:return Mc(a,"Could not find extension with name")}};var Vx={[we.CoinMachine]:Pc,[we.EvaluatedExpenditure]:Oc,[we.FundingQueue]:Lc,[we.IVotingReputation]:Gl,[we.OneTxPayment]:jc,[we.ReputationBootstrapper]:Gc,[we.StagedExpenditure]:Qc,[we.StakedExpenditure]:Kc,[we.StreamingPayments]:Zc,[we.TokenSupplier]:nm,[we.VotingReputation]:Gl,[we.Whitelist]:sm};var Ih=_n(om(),1);var yp=_n(Ah(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var Mh=a=>`Validation error(s): ${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,x1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),cp=(a,e)=>{let t=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=fp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==yp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Mh(t.errors);throw new Error(n)};var Eh=(a,e)=>{let t=a===Re.Colony?x1(e):e,n=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=fp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:yp});if(!n.success){let i=Mh(n.errors);throw new Error(i)}return n.data};var mp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},hp=mp;var xp=(0,Ih.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Ua=class{adapter;constructor(e){this.adapter=e||new hp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await xp(n)).json();return cp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await xp(n)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return cp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await xp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Eh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var GE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var bp=async(a,e)=>{let t=await a;return e.send("eth_getLogs",[t])},Fs=a=>a!=null;var Va=class{ipfs;provider;constructor(e,t){this.ipfs=new Ua(t?.ipfsAdapter),this.provider=e}static extractSingleTopic(e){if(!e||!e.topics)return null;let t=e.topics;return typeof t[0]=="string"?t[0]:Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:null}createEventSource(e){return e.connect(yt.AddressZero,this.provider)}async getEvents(e){return(await bp(e,this.provider)).map(n=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,n.data,n.topics);return Ua.eventSupportsMetadata(r)?{...e,data:s,transactionHash:n.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:n.transactionHash,data:s}}).filter(Fs)}async getMultiEvents(e,t={}){let n=[].concat(e),i=Array.from(new Set(n.flatMap(({address:o})=>o))).filter(Fs),r=Array.from(new Set(n.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await bp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Va.extractSingleTopic(o),p=n.find(({address:S,colonyTopics:L})=>S&&!Ul(S,o.address)?!1:L.findIndex(({topic:O})=>O===l)>-1);if(!p)return null;let f=p.colonyTopics.find(({topic:S})=>S===l);if(!f)return null;let{eventSource:x,eventName:C}=f,_=x.interface.decodeEventLog(C,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:C,data:_,transactionHash:o.transactionHash};return Ua.eventSupportsMetadata(C)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(C,_.metadata)}:v}).filter(Fs)}createFilter(e,t,n,i,r={}){let s=i?e.filters[t].apply([e.filters[t],...i]):e.filters[t]();return{eventSource:e,eventName:t,topics:s.topics,address:n,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,n){let i=t.map(r=>{let s=this.createFilter(e,r,n),o=Va.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Fs);return{address:n,colonyTopics:i}}};var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Tn,"abi",gp);var Tp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(vn,"abi",Tp);var vp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};xe(Ci,"abi",vp);var Fu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Ch="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",T1=a=>a.length>1,Nn=class extends mi{constructor(...e){T1(e)?super(...e):super(Fu,Ch,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Fu)}static connect(e,t){return new oe(e,Fu,t)}};xe(Nn,"bytecode",Ch),xe(Nn,"abi",Fu);var wp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(wp)}static connect(e,t){return new oe(e,wp,t)}};xe(Si,"abi",wp);var Rr;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:Rh}=yt;async function _1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var k1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Nn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await _1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{i=!1}try{await t.nonces(Rh)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Si.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Rr.TokenClient,t},_p=k1;var{AddressZero:kp}=yt,M1=Tn.connect(kp,new Zn.BaseProvider(3656691)).interface,E1=Ci.connect(kp,new Zn.BaseProvider(3656691)).interface,I1=vn.connect(kp,new Zn.BaseProvider(3656691)).interface;var Ap=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pr.abi=Ep;var Ri=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Hl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:S1,solidityKeccak256:R1,splitSignature:P1}=te,Nr=class extends Ri{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=R1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=S1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=P1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ie=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Lu=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Pi.abi=Ip;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Di.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Oi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Bi.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Fi.abi=Np;var{AddressZero:U1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===U1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let n=await Mr(t,e.colonyNetwork.signerOrProvider);if(!Ba(Dn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Dn(e,r,n)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(we.OneTxPayment),t],async n=>({...ie("ExtensionUpgraded",n)}))}},ja=Dn;ja.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],ja.extensionType=we.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ie("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ie("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ie("Approval",n)}))}};var Vs=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Nn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ie("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ie("LogSetOwner",n)}))}};var js=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ie("Approval",i)}))}};var Ph=async(a,e)=>{let t=await _p(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Vs(a,t);case wn.Erc20:return new On(a,t);case wn.Erc2612:return new js(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Li.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ui.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Vi.abi=Bp;var{AddressZero:Fp}=yt;var Uu=F.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===Fp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await Mr(t,e.colonyNetwork.signerOrProvider);if(!Ba(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,r,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ie("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Is(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Ol);return[e,t,Fp,Ol,n,i,r,s]},async t=>({...ie("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ie("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Lu("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Vl(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ie("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(we.VotingReputation),t],async n=>({...ie("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Bn;Ha.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],Ha.extensionType=we.VotingReputation;var q1={["motion"]:Ha,["oneTx"]:ja},Or=class{static async connect(e,t){let n=await Mr(t,e.signerOrProvider),i=Or.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Ph(e,s),l=new Or(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ie("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ie("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ie("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ea(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ie("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ie("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=q1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ba(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Lu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return au(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=jl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=jl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ie("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ie("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ie("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ie("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ie("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},Hs=Or;Hs.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:mP}=te;var{namehash:BP}=te,{AddressZero:FP}=yt;var z1=new Zn.JsonRpcProvider(Es.Gnosis),{isAddress:W1}=te,K1=(a,e)=>{let t=new Va(z1),n=t.createEventSource(Ti),i=t.createMultiFilter(n,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],a),r=0;t.provider.on("block",async s=>{if(r+=1,r===4){let o=await t.getMultiEvents(i,{fromBlock:s-r,toBlock:s});o.length&&e(o),r=0}})},Up=document.querySelector("#address"),Nh=document.querySelector("#button"),Vp=document.querySelector("#error"),Dh=document.querySelector("#result");if(!Up||!Nh||!Vp||!Dh)throw new Error("Could not find all required HTML elements");var J1=a=>{Vp.innerText=a},$1=()=>{Vp.innerText=""},Lp=a=>{Dh.innerText=a};Nh.addEventListener("click",async()=>{$1();let a=Up.value;return W1(a)?(Up.value="",K1(a,e=>{Lp(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let n=await t.getMetadata();if(n.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=n.data;Lp(`A domain with id ${t.data.domainId} was created on Colony ${t.address}. It's name is ${i}, it's color ${r} and was created for the following purpose: ${s}`)}}})}),Lp(`Set up event listener for Colony ${a}`),null):J1("This is not a valid address")});})(); +`)}`,Zb=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),fp=(a,e)=>{let t=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Mh(t.errors);throw new Error(n)};var Eh=(a,e)=>{let t=a===Re.Colony?Zb(e):e,n=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:pp});if(!n.success){let i=Mh(n.errors);throw new Error(i)}return n.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,Ih.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Ua=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await hp(n)).json();return fp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await hp(n)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Eh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var PM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=async(a,e)=>{let t=await a;return e.send("eth_getLogs",[t])},Fs=a=>a!=null;var Va=class{ipfs;provider;constructor(e,t){this.ipfs=new Ua(t?.ipfsAdapter),this.provider=e}static extractSingleTopic(e){if(!e||!e.topics)return null;let t=e.topics;return typeof t[0]=="string"?t[0]:Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:null}createEventSource(e){return e.connect(yt.AddressZero,this.provider)}async getEvents(e){return(await xp(e,this.provider)).map(n=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,n.data,n.topics);return Ua.eventSupportsMetadata(r)?{...e,data:s,transactionHash:n.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:n.transactionHash,data:s}}).filter(Fs)}async getMultiEvents(e,t={}){let n=[].concat(e),i=Array.from(new Set(n.flatMap(({address:o})=>o))).filter(Fs),r=Array.from(new Set(n.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await xp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Va.extractSingleTopic(o),p=n.find(({address:S,colonyTopics:L})=>S&&!Ll(S,o.address)?!1:L.findIndex(({topic:O})=>O===l)>-1);if(!p)return null;let f=p.colonyTopics.find(({topic:S})=>S===l);if(!f)return null;let{eventSource:x,eventName:C}=f,_=x.interface.decodeEventLog(C,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:C,data:_,transactionHash:o.transactionHash};return Ua.eventSupportsMetadata(C)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(C,_.metadata)}:v}).filter(Fs)}createFilter(e,t,n,i,r={}){let s=i?e.filters[t].apply([e.filters[t],...i]):e.filters[t]();return{eventSource:e,eventName:t,topics:s.topics,address:n,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,n){let i=t.map(r=>{let s=this.createFilter(e,r,n),o=Va.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Fs);return{address:n,colonyTopics:i}}};var bp=[{anonymous:!1,inputs:[{indexed:!1,name:"colonyNetwork",type:"address"},{indexed:!1,name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"users",type:"address[]"},{indexed:!1,name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldVersion",type:"uint256"},{indexed:!1,name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!0,name:"domainId",type:"uint256"},{indexed:!0,name:"role",type:"uint8"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPot",type:"uint256"},{indexed:!0,name:"toPot",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"},{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"domainId",type:"uint256"}],name:"TaskDomainSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!0,name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fundingPotId",type:"uint256"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyFundingRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyAdministrationRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyArchitectureRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRootRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenPayout",type:"uint256"}],name:"PayoutClaimed",type:"event"}],Ii=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(Ii,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Tn,"abi",gp);var Tp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(vn,"abi",Tp);var vp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};xe(Ci,"abi",vp);var Fu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Ch="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",T1=a=>a.length>1,Nn=class extends mi{constructor(...e){T1(e)?super(...e):super(Fu,Ch,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Fu)}static connect(e,t){return new oe(e,Fu,t)}};xe(Nn,"bytecode",Ch),xe(Nn,"abi",Fu);var wp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(wp)}static connect(e,t){return new oe(e,wp,t)}};xe(Si,"abi",wp);var Rr;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:Rh}=yt;async function _1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var k1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Nn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await _1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{i=!1}try{await t.nonces(Rh)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Si.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Rr.TokenClient,t},_p=k1;var{AddressZero:kp}=yt,M1=Tn.connect(kp,new Zn.BaseProvider(3656691)).interface,E1=Ci.connect(kp,new Zn.BaseProvider(3656691)).interface,I1=vn.connect(kp,new Zn.BaseProvider(3656691)).interface;var Ap=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pr.abi=Ep;var Ri=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:S1,solidityKeccak256:R1,splitSignature:P1}=te,Nr=class extends Ri{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=R1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=S1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=P1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ie=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Lu=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Pi.abi=Ip;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Di.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Oi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Bi.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Fi.abi=Np;var{AddressZero:U1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===U1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let n=await Mr(t,e.colonyNetwork.signerOrProvider);if(!Ba(Dn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Dn(e,r,n)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(we.OneTxPayment),t],async n=>({...ie("ExtensionUpgraded",n)}))}},ja=Dn;ja.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],ja.extensionType=we.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ie("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ie("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ie("Approval",n)}))}};var Vs=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Nn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ie("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ie("LogSetOwner",n)}))}};var js=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ie("Approval",i)}))}};var Ph=async(a,e)=>{let t=await _p(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Vs(a,t);case wn.Erc20:return new On(a,t);case wn.Erc2612:return new js(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Li.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ui.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Vi.abi=Bp;var{AddressZero:Fp}=yt;var Uu=F.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===Fp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await Mr(t,e.colonyNetwork.signerOrProvider);if(!Ba(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,r,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ie("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Is(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Dl);return[e,t,Fp,Dl,n,i,r,s]},async t=>({...ie("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ie("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Lu("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Ul(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await wi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ie("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(we.VotingReputation),t],async n=>({...ie("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Bn;Ha.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],Ha.extensionType=we.VotingReputation;var q1={["motion"]:Ha,["oneTx"]:ja},Or=class{static async connect(e,t){let n=await Mr(t,e.signerOrProvider),i=Or.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Ph(e,s),l=new Or(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ie("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ie("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ie("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ie("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ea(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await wi(x,this.colony,r,s),_=await wi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ie("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ie("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=q1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ba(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Lu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return au(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ie("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ie("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ie("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ie("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ie("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},Hs=Or;Hs.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:xP}=te;var{namehash:LP}=te,{AddressZero:UP}=yt;var z1=new Zn.JsonRpcProvider(Es.Gnosis),{isAddress:W1}=te,K1=(a,e)=>{let t=new Va(z1),n=t.createEventSource(Ii),i=t.createMultiFilter(n,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],a),r=0;t.provider.on("block",async s=>{if(r+=1,r===4){let o=await t.getMultiEvents(i,{fromBlock:s-r,toBlock:s});o.length&&e(o),r=0}})},Up=document.querySelector("#address"),Nh=document.querySelector("#button"),Vp=document.querySelector("#error"),Dh=document.querySelector("#result");if(!Up||!Nh||!Vp||!Dh)throw new Error("Could not find all required HTML elements");var J1=a=>{Vp.innerText=a},$1=()=>{Vp.innerText=""},Lp=a=>{Dh.innerText=a};Nh.addEventListener("click",async()=>{$1();let a=Up.value;return W1(a)?(Up.value="",K1(a,e=>{Lp(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let n=await t.getMetadata();if(n.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=n.data;Lp(`A domain with id ${t.data.domainId} was created on Colony ${t.address}. It's name is ${i}, it's color ${r} and was created for the following purpose: ${s}`)}}})}),Lp(`Set up event listener for Colony ${a}`),null):J1("This is not a valid address")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/index.js b/index.js index a9bfcffdb..74f3f85c9 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ -"use strict";(()=>{var hh=Object.create;var Ls=Object.defineProperty;var bh=Object.getOwnPropertyDescriptor;var xh=Object.getOwnPropertyNames;var gh=Object.getPrototypeOf,Th=Object.prototype.hasOwnProperty;var vh=(i,e,t)=>e in i?Ls(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var X=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Lr=(i,e)=>{for(var t in e)Ls(i,t,{get:e[t],enumerable:!0})},wh=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of xh(e))!Th.call(i,r)&&r!==t&&Ls(i,r,{get:()=>e[r],enumerable:!(n=bh(e,r))||n.enumerable});return i};var _n=(i,e,t)=>(t=i!=null?hh(gh(i)):{},wh(e||!i||!i.__esModule?Ls(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(vh(i,typeof e!="symbol"?e+"":e,t),t);var kp=X(()=>{});var Qu=X((Mp,$u)=>{(function(i,e){"use strict";function t(M,u){if(!M)throw new Error(u||"Assertion failed")}function n(M,u){M.super_=u;var y=function(){};y.prototype=u.prototype,M.prototype=new y,M.prototype.constructor=M}function r(M,u,y){if(r.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(M||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=kp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var T=0;u[0]==="-"&&(T++,this.negative=1),T=0;T-=3)h=u[T]|u[T-1]<<8|u[T-2]<<16,this.words[_]|=h<>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);else if(b==="le")for(T=0,_=0;T>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);return this._strip()};function s(M,u){var y=M.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+M)}function o(M,u,y){var b=s(M,y);return y-1>=u&&(b|=s(M,y-1)<<4),b}r.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var T=0;T=y;T-=2)w=o(u,y,T)<<_,this.words[h]|=w&67108863,_>=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8;else{var g=u.length-y;for(T=g%2===0?y+1:y;T=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8}this._strip()};function d(M,u,y,b){for(var T=0,_=0,h=Math.min(M.length,y),w=u;w=49?_=g-49+10:g>=17?_=g-17+10:_=g,t(g>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var T=0,_=0,h=0;h>>24-T&16777215,T+=2,T>=26&&(T-=26,h--),_!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(_!==0&&(b=_.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var l=E[u],m=A[u];b="";var L=this.clone();for(L.negative=0;!L.isZero();){var f=L.modrn(m).toString(u);L=L.idivn(m),L.isZero()?b=f+b:b=x[l-f.length]+f+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,b){this._strip();var T=this.byteLength(),_=b||Math.max(1,T);t(T<=_,"byte array longer than desired length"),t(_>0,"Requested array length <= 0");var h=v(u,_),w=y==="le"?"LE":"BE";return this["_toArrayLike"+w](h,T),h},r.prototype._toArrayLikeLE=function(u,y){for(var b=0,T=0,_=0,h=0;_>8&255),b>16&255),h===6?(b>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(b=0&&(u[b--]=w>>8&255),b>=0&&(u[b--]=w>>16&255),h===6?(b>=0&&(u[b--]=w>>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(b>=0)for(u[b--]=T;b>=0;)u[b--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function C(M){for(var u=new Array(M.bitLength()),y=0;y>>T&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var T=0;Tu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var T=0;T0&&(this.words[T]=~this.words[T]&67108863>>26-b),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,T=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,T=u):(b=u,T=this);for(var _=0,h=0;h>>26;for(;_!==0&&h>>26;if(this.length=b.length,_!==0)this.words[this.length]=_,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var T,_;b>0?(T=this,_=u):(T=u,_=this);for(var h=0,w=0;w<_.length;w++)y=(T.words[w]|0)-(_.words[w]|0)+h,h=y>>26,this.words[w]=y&67108863;for(;h!==0&&w>26,this.words[w]=y&67108863;if(h===0&&w>>26,L=g&67108863,f=Math.min(l,u.length-1),I=Math.max(0,l-M.length+1);I<=f;I++){var S=l-I|0;T=M.words[S]|0,_=u.words[I]|0,h=T*_+L,m+=h/67108864|0,L=h&67108863}y.words[l]=L|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var N=function(u,y,b){var T=u.words,_=y.words,h=b.words,w=0,g,l,m,L=T[0]|0,f=L&8191,I=L>>>13,S=T[1]|0,O=S&8191,H=S>>>13,Q=T[2]|0,W=Q&8191,z=Q>>>13,pt=T[3]|0,$=pt&8191,oe=pt>>>13,Vi=T[4]|0,Re=Vi&8191,Pe=Vi>>>13,Hi=T[5]|0,Ne=Hi&8191,De=Hi>>>13,qi=T[6]|0,Oe=qi&8191,Be=qi>>>13,Gi=T[7]|0,Fe=Gi&8191,Le=Gi>>>13,zi=T[8]|0,Ue=zi&8191,je=zi>>>13,Ki=T[9]|0,Ve=Ki&8191,He=Ki>>>13,Wi=_[0]|0,qe=Wi&8191,Ge=Wi>>>13,Ji=_[1]|0,ze=Ji&8191,Ke=Ji>>>13,$i=_[2]|0,We=$i&8191,Je=$i>>>13,Qi=_[3]|0,$e=Qi&8191,Qe=Qi>>>13,Xi=_[4]|0,Xe=Xi&8191,Ye=Xi>>>13,Yi=_[5]|0,Ze=Yi&8191,et=Yi>>>13,Zi=_[6]|0,tt=Zi&8191,nt=Zi>>>13,er=_[7]|0,it=er&8191,rt=er>>>13,tr=_[8]|0,at=tr&8191,st=tr>>>13,nr=_[9]|0,ot=nr&8191,ut=nr>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(f,qe),l=Math.imul(f,Ge),l=l+Math.imul(I,qe)|0,m=Math.imul(I,Ge);var gi=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(gi>>>26)|0,gi&=67108863,g=Math.imul(O,qe),l=Math.imul(O,Ge),l=l+Math.imul(H,qe)|0,m=Math.imul(H,Ge),g=g+Math.imul(f,ze)|0,l=l+Math.imul(f,Ke)|0,l=l+Math.imul(I,ze)|0,m=m+Math.imul(I,Ke)|0;var Ti=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,g=Math.imul(W,qe),l=Math.imul(W,Ge),l=l+Math.imul(z,qe)|0,m=Math.imul(z,Ge),g=g+Math.imul(O,ze)|0,l=l+Math.imul(O,Ke)|0,l=l+Math.imul(H,ze)|0,m=m+Math.imul(H,Ke)|0,g=g+Math.imul(f,We)|0,l=l+Math.imul(f,Je)|0,l=l+Math.imul(I,We)|0,m=m+Math.imul(I,Je)|0;var vi=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(vi>>>26)|0,vi&=67108863,g=Math.imul($,qe),l=Math.imul($,Ge),l=l+Math.imul(oe,qe)|0,m=Math.imul(oe,Ge),g=g+Math.imul(W,ze)|0,l=l+Math.imul(W,Ke)|0,l=l+Math.imul(z,ze)|0,m=m+Math.imul(z,Ke)|0,g=g+Math.imul(O,We)|0,l=l+Math.imul(O,Je)|0,l=l+Math.imul(H,We)|0,m=m+Math.imul(H,Je)|0,g=g+Math.imul(f,$e)|0,l=l+Math.imul(f,Qe)|0,l=l+Math.imul(I,$e)|0,m=m+Math.imul(I,Qe)|0;var wi=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,g=Math.imul(Re,qe),l=Math.imul(Re,Ge),l=l+Math.imul(Pe,qe)|0,m=Math.imul(Pe,Ge),g=g+Math.imul($,ze)|0,l=l+Math.imul($,Ke)|0,l=l+Math.imul(oe,ze)|0,m=m+Math.imul(oe,Ke)|0,g=g+Math.imul(W,We)|0,l=l+Math.imul(W,Je)|0,l=l+Math.imul(z,We)|0,m=m+Math.imul(z,Je)|0,g=g+Math.imul(O,$e)|0,l=l+Math.imul(O,Qe)|0,l=l+Math.imul(H,$e)|0,m=m+Math.imul(H,Qe)|0,g=g+Math.imul(f,Xe)|0,l=l+Math.imul(f,Ye)|0,l=l+Math.imul(I,Xe)|0,m=m+Math.imul(I,Ye)|0;var _i=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(Ne,qe),l=Math.imul(Ne,Ge),l=l+Math.imul(De,qe)|0,m=Math.imul(De,Ge),g=g+Math.imul(Re,ze)|0,l=l+Math.imul(Re,Ke)|0,l=l+Math.imul(Pe,ze)|0,m=m+Math.imul(Pe,Ke)|0,g=g+Math.imul($,We)|0,l=l+Math.imul($,Je)|0,l=l+Math.imul(oe,We)|0,m=m+Math.imul(oe,Je)|0,g=g+Math.imul(W,$e)|0,l=l+Math.imul(W,Qe)|0,l=l+Math.imul(z,$e)|0,m=m+Math.imul(z,Qe)|0,g=g+Math.imul(O,Xe)|0,l=l+Math.imul(O,Ye)|0,l=l+Math.imul(H,Xe)|0,m=m+Math.imul(H,Ye)|0,g=g+Math.imul(f,Ze)|0,l=l+Math.imul(f,et)|0,l=l+Math.imul(I,Ze)|0,m=m+Math.imul(I,et)|0;var Ou=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Ou>>>26)|0,Ou&=67108863,g=Math.imul(Oe,qe),l=Math.imul(Oe,Ge),l=l+Math.imul(Be,qe)|0,m=Math.imul(Be,Ge),g=g+Math.imul(Ne,ze)|0,l=l+Math.imul(Ne,Ke)|0,l=l+Math.imul(De,ze)|0,m=m+Math.imul(De,Ke)|0,g=g+Math.imul(Re,We)|0,l=l+Math.imul(Re,Je)|0,l=l+Math.imul(Pe,We)|0,m=m+Math.imul(Pe,Je)|0,g=g+Math.imul($,$e)|0,l=l+Math.imul($,Qe)|0,l=l+Math.imul(oe,$e)|0,m=m+Math.imul(oe,Qe)|0,g=g+Math.imul(W,Xe)|0,l=l+Math.imul(W,Ye)|0,l=l+Math.imul(z,Xe)|0,m=m+Math.imul(z,Ye)|0,g=g+Math.imul(O,Ze)|0,l=l+Math.imul(O,et)|0,l=l+Math.imul(H,Ze)|0,m=m+Math.imul(H,et)|0,g=g+Math.imul(f,tt)|0,l=l+Math.imul(f,nt)|0,l=l+Math.imul(I,tt)|0,m=m+Math.imul(I,nt)|0;var Bu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Bu>>>26)|0,Bu&=67108863,g=Math.imul(Fe,qe),l=Math.imul(Fe,Ge),l=l+Math.imul(Le,qe)|0,m=Math.imul(Le,Ge),g=g+Math.imul(Oe,ze)|0,l=l+Math.imul(Oe,Ke)|0,l=l+Math.imul(Be,ze)|0,m=m+Math.imul(Be,Ke)|0,g=g+Math.imul(Ne,We)|0,l=l+Math.imul(Ne,Je)|0,l=l+Math.imul(De,We)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Re,$e)|0,l=l+Math.imul(Re,Qe)|0,l=l+Math.imul(Pe,$e)|0,m=m+Math.imul(Pe,Qe)|0,g=g+Math.imul($,Xe)|0,l=l+Math.imul($,Ye)|0,l=l+Math.imul(oe,Xe)|0,m=m+Math.imul(oe,Ye)|0,g=g+Math.imul(W,Ze)|0,l=l+Math.imul(W,et)|0,l=l+Math.imul(z,Ze)|0,m=m+Math.imul(z,et)|0,g=g+Math.imul(O,tt)|0,l=l+Math.imul(O,nt)|0,l=l+Math.imul(H,tt)|0,m=m+Math.imul(H,nt)|0,g=g+Math.imul(f,it)|0,l=l+Math.imul(f,rt)|0,l=l+Math.imul(I,it)|0,m=m+Math.imul(I,rt)|0;var Fu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Fu>>>26)|0,Fu&=67108863,g=Math.imul(Ue,qe),l=Math.imul(Ue,Ge),l=l+Math.imul(je,qe)|0,m=Math.imul(je,Ge),g=g+Math.imul(Fe,ze)|0,l=l+Math.imul(Fe,Ke)|0,l=l+Math.imul(Le,ze)|0,m=m+Math.imul(Le,Ke)|0,g=g+Math.imul(Oe,We)|0,l=l+Math.imul(Oe,Je)|0,l=l+Math.imul(Be,We)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,l=l+Math.imul(Ne,Qe)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Re,Xe)|0,l=l+Math.imul(Re,Ye)|0,l=l+Math.imul(Pe,Xe)|0,m=m+Math.imul(Pe,Ye)|0,g=g+Math.imul($,Ze)|0,l=l+Math.imul($,et)|0,l=l+Math.imul(oe,Ze)|0,m=m+Math.imul(oe,et)|0,g=g+Math.imul(W,tt)|0,l=l+Math.imul(W,nt)|0,l=l+Math.imul(z,tt)|0,m=m+Math.imul(z,nt)|0,g=g+Math.imul(O,it)|0,l=l+Math.imul(O,rt)|0,l=l+Math.imul(H,it)|0,m=m+Math.imul(H,rt)|0,g=g+Math.imul(f,at)|0,l=l+Math.imul(f,st)|0,l=l+Math.imul(I,at)|0,m=m+Math.imul(I,st)|0;var Lu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,g=Math.imul(Ve,qe),l=Math.imul(Ve,Ge),l=l+Math.imul(He,qe)|0,m=Math.imul(He,Ge),g=g+Math.imul(Ue,ze)|0,l=l+Math.imul(Ue,Ke)|0,l=l+Math.imul(je,ze)|0,m=m+Math.imul(je,Ke)|0,g=g+Math.imul(Fe,We)|0,l=l+Math.imul(Fe,Je)|0,l=l+Math.imul(Le,We)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,l=l+Math.imul(Oe,Qe)|0,l=l+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,l=l+Math.imul(Ne,Ye)|0,l=l+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Re,Ze)|0,l=l+Math.imul(Re,et)|0,l=l+Math.imul(Pe,Ze)|0,m=m+Math.imul(Pe,et)|0,g=g+Math.imul($,tt)|0,l=l+Math.imul($,nt)|0,l=l+Math.imul(oe,tt)|0,m=m+Math.imul(oe,nt)|0,g=g+Math.imul(W,it)|0,l=l+Math.imul(W,rt)|0,l=l+Math.imul(z,it)|0,m=m+Math.imul(z,rt)|0,g=g+Math.imul(O,at)|0,l=l+Math.imul(O,st)|0,l=l+Math.imul(H,at)|0,m=m+Math.imul(H,st)|0,g=g+Math.imul(f,ot)|0,l=l+Math.imul(f,ut)|0,l=l+Math.imul(I,ot)|0,m=m+Math.imul(I,ut)|0;var Uu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,g=Math.imul(Ve,ze),l=Math.imul(Ve,Ke),l=l+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,l=l+Math.imul(Ue,Je)|0,l=l+Math.imul(je,We)|0,m=m+Math.imul(je,Je)|0,g=g+Math.imul(Fe,$e)|0,l=l+Math.imul(Fe,Qe)|0,l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,l=l+Math.imul(Oe,Ye)|0,l=l+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,l=l+Math.imul(Ne,et)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Re,tt)|0,l=l+Math.imul(Re,nt)|0,l=l+Math.imul(Pe,tt)|0,m=m+Math.imul(Pe,nt)|0,g=g+Math.imul($,it)|0,l=l+Math.imul($,rt)|0,l=l+Math.imul(oe,it)|0,m=m+Math.imul(oe,rt)|0,g=g+Math.imul(W,at)|0,l=l+Math.imul(W,st)|0,l=l+Math.imul(z,at)|0,m=m+Math.imul(z,st)|0,g=g+Math.imul(O,ot)|0,l=l+Math.imul(O,ut)|0,l=l+Math.imul(H,ot)|0,m=m+Math.imul(H,ut)|0;var ju=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(ju>>>26)|0,ju&=67108863,g=Math.imul(Ve,We),l=Math.imul(Ve,Je),l=l+Math.imul(He,We)|0,m=Math.imul(He,Je),g=g+Math.imul(Ue,$e)|0,l=l+Math.imul(Ue,Qe)|0,l=l+Math.imul(je,$e)|0,m=m+Math.imul(je,Qe)|0,g=g+Math.imul(Fe,Xe)|0,l=l+Math.imul(Fe,Ye)|0,l=l+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,l=l+Math.imul(Oe,et)|0,l=l+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,l=l+Math.imul(Ne,nt)|0,l=l+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Re,it)|0,l=l+Math.imul(Re,rt)|0,l=l+Math.imul(Pe,it)|0,m=m+Math.imul(Pe,rt)|0,g=g+Math.imul($,at)|0,l=l+Math.imul($,st)|0,l=l+Math.imul(oe,at)|0,m=m+Math.imul(oe,st)|0,g=g+Math.imul(W,ot)|0,l=l+Math.imul(W,ut)|0,l=l+Math.imul(z,ot)|0,m=m+Math.imul(z,ut)|0;var Vu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(Ve,$e),l=Math.imul(Ve,Qe),l=l+Math.imul(He,$e)|0,m=Math.imul(He,Qe),g=g+Math.imul(Ue,Xe)|0,l=l+Math.imul(Ue,Ye)|0,l=l+Math.imul(je,Xe)|0,m=m+Math.imul(je,Ye)|0,g=g+Math.imul(Fe,Ze)|0,l=l+Math.imul(Fe,et)|0,l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,l=l+Math.imul(Oe,nt)|0,l=l+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,it)|0,l=l+Math.imul(Ne,rt)|0,l=l+Math.imul(De,it)|0,m=m+Math.imul(De,rt)|0,g=g+Math.imul(Re,at)|0,l=l+Math.imul(Re,st)|0,l=l+Math.imul(Pe,at)|0,m=m+Math.imul(Pe,st)|0,g=g+Math.imul($,ot)|0,l=l+Math.imul($,ut)|0,l=l+Math.imul(oe,ot)|0,m=m+Math.imul(oe,ut)|0;var Hu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(Ve,Xe),l=Math.imul(Ve,Ye),l=l+Math.imul(He,Xe)|0,m=Math.imul(He,Ye),g=g+Math.imul(Ue,Ze)|0,l=l+Math.imul(Ue,et)|0,l=l+Math.imul(je,Ze)|0,m=m+Math.imul(je,et)|0,g=g+Math.imul(Fe,tt)|0,l=l+Math.imul(Fe,nt)|0,l=l+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,it)|0,l=l+Math.imul(Oe,rt)|0,l=l+Math.imul(Be,it)|0,m=m+Math.imul(Be,rt)|0,g=g+Math.imul(Ne,at)|0,l=l+Math.imul(Ne,st)|0,l=l+Math.imul(De,at)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Re,ot)|0,l=l+Math.imul(Re,ut)|0,l=l+Math.imul(Pe,ot)|0,m=m+Math.imul(Pe,ut)|0;var qu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(qu>>>26)|0,qu&=67108863,g=Math.imul(Ve,Ze),l=Math.imul(Ve,et),l=l+Math.imul(He,Ze)|0,m=Math.imul(He,et),g=g+Math.imul(Ue,tt)|0,l=l+Math.imul(Ue,nt)|0,l=l+Math.imul(je,tt)|0,m=m+Math.imul(je,nt)|0,g=g+Math.imul(Fe,it)|0,l=l+Math.imul(Fe,rt)|0,l=l+Math.imul(Le,it)|0,m=m+Math.imul(Le,rt)|0,g=g+Math.imul(Oe,at)|0,l=l+Math.imul(Oe,st)|0,l=l+Math.imul(Be,at)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,l=l+Math.imul(Ne,ut)|0,l=l+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0;var Gu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(Ve,tt),l=Math.imul(Ve,nt),l=l+Math.imul(He,tt)|0,m=Math.imul(He,nt),g=g+Math.imul(Ue,it)|0,l=l+Math.imul(Ue,rt)|0,l=l+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Fe,at)|0,l=l+Math.imul(Fe,st)|0,l=l+Math.imul(Le,at)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,l=l+Math.imul(Oe,ut)|0,l=l+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0;var zu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Ve,it),l=Math.imul(Ve,rt),l=l+Math.imul(He,it)|0,m=Math.imul(He,rt),g=g+Math.imul(Ue,at)|0,l=l+Math.imul(Ue,st)|0,l=l+Math.imul(je,at)|0,m=m+Math.imul(je,st)|0,g=g+Math.imul(Fe,ot)|0,l=l+Math.imul(Fe,ut)|0,l=l+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0;var Ku=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(Ve,at),l=Math.imul(Ve,st),l=l+Math.imul(He,at)|0,m=Math.imul(He,st),g=g+Math.imul(Ue,ot)|0,l=l+Math.imul(Ue,ut)|0,l=l+Math.imul(je,ot)|0,m=m+Math.imul(je,ut)|0;var Wu=(w+g|0)+((l&8191)<<13)|0;w=(m+(l>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(Ve,ot),l=Math.imul(Ve,ut),l=l+Math.imul(He,ot)|0,m=Math.imul(He,ut);var Ju=(w+g|0)+((l&8191)<<13)|0;return w=(m+(l>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,h[0]=gi,h[1]=Ti,h[2]=vi,h[3]=wi,h[4]=_i,h[5]=Ou,h[6]=Bu,h[7]=Fu,h[8]=Lu,h[9]=Uu,h[10]=ju,h[11]=Vu,h[12]=Hu,h[13]=qu,h[14]=Gu,h[15]=zu,h[16]=Ku,h[17]=Wu,h[18]=Ju,w!==0&&(h[19]=w,b.length++),b};Math.imul||(N=D);function F(M,u,y){y.negative=u.negative^M.negative,y.length=M.length+u.length;for(var b=0,T=0,_=0;_>>26)|0,T+=h>>>26,h&=67108863}y.words[_]=w,b=h,h=T}return b!==0?y.words[_]=b:y.length--,y._strip()}function U(M,u,y){return F(M,u,y)}r.prototype.mulTo=function(u,y){var b,T=this.length+u.length;return this.length===10&&u.length===10?b=N(this,u,y):T<63?b=D(this,u,y):T<1024?b=F(this,u,y):b=U(this,u,y),b};function G(M,u){this.x=M,this.y=u}G.prototype.makeRBT=function(u){for(var y=new Array(u),b=r.prototype._countBits(u)-1,T=0;T>=1;return T},G.prototype.permute=function(u,y,b,T,_,h){for(var w=0;w>>1)_++;return 1<<_+1+T},G.prototype.conjugate=function(u,y,b){if(!(b<=1))for(var T=0;T>>13,b[2*h+1]=_&8191,_=_>>>13;for(h=2*y;h>=26,b+=_/67108864|0,b+=h>>>26,this.words[T]=h&67108863}return b!==0&&(this.words[T]=b,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=C(u);if(y.length===0)return new r(1);for(var b=this,T=0;T=0);var y=u%26,b=(u-y)/26,T=67108863>>>26-y<<26-y,_;if(y!==0){var h=0;for(_=0;_>>26-y}h&&(this.words[_]=h,this.length++)}if(b!==0){for(_=this.length-1;_>=0;_--)this.words[_+b]=this.words[_];for(_=0;_=0);var T;y?T=(y-y%26)/26:T=0;var _=u%26,h=Math.min((u-_)/26,this.length),w=67108863^67108863>>>_<<_,g=b;if(T-=h,T=Math.max(0,T),g){for(var l=0;lh)for(this.length-=h,l=0;l=0&&(m!==0||l>=T);l--){var L=this.words[l]|0;this.words[l]=m<<26-_|L>>>_,m=L&w}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,T=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var T=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[_+b]=h&67108863}for(;_>26,this.words[_+b]=h&67108863;if(w===0)return this._strip();for(t(w===-1),w=0,_=0;_>26,this.words[_]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var b=this.length-u.length,T=this.clone(),_=u,h=_.words[_.length-1]|0,w=this._countBits(h);b=26-w,b!==0&&(_=_.ushln(b),T.iushln(b),h=_.words[_.length-1]|0);var g=T.length-_.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var I=(T.words[_.length+f]|0)*67108864+(T.words[_.length+f-1]|0);for(I=Math.min(I/h|0,67108863),T._ishlnsubmul(_,I,f);T.negative!==0;)I--,T.negative=0,T._ishlnsubmul(_,1,f),T.isZero()||(T.negative^=1);l&&(l.words[f]=I)}return l&&l._strip(),T._strip(),y!=="div"&&b!==0&&T.iushrn(b),{div:l||null,mod:T}},r.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var T,_,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(T=h.div.neg()),y!=="div"&&(_=h.mod.neg(),b&&_.negative!==0&&_.iadd(u)),{div:T,mod:_}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(T=h.div.neg()),{div:T,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(_=h.mod.neg(),b&&_.negative!==0&&_.isub(u)),{div:h.div,mod:_}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,T=u.ushrn(1),_=u.andln(1),h=b.cmp(T);return h<0||_===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,T=0,_=this.length-1;_>=0;_--)T=(b*T+(this.words[_]|0))%u;return y?-T:T},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,T=this.length-1;T>=0;T--){var _=(this.words[T]|0)+b*67108864;this.words[T]=_/u|0,b=_%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new r(1),_=new r(0),h=new r(0),w=new r(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var l=b.clone(),m=y.clone();!y.isZero();){for(var L=0,f=1;(y.words[0]&f)===0&&L<26;++L,f<<=1);if(L>0)for(y.iushrn(L);L-- >0;)(T.isOdd()||_.isOdd())&&(T.iadd(l),_.isub(m)),T.iushrn(1),_.iushrn(1);for(var I=0,S=1;(b.words[0]&S)===0&&I<26;++I,S<<=1);if(I>0)for(b.iushrn(I);I-- >0;)(h.isOdd()||w.isOdd())&&(h.iadd(l),w.isub(m)),h.iushrn(1),w.iushrn(1);y.cmp(b)>=0?(y.isub(b),T.isub(h),_.isub(w)):(b.isub(y),h.isub(T),w.isub(_))}return{a:h,b:w,gcd:b.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new r(1),_=new r(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var w=0,g=1;(y.words[0]&g)===0&&w<26;++w,g<<=1);if(w>0)for(y.iushrn(w);w-- >0;)T.isOdd()&&T.iadd(h),T.iushrn(1);for(var l=0,m=1;(b.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(b.iushrn(l);l-- >0;)_.isOdd()&&_.iadd(h),_.iushrn(1);y.cmp(b)>=0?(y.isub(b),T.isub(_)):(b.isub(y),_.isub(T))}var L;return y.cmpn(1)===0?L=T:L=_,L.cmpn(0)<0&&L.iadd(u),L},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var T=0;y.isEven()&&b.isEven();T++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var _=y.cmp(b);if(_<0){var h=y;y=b,b=h}else if(_===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(T)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,T=1<>>26,w&=67108863,this.words[h]=w}return _!==0&&(this.words[h]=_,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var T=this.words[0]|0;b=T===u?0:Tu.length)return 1;if(this.length=0;b--){var T=this.words[b]|0,_=u.words[b]|0;if(T!==_){T<_?y=-1:T>_&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new ae(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function K(M,u){this.name=M,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},K.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var T=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},K.prototype.split=function(u,y){u.iushrn(this.n,0,y)},K.prototype.imulK=function(u){return u.imul(this.k)};function ye(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ye,K),ye.prototype.split=function(u,y){for(var b=4194303,T=Math.min(u.length,9),_=0;_>>22,h=w}h>>>=22,u.words[_-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},ye.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=_,y=T}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(q[u])return q[u];var y;if(u==="k256")y=new ye;else if(u==="p224")y=new te;else if(u==="p192")y=new ie;else if(u==="p25519")y=new Se;else throw new Error("Unknown prime "+u);return q[u]=y,y};function ae(M){if(typeof M=="string"){var u=r._prime(M);this.m=u.p,this.prime=u}else t(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}ae.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},ae.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},ae.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},ae.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},ae.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},ae.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},ae.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},ae.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},ae.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},ae.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},ae.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},ae.prototype.isqr=function(u){return this.imul(u,u.clone())},ae.prototype.sqr=function(u){return this.mul(u,u)},ae.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new r(1)).iushrn(2);return this.pow(u,b)}for(var T=this.m.subn(1),_=0;!T.isZero()&&T.andln(1)===0;)_++,T.iushrn(1);t(!T.isZero());var h=new r(1).toRed(this),w=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(w)!==0;)l.redIAdd(w);for(var m=this.pow(l,T),L=this.pow(u,T.addn(1).iushrn(1)),f=this.pow(u,T),I=_;f.cmp(h)!==0;){for(var S=f,O=0;S.cmp(h)!==0;O++)S=S.redSqr();t(O=0;_--){for(var m=y.words[_],L=l-1;L>=0;L--){var f=m>>L&1;if(h!==T[0]&&(h=this.sqr(h)),f===0&&w===0){g=0;continue}w<<=1,w|=f,g++,!(g!==b&&(_!==0||L!==0))&&(h=this.mul(h,T[w]),g=0,w=0)}l=26}return h},ae.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},ae.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new we(u)};function we(M){ae.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(we,ae),we.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},we.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},we.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),T=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=b.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},we.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var b=u.mul(y),T=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=b.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},we.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof $u>"u"||$u,Mp)});var Xp=X((Zx,Gs)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Gs=="object"&&Gs.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],E=[1,256,65536,16777216],A=[6,1536,393216,100663296],v=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],D=[224,256,384,512],N=[128,256],F=["hex","buffer","arrayBuffer","array","digest"],U={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var G=function(f,I,S){return function(O){return new l(f,I,f).update(O)[S]()}},q=function(f,I,S){return function(O,H){return new l(f,I,H).update(O)[S]()}},K=function(f,I,S){return function(O,H,Q,W){return u["cshake"+f].update(O,H,Q,W)[S]()}},ye=function(f,I,S){return function(O,H,Q,W){return u["kmac"+f].update(O,H,Q,W)[S]()}},te=function(f,I,S,O){for(var H=0;H>5,this.byteCount=this.blockCount<<2,this.outputBlocks=S>>5,this.extraBytes=(S&31)>>3;for(var O=0;O<50;++O)this.s[O]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var I,S=typeof f;if(S!=="string"){if(S==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);I=!0}for(var O=this.blocks,H=this.byteCount,Q=f.length,W=this.blockCount,z=0,pt=this.s,$,oe;z>2]|=f[z]<>2]|=oe<>2]|=(192|oe>>6)<>2]|=(128|oe&63)<=57344?(O[$>>2]|=(224|oe>>12)<>2]|=(128|oe>>6&63)<>2]|=(128|oe&63)<>2]|=(240|oe>>18)<>2]|=(128|oe>>12&63)<>2]|=(128|oe>>6&63)<>2]|=(128|oe&63)<=H){for(this.start=$-H,this.block=O[W],$=0;$>8,S=f&255;S>0;)H.unshift(S),f=f>>8,S=f&255,++O;return I?H.push(O):H.unshift(O),this.update(H),H.length},l.prototype.encodeString=function(f){var I,S=typeof f;if(S!=="string"){if(S==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);I=!0}var O=0,H=f.length;if(I)O=H;else for(var Q=0;Q=57344?O+=3:(W=65536+((W&1023)<<10|f.charCodeAt(++Q)&1023),O+=4)}return O+=this.encode(O*8),this.update(f),O},l.prototype.bytepad=function(f,I){for(var S=this.encode(I),O=0;O>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(f[0]=f[S],I=1;I>4&15]+p[z&15]+p[z>>12&15]+p[z>>8&15]+p[z>>20&15]+p[z>>16&15]+p[z>>28&15]+p[z>>24&15];Q%f===0&&(L(I),H=0)}return O&&(z=I[H],W+=p[z>>4&15]+p[z&15],O>1&&(W+=p[z>>12&15]+p[z>>8&15]),O>2&&(W+=p[z>>20&15]+p[z>>16&15])),W},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,I=this.s,S=this.outputBlocks,O=this.extraBytes,H=0,Q=0,W=this.outputBits>>3,z;O?z=new ArrayBuffer(S+1<<2):z=new ArrayBuffer(W);for(var pt=new Uint32Array(z);Q>8&255,W[z+2]=pt>>16&255,W[z+3]=pt>>24&255;Q%f===0&&L(I)}return O&&(z=Q<<2,pt=I[H],W[z]=pt&255,O>1&&(W[z+1]=pt>>8&255),O>2&&(W[z+2]=pt>>16&255)),W};function m(f,I,S){l.call(this,f,I,S)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var L=function(f){var I,S,O,H,Q,W,z,pt,$,oe,Vi,Re,Pe,Hi,Ne,De,qi,Oe,Be,Gi,Fe,Le,zi,Ue,je,Ki,Ve,He,Wi,qe,Ge,Ji,ze,Ke,$i,We,Je,Qi,$e,Qe,Xi,Xe,Ye,Yi,Ze,et,Zi,tt,nt,er,it,rt,tr,at,st,nr,ot,ut,gi,Ti,vi,wi,_i;for(O=0;O<48;O+=2)H=f[0]^f[10]^f[20]^f[30]^f[40],Q=f[1]^f[11]^f[21]^f[31]^f[41],W=f[2]^f[12]^f[22]^f[32]^f[42],z=f[3]^f[13]^f[23]^f[33]^f[43],pt=f[4]^f[14]^f[24]^f[34]^f[44],$=f[5]^f[15]^f[25]^f[35]^f[45],oe=f[6]^f[16]^f[26]^f[36]^f[46],Vi=f[7]^f[17]^f[27]^f[37]^f[47],Re=f[8]^f[18]^f[28]^f[38]^f[48],Pe=f[9]^f[19]^f[29]^f[39]^f[49],I=Re^(W<<1|z>>>31),S=Pe^(z<<1|W>>>31),f[0]^=I,f[1]^=S,f[10]^=I,f[11]^=S,f[20]^=I,f[21]^=S,f[30]^=I,f[31]^=S,f[40]^=I,f[41]^=S,I=H^(pt<<1|$>>>31),S=Q^($<<1|pt>>>31),f[2]^=I,f[3]^=S,f[12]^=I,f[13]^=S,f[22]^=I,f[23]^=S,f[32]^=I,f[33]^=S,f[42]^=I,f[43]^=S,I=W^(oe<<1|Vi>>>31),S=z^(Vi<<1|oe>>>31),f[4]^=I,f[5]^=S,f[14]^=I,f[15]^=S,f[24]^=I,f[25]^=S,f[34]^=I,f[35]^=S,f[44]^=I,f[45]^=S,I=pt^(Re<<1|Pe>>>31),S=$^(Pe<<1|Re>>>31),f[6]^=I,f[7]^=S,f[16]^=I,f[17]^=S,f[26]^=I,f[27]^=S,f[36]^=I,f[37]^=S,f[46]^=I,f[47]^=S,I=oe^(H<<1|Q>>>31),S=Vi^(Q<<1|H>>>31),f[8]^=I,f[9]^=S,f[18]^=I,f[19]^=S,f[28]^=I,f[29]^=S,f[38]^=I,f[39]^=S,f[48]^=I,f[49]^=S,Hi=f[0],Ne=f[1],et=f[11]<<4|f[10]>>>28,Zi=f[10]<<4|f[11]>>>28,He=f[20]<<3|f[21]>>>29,Wi=f[21]<<3|f[20]>>>29,Ti=f[31]<<9|f[30]>>>23,vi=f[30]<<9|f[31]>>>23,Xe=f[40]<<18|f[41]>>>14,Ye=f[41]<<18|f[40]>>>14,Ke=f[2]<<1|f[3]>>>31,$i=f[3]<<1|f[2]>>>31,De=f[13]<<12|f[12]>>>20,qi=f[12]<<12|f[13]>>>20,tt=f[22]<<10|f[23]>>>22,nt=f[23]<<10|f[22]>>>22,qe=f[33]<<13|f[32]>>>19,Ge=f[32]<<13|f[33]>>>19,wi=f[42]<<2|f[43]>>>30,_i=f[43]<<2|f[42]>>>30,at=f[5]<<30|f[4]>>>2,st=f[4]<<30|f[5]>>>2,We=f[14]<<6|f[15]>>>26,Je=f[15]<<6|f[14]>>>26,Oe=f[25]<<11|f[24]>>>21,Be=f[24]<<11|f[25]>>>21,er=f[34]<<15|f[35]>>>17,it=f[35]<<15|f[34]>>>17,Ji=f[45]<<29|f[44]>>>3,ze=f[44]<<29|f[45]>>>3,Ue=f[6]<<28|f[7]>>>4,je=f[7]<<28|f[6]>>>4,nr=f[17]<<23|f[16]>>>9,ot=f[16]<<23|f[17]>>>9,Qi=f[26]<<25|f[27]>>>7,$e=f[27]<<25|f[26]>>>7,Gi=f[36]<<21|f[37]>>>11,Fe=f[37]<<21|f[36]>>>11,rt=f[47]<<24|f[46]>>>8,tr=f[46]<<24|f[47]>>>8,Yi=f[8]<<27|f[9]>>>5,Ze=f[9]<<27|f[8]>>>5,Ki=f[18]<<20|f[19]>>>12,Ve=f[19]<<20|f[18]>>>12,ut=f[29]<<7|f[28]>>>25,gi=f[28]<<7|f[29]>>>25,Qe=f[38]<<8|f[39]>>>24,Xi=f[39]<<8|f[38]>>>24,Le=f[48]<<14|f[49]>>>18,zi=f[49]<<14|f[48]>>>18,f[0]=Hi^~De&Oe,f[1]=Ne^~qi&Be,f[10]=Ue^~Ki&He,f[11]=je^~Ve&Wi,f[20]=Ke^~We&Qi,f[21]=$i^~Je&$e,f[30]=Yi^~et&tt,f[31]=Ze^~Zi&nt,f[40]=at^~nr&ut,f[41]=st^~ot&gi,f[2]=De^~Oe&Gi,f[3]=qi^~Be&Fe,f[12]=Ki^~He&qe,f[13]=Ve^~Wi&Ge,f[22]=We^~Qi&Qe,f[23]=Je^~$e&Xi,f[32]=et^~tt&er,f[33]=Zi^~nt&it,f[42]=nr^~ut&Ti,f[43]=ot^~gi&vi,f[4]=Oe^~Gi&Le,f[5]=Be^~Fe&zi,f[14]=He^~qe&Ji,f[15]=Wi^~Ge&ze,f[24]=Qi^~Qe&Xe,f[25]=$e^~Xi&Ye,f[34]=tt^~er&rt,f[35]=nt^~it&tr,f[44]=ut^~Ti&wi,f[45]=gi^~vi&_i,f[6]=Gi^~Le&Hi,f[7]=Fe^~zi&Ne,f[16]=qe^~Ji&Ue,f[17]=Ge^~ze&je,f[26]=Qe^~Xe&Ke,f[27]=Xi^~Ye&$i,f[36]=er^~rt&Yi,f[37]=it^~tr&Ze,f[46]=Ti^~wi&at,f[47]=vi^~_i&st,f[8]=Le^~Hi&De,f[9]=zi^~Ne&qi,f[18]=Ji^~Ue&Ki,f[19]=ze^~je&Ve,f[28]=Xe^~Ke&We,f[29]=Ye^~$i&Je,f[38]=rt^~Yi&et,f[39]=tr^~Ze&Zi,f[48]=wi^~at&nr,f[49]=_i^~st&ot,f[0]^=C[O],f[1]^=C[O+1]};if(s)Gs.exports=u;else{for(b=0;b{K0.exports=z0;function z0(i,e){if(!i)throw new Error(e||"Assertion failed")}z0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var W0=X((zv,_l)=>{typeof Object.create=="function"?_l.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:_l.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var kn=X(Ie=>{"use strict";var E6=Zr(),C6=W0();Ie.inherits=C6;function I6(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function S6(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):I6(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Ie.htonl=J0;function P6(i,e){for(var t="",n=0;n>>0}return a}Ie.join32=N6;function D6(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Ie.split32=D6;function O6(i,e){return i>>>e|i<<32-e}Ie.rotr32=O6;function B6(i,e){return i<>>32-e}Ie.rotl32=B6;function F6(i,e){return i+e>>>0}Ie.sum32=F6;function L6(i,e,t){return i+e+t>>>0}Ie.sum32_3=L6;function U6(i,e,t,n){return i+e+t+n>>>0}Ie.sum32_4=U6;function j6(i,e,t,n,r){return i+e+t+n+r>>>0}Ie.sum32_5=j6;function V6(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Ie.sum64=V6;function H6(i,e,t,n){var r=e+n>>>0,a=(r>>0}Ie.sum64_hi=H6;function q6(i,e,t,n){var r=e+n;return r>>>0}Ie.sum64_lo=q6;function G6(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Ie.sum64_4_hi=G6;function z6(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Ie.sum64_4_lo=z6;function K6(i,e,t,n,r,a,s,o,d,p){var c=0,x=e;x=x+n>>>0,c+=x>>0,c+=x>>0,c+=x>>0,c+=x>>0}Ie.sum64_5_hi=K6;function W6(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Ie.sum64_5_lo=W6;function J6(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Ie.rotr64_hi=J6;function $6(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Ie.rotr64_lo=$6;function Q6(i,e,t){return i>>>t}Ie.shr64_hi=Q6;function X6(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Ie.shr64_lo=X6});var ea=X(Y0=>{"use strict";var X0=kn(),Y6=Zr();function yo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Y0.BlockHash=yo;yo.prototype.update=function(e,t){if(e=X0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=X0.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var Z6=kn(),Vn=Z6.rotr32;function e2(i,e,t,n){if(i===0)return Z0(e,t,n);if(i===1||i===3)return ty(e,t,n);if(i===2)return ey(e,t,n)}oi.ft_1=e2;function Z0(i,e,t){return i&e^~i&t}oi.ch32=Z0;function ey(i,e,t){return i&e^i&t^e&t}oi.maj32=ey;function ty(i,e,t){return i^e^t}oi.p32=ty;function t2(i){return Vn(i,2)^Vn(i,13)^Vn(i,22)}oi.s0_256=t2;function n2(i){return Vn(i,6)^Vn(i,11)^Vn(i,25)}oi.s1_256=n2;function i2(i){return Vn(i,7)^Vn(i,18)^i>>>3}oi.g0_256=i2;function r2(i){return Vn(i,17)^Vn(i,19)^i>>>10}oi.g1_256=r2});var ry=X(($v,iy)=>{"use strict";var ta=kn(),a2=ea(),s2=Al(),kl=ta.rotl32,Ka=ta.sum32,o2=ta.sum32_5,u2=s2.ft_1,ny=a2.BlockHash,l2=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;ny.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ta.inherits(Hn,ny);iy.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var na=kn(),d2=ea(),ia=Al(),p2=Zr(),Mn=na.sum32,y2=na.sum32_4,c2=na.sum32_5,f2=ia.ch32,m2=ia.maj32,h2=ia.s0_256,b2=ia.s1_256,x2=ia.g0_256,g2=ia.g1_256,ay=d2.BlockHash,T2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function qn(){if(!(this instanceof qn))return new qn;ay.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=T2,this.W=new Array(64)}na.inherits(qn,ay);sy.exports=qn;qn.blockSize=512;qn.outSize=256;qn.hmacStrength=192;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var El=kn(),oy=Ml();function ui(){if(!(this instanceof ui))return new ui;oy.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}El.inherits(ui,oy);uy.exports=ui;ui.blockSize=512;ui.outSize=224;ui.hmacStrength=192;ui.padLength=64;ui.prototype._digest=function(e){return e==="hex"?El.toHex32(this.h.slice(0,7),"big"):El.split32(this.h.slice(0,7),"big")}});var Sl=X((Yv,cy)=>{"use strict";var Qt=kn(),v2=ea(),w2=Zr(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,dy=Qt.shr64_hi,py=Qt.shr64_lo,Ci=Qt.sum64,Cl=Qt.sum64_hi,Il=Qt.sum64_lo,_2=Qt.sum64_4_hi,A2=Qt.sum64_4_lo,k2=Qt.sum64_5_hi,M2=Qt.sum64_5_lo,yy=v2.BlockHash,E2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;yy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=E2,this.W=new Array(160)}Qt.inherits(En,yy);cy.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var Rl=kn(),fy=Sl();function li(){if(!(this instanceof li))return new li;fy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Rl.inherits(li,fy);my.exports=li;li.blockSize=1024;li.outSize=384;li.hmacStrength=192;li.padLength=128;li.prototype._digest=function(e){return e==="hex"?Rl.toHex32(this.h.slice(0,12),"big"):Rl.split32(this.h.slice(0,12),"big")}});var by=X(ra=>{"use strict";ra.sha1=ry();ra.sha224=ly();ra.sha256=Ml();ra.sha384=hy();ra.sha512=Sl()});var _y=X(wy=>{"use strict";var lr=kn(),j2=ea(),co=lr.rotl32,xy=lr.sum32,Wa=lr.sum32_3,gy=lr.sum32_4,vy=j2.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;vy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}lr.inherits(Kn,vy);wy.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,x=s,E=o,A=0;A<80;A++){var v=xy(co(gy(n,Ty(A,r,a,s),e[q2[A]+t],V2(A)),z2[A]),o);n=o,o=s,s=co(a,10),a=r,r=v,v=xy(co(gy(d,Ty(79-A,p,c,x),e[G2[A]+t],H2(A)),K2[A]),E),d=E,E=x,x=co(c,10),c=p,p=v}v=Wa(this.h[1],a,x),this.h[1]=Wa(this.h[2],s,E),this.h[2]=Wa(this.h[3],o,d),this.h[3]=Wa(this.h[4],n,p),this.h[4]=Wa(this.h[0],r,c),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?lr.toHex32(this.h,"little"):lr.split32(this.h,"little")};function Ty(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function V2(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function H2(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var q2=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],G2=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],z2=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],K2=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var ky=X((n3,Ay)=>{"use strict";var W2=kn(),J2=Zr();function aa(i,e,t){if(!(this instanceof aa))return new aa(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(W2.toArray(e,t))}Ay.exports=aa;aa.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),J2(e.length<=this.blockSize);for(var t=e.length;t{var St=My;St.utils=kn();St.common=ea();St.sha=by();St.ripemd=_y();St.hmac=ky();St.sha1=St.sha.sha1;St.sha256=St.sha.sha256;St.sha224=St.sha.sha224;St.sha384=St.sha.sha384;St.sha512=St.sha.sha512;St.ripemd160=St.ripemd.ripemd160});var Xl=X((Ql,ec)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var w=0;w255)return!1;return!0}function n(h,w){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return w&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,w,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),w.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&L<224?(l.push(String.fromCharCode((L&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((L&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:w}}(),o=function(){function h(l){for(var m=[],L=0;L>4]+w[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],x=[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],E=[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],A=[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],v=[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],C=[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],D=[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],N=[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],F=[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],U=[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],G=[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],q=[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],K=[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],ye=[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 te(h){for(var w=[],g=0;g>2,this._Ke[L][w%4]=m[w],this._Kd[h-L][w%4]=m[w];for(var f=0,I=l,S;I>16&255]<<24^c[S>>8&255]<<16^c[S&255]<<8^c[S>>24&255]^p[f]<<24,f+=1,l!=8)for(var w=1;w>8&255]<<8^c[S>>16&255]<<16^c[S>>24&255]<<24;for(var w=l/2+1;w>2,H=I%4,this._Ke[O][H]=m[w],this._Kd[h-O][H]=m[w++],I++}for(var O=1;O>24&255]^q[S>>16&255]^K[S>>8&255]^ye[S&255]},ie.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var w=this._Ke.length-1,g=[0,0,0,0],l=te(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var L=1;L>24&255]^A[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^C[l[(m+3)%4]&255]^this._Ke[L][m];l=g.slice()}for(var f=r(16),I,m=0;m<4;m++)I=this._Ke[w][m],f[4*m]=(c[l[m]>>24&255]^I>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^I>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^I>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^I)&255;return f},ie.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var w=this._Kd.length-1,g=[0,0,0,0],l=te(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var L=1;L>24&255]^N[l[(m+3)%4]>>16&255]^F[l[(m+2)%4]>>8&255]^U[l[(m+1)%4]&255]^this._Kd[L][m];l=g.slice()}for(var f=r(16),I,m=0;m<4;m++)I=this._Kd[w][m],f[4*m]=(x[l[m]>>24&255]^I>>24)&255,f[4*m+1]=(x[l[(m+3)%4]>>16&255]^I>>16)&255,f[4*m+2]=(x[l[(m+2)%4]>>8&255]^I>>8)&255,f[4*m+3]=(x[l[(m+1)%4]&255]^I)&255;return f};var Se=function(h){if(!(this instanceof Se))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new ie(h)};Se.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var w=r(h.length),g=r(16),l=0;l=0;--w)this._counter[w]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,w){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",w instanceof u||(w=new u(w)),this._counter=w,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new ie(h)};y.prototype.encrypt=function(h){for(var w=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-w,l=0;l{"use strict";(function(i){function t(A){let v=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]),C=1779033703,D=3144134277,N=1013904242,F=2773480762,U=1359893119,G=2600822924,q=528734635,K=1541459225,ye=new Uint32Array(64);function te(y){let b=0,T=y.length;for(;T>=64;){let _=C,h=D,w=N,g=F,l=U,m=G,L=q,f=K,I,S,O,H,Q;for(S=0;S<16;S++)O=b+S*4,ye[S]=(y[O]&255)<<24|(y[O+1]&255)<<16|(y[O+2]&255)<<8|y[O+3]&255;for(S=16;S<64;S++)I=ye[S-2],H=(I>>>17|I<<32-17)^(I>>>19|I<<32-19)^I>>>10,I=ye[S-15],Q=(I>>>7|I<<32-7)^(I>>>18|I<<32-18)^I>>>3,ye[S]=(H+ye[S-7]|0)+(Q+ye[S-16]|0)|0;for(S=0;S<64;S++)H=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&L)|0)+(f+(v[S]+ye[S]|0)|0)|0,Q=((_>>>2|_<<32-2)^(_>>>13|_<<32-13)^(_>>>22|_<<32-22))+(_&h^_&w^h&w)|0,f=L,L=m,m=l,l=g+H|0,g=w,w=h,h=_,_=H+Q|0;C=C+_|0,D=D+h|0,N=N+w|0,F=F+g|0,U=U+l|0,G=G+m|0,q=q+L|0,K=K+f|0,b+=64,T-=64}}te(A);let ie,Se=A.length%64,ae=A.length/536870912|0,we=A.length<<3,M=Se<56?56:120,u=A.slice(A.length-Se,A.length);for(u.push(128),ie=Se+1;ie>>24&255),u.push(ae>>>16&255),u.push(ae>>>8&255),u.push(ae>>>0&255),u.push(we>>>24&255),u.push(we>>>16&255),u.push(we>>>8&255),u.push(we>>>0&255),te(u),[C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,K>>>24&255,K>>>16&255,K>>>8&255,K>>>0&255]}function n(A,v,C){A=A.length<=64?A:t(A);let D=64+v.length+4,N=new Array(D),F=new Array(64),U,G=[];for(U=0;U<64;U++)N[U]=54;for(U=0;U=D-4;K--){if(N[K]++,N[K]<=255)return;N[K]=0}}for(;C>=32;)q(),G=G.concat(t(F.concat(t(N)))),C-=32;return C>0&&(q(),G=G.concat(t(F.concat(t(N))).slice(0,C))),G}function r(A,v,C,D,N){let F;for(d(A,(2*C-1)*16,N,0,16),F=0;F<2*C;F++)o(A,F*16,N,16),s(N,D),d(N,0,A,v+F*16,16);for(F=0;F>>32-v}function s(A,v){d(A,0,v,0,16);for(let C=8;C>0;C-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let C=0;C<16;++C)A[C]+=v[C]}function o(A,v,C,D){for(let N=0;N=256)return!1}return!0}function c(A,v){if(typeof A!="number"||A%1)throw new Error("invalid "+v);return A}function x(A,v,C,D,N,F,U){if(C=c(C,"N"),D=c(D,"r"),N=c(N,"p"),F=c(F,"dkLen"),C===0||(C&C-1)!==0)throw new Error("N must be power of 2");if(C>2147483647/128/D)throw new Error("N too large");if(D>2147483647/128/N)throw new Error("r too large");if(!p(A))throw new Error("password must be an array or buffer");if(A=Array.prototype.slice.call(A),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let G=n(A,v,N*128*D),q=new Uint32Array(N*32*D);for(let l=0;lh&&(l=h);for(let L=0;Lh&&(l=h);for(let L=0;L>0&255),G.push(q[L]>>8&255),G.push(q[L]>>16&255),G.push(q[L]>>24&255);let m=n(A,G,F);return U&&U(null,1,m),m}U&&w(g)};if(!U)for(;;){let l=g();if(l!=null)return l}g()}let E={scrypt:function(A,v,C,D,N,F,U){return new Promise(function(G,q){let K=0;U&&U(0),x(A,v,C,D,N,F,function(ye,te,ie){if(ye)q(ye);else if(ie)U&&K!==1&&U(1),G(new Uint8Array(ie));else if(U&&te!==K)return K=te,U(te)})})},syncScrypt:function(A,v,C,D,N,F){return new Uint8Array(x(A,v,C,D,N,F))}};typeof nd<"u"?nc.exports=E:typeof define=="function"&&define.amd?define(E):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=E)})(nd)});var Ec=X((zw,Mc)=>{"use strict";var Fo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",od={};for(is=0;is>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Ac(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=fa(e)^n>>5}for(e=fa(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=Ac(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=fa(n)^s,r+=Fo.charAt(s)}for(a=0;a<6;++a)n=fa(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=Fo.charAt(o)}return r}function kc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=Ac(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(x)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function Pb(){var i=kc.apply(null,arguments);if(typeof i=="object")return i}function Nb(i){var e=kc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Lo(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof Ud=="object"&&typeof jd<"u"?jd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(Ud,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,x=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")x=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(E,A){var v=function(D){var N=typeof Request<"u"&&o instanceof Request?o.clone():o;n(N,d).then(function(F){if(Array.isArray(x)&&x.indexOf(F.status)===-1)E(F);else if(typeof x=="function")try{return Promise.resolve(x(D,null,F)).then(function(U){U?C(D,null,F):E(F)}).catch(A)}catch(U){A(U)}else D=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var Vd=X(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.$dictionary=void 0;Zo.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Ms=X((rk,Kf)=>{Kf.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var qd=X(Fi=>{var Ae=Ms(),Hd=()=>[{type:Ae.RANGE,from:48,to:57}],Wf=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(Hd()),Jf=()=>[{type:Ae.CHAR,value:9},{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:11},{type:Ae.CHAR,value:12},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:32},{type:Ae.CHAR,value:160},{type:Ae.CHAR,value:5760},{type:Ae.RANGE,from:8192,to:8202},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233},{type:Ae.CHAR,value:8239},{type:Ae.CHAR,value:8287},{type:Ae.CHAR,value:12288},{type:Ae.CHAR,value:65279}],w5=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Fi.words=()=>({type:Ae.SET,set:Wf(),not:!1});Fi.notWords=()=>({type:Ae.SET,set:Wf(),not:!0});Fi.ints=()=>({type:Ae.SET,set:Hd(),not:!1});Fi.notInts=()=>({type:Ae.SET,set:Hd(),not:!0});Fi.whitespace=()=>({type:Ae.SET,set:Jf(),not:!1});Fi.notWhitespace=()=>({type:Ae.SET,set:Jf(),not:!0});Fi.anyChar=()=>({type:Ae.SET,set:w5(),not:!0})});var Qf=X(Es=>{var $f=Ms(),Aa=qd(),_5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",A5={0:0,t:9,n:10,v:11,f:12,r:13};Es.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?_5.indexOf(d):A5[p],x=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),i};Es.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Aa.words());else if(r[2])t.push(Aa.ints());else if(r[3])t.push(Aa.whitespace());else if(r[4])t.push(Aa.notWords());else if(r[5])t.push(Aa.notInts());else if(r[6])t.push(Aa.notWhitespace());else if(r[7])t.push({type:$f.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:$f.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Es.error(e,"Unterminated character class")};Es.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var Xf=X(Cs=>{var eu=Ms();Cs.wordBoundary=()=>({type:eu.POSITION,value:"b"});Cs.nonWordBoundary=()=>({type:eu.POSITION,value:"B"});Cs.begin=()=>({type:eu.POSITION,value:"^"});Cs.end=()=>({type:eu.POSITION,value:"$"})});var Yf=X((uk,Gd)=>{var ka=Qf(),bn=Ms(),vr=qd(),tu=Xf();Gd.exports=i=>{var e=0,t,n,r={type:bn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=N=>{ka.error(i,`Nothing to repeat at column ${N-1}`)},p=ka.strToChars(i);for(t=p.length;e{"use strict";var xn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new xn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Zf.exports=Li});var nm=X((dk,tm)=>{var nu=Yf(),Is=em(),wr=nu.types;tm.exports=class Ss{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=nu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ss.prototype.max!=null?Ss.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case wr.ROOT:case wr.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var k5=_r&&_r.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_r,"__esModule",{value:!0});_r.RandomGenerator=void 0;var M5=k5(nm()),E5;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new M5.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(E5=_r.RandomGenerator||(_r.RandomGenerator={}))});var Rs=X(Ma=>{"use strict";var C5=Ma&&Ma.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.TypeGuardError=void 0;var I5=function(i){C5(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Ma.TypeGuardError=I5});var rm=X(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$any=void 0;var S5=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};iu.$any=S5});var am=X(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.$every=void 0;var R5=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$guard=void 0;var P5=Rs(),N5=function(i){return function(e,t){if(e===!0)throw new P5.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};au.$guard=N5});var om=X(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.$is_between=void 0;var D5=function(i,e,t){return e<=i&&i<=t};su.$is_between=D5});var um=X(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$is_custom=void 0;var O5=Vd(),B5=function(i,e,t,n){var r,a=(r=O5.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};ou.$is_custom=B5});var lm=X(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$is_date=void 0;var F5=function(i){return L5.test(i)};uu.$is_date=F5;var L5=/^(\d{4})-(\d{2})-(\d{2})$/});var dm=X(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_datetime=void 0;var U5=function(i){return!isNaN(new Date(i).getTime())};lu.$is_datetime=U5});var pm=X(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$is_email=void 0;var j5=function(i){return V5.test(i)};du.$is_email=j5;var V5=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var ym=X(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_ipv4=void 0;var H5=function(i){return q5.test(i)};pu.$is_ipv4=H5;var q5=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var cm=X(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_ipv6=void 0;var G5=function(i){return z5.test(i)};yu.$is_ipv6=G5;var z5=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var fm=X(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_url=void 0;var K5=function(i){return W5.test(i)};cu.$is_url=K5;var W5=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var mm=X(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_uuid=void 0;var J5=function(i){return $5.test(i)};fu.$is_uuid=J5;var $5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var hm=X(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$join=void 0;var Q5=function(i){return X5(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};mu.$join=Q5;var X5=function(i){return Y5(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},Y5=function(i){return Z5.has(i)},Z5=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var bm=X(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$number=void 0;var e1=Rs(),t1=function(i){if(isFinite(i)===!1)throw new e1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};hu.$number=t1});var xm=X(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$report=void 0;var n1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};bu.$report=n1});var gm=X(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$rest=void 0;var i1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};xu.$rest=i1});var Tm=X(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$string=void 0;var r1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};gu.$string=r1});var vm=X(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$tail=void 0;var a1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Tu.$tail=a1});var km=X(Ar=>{"use strict";var jt=Ar&&Ar.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:x1.$number,string:v1.$string,tail:w1.$tail,rest:T1.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:s1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:wm.RandomGenerator,pick:wm.RandomGenerator.pick}};var e=function(t){return function(n){throw new _m.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(_1=Ar.Namespace||(Ar.Namespace={}))});var Mm=X(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.MapUtil=void 0;var A1;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(A1=Ps.MapUtil||(Ps.MapUtil={}))});var Cm=X(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0})});var Sm=X(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0})});var Pm=X(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0})});var Dm=X(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0})});var Bm=X(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0})});var Lm=X(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0})});var ip=X(j=>{"use strict";var k1=j&&j.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),kr=j&&j.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&k1(e,i,t)};Object.defineProperty(j,"__esModule",{value:!0});j.createValidatePrune=j.createIsPrune=j.createAssertPrune=j.createPrune=j.createValidateClone=j.createIsClone=j.createAssertClone=j.createClone=j.createRandom=j.createValidateStringify=j.createIsStringify=j.createAssertStringify=j.createStringify=j.createValidateParse=j.createAssertParse=j.createIsParse=j.createValidateEquals=j.createEquals=j.createAssertEquals=j.createValidate=j.createIs=j.createAssertType=j.createAssert=j.validatePrune=j.isPrune=j.assertPrune=j.prune=j.validateClone=j.isClone=j.assertClone=j.clone=j.literals=j.random=j.metadata=j.validateStringify=j.isStringify=j.assertStringify=j.stringify=j.validateParse=j.isParse=j.assertParse=j.application=j.customValidators=j.validateEquals=j.equals=j.assertEquals=j.validate=j.is=j.assertType=j.assert=void 0;var Ea=Vd(),ke=km(),M1=Mm();kr(Cm(),j);kr(Sm(),j);kr(Pm(),j);kr(Dm(),j);kr(Bm(),j);kr(Lm(),j);kr(Rs(),j);function zd(){ne("assert")}j.assert=zd;Object.assign(zd,ke.Namespace.assert("assert"));function Kd(){ne("assertType")}j.assertType=Kd;Object.assign(Kd,ke.Namespace.assert("assertType"));function vu(){ne("is")}j.is=vu;Object.assign(vu,ke.Namespace.assert("is"));function wu(){ne("validate")}j.validate=wu;Object.assign(wu,ke.Namespace.validate());function Wd(){ne("assertEquals")}j.assertEquals=Wd;Object.assign(Wd,ke.Namespace.assert("assertEquals"));function Jd(){ne("equals")}j.equals=Jd;Object.assign(Jd,ke.Namespace.is());function $d(){ne("validateEquals")}j.validateEquals=$d;Object.assign($d,ke.Namespace.validate());j.customValidators={size:function(i){var e,t;return i?(t=(e=Ea.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Ea.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Ea.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Ea.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=M1.MapUtil.take(Ea.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Ea.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function E1(){ne("application")}j.application=E1;function Qd(){ne("assertParse")}j.assertParse=Qd;Object.assign(Qd,ke.Namespace.assert("assertParse"));function Xd(){ne("isParse")}j.isParse=Xd;Object.assign(Xd,vu);function Yd(){ne("validateParse")}j.validateParse=Yd;Object.assign(Yd,wu);function Zd(){ne("stringify")}j.stringify=Zd;Object.assign(Zd,ke.Namespace.stringify("stringify"));function _u(){ne("assertStringify")}j.assertStringify=_u;Object.assign(_u,ke.Namespace.assert("assertStringify"));Object.assign(_u,ke.Namespace.stringify("assertStringify"));function Au(){ne("isStringify")}j.isStringify=Au;Object.assign(Au,ke.Namespace.is());Object.assign(Au,ke.Namespace.stringify("isStringify"));function ku(){ne("validateStringify")}j.validateStringify=ku;Object.assign(ku,ke.Namespace.validate());Object.assign(ku,ke.Namespace.stringify("validateStringify"));function C1(){ne("metadata")}j.metadata=C1;function ep(){ne("random")}j.random=ep;Object.assign(ep,ke.Namespace.random());function I1(){ne("literals")}j.literals=I1;function tp(){ne("clone")}j.clone=tp;Object.assign(tp,ke.Namespace.clone("clone"));function Mu(){ne("assertClone")}j.assertClone=Mu;Object.assign(Mu,ke.Namespace.assert("assertClone"));Object.assign(Mu,ke.Namespace.clone("assertClone"));function Eu(){ne("isClone")}j.isClone=Eu;Object.assign(Eu,ke.Namespace.is());Object.assign(Eu,ke.Namespace.clone("isClone"));function Cu(){ne("validateClone")}j.validateClone=Cu;Object.assign(Cu,ke.Namespace.validate());Object.assign(Cu,ke.Namespace.clone("validateClone"));function np(){ne("prune")}j.prune=np;Object.assign(np,ke.Namespace.prune("prune"));function Iu(){ne("assertPrune")}j.assertPrune=Iu;Object.assign(Iu,ke.Namespace.assert("assertPrune"));Object.assign(Iu,ke.Namespace.prune("assertPrune"));function Su(){ne("isPrune")}j.isPrune=Su;Object.assign(Su,ke.Namespace.is());Object.assign(Su,ke.Namespace.prune("isPrune"));function Ru(){ne("validatePrune")}j.validatePrune=Ru;Object.assign(Ru,ke.Namespace.prune("validatePrune"));Object.assign(Ru,ke.Namespace.validate());function Um(){ne("createAssert")}j.createAssert=Um;Object.assign(Um,zd);function jm(){ne("createAssertType")}j.createAssertType=jm;Object.assign(jm,Kd);function Vm(){ne("createIs")}j.createIs=Vm;Object.assign(Vm,vu);function Hm(){ne("createValidate")}j.createValidate=Hm;Object.assign(Hm,wu);function qm(){ne("createAssertEquals")}j.createAssertEquals=qm;Object.assign(qm,Wd);function Gm(){ne("createEquals")}j.createEquals=Gm;Object.assign(Gm,Jd);function zm(){ne("createValidateEquals")}j.createValidateEquals=zm;Object.assign(zm,$d);function Km(){ne("createIsParse")}j.createIsParse=Km;Object.assign(Km,Xd);function Wm(){ne("createAssertParse")}j.createAssertParse=Wm;Object.assign(Wm,Qd);function Jm(){ne("createValidateParse")}j.createValidateParse=Jm;Object.assign(Jm,Yd);function $m(){ne("createStringify")}j.createStringify=$m;Object.assign($m,Zd);function Qm(){ne("createAssertStringify")}j.createAssertStringify=Qm;Object.assign(Qm,_u);function Xm(){ne("createIsStringify")}j.createIsStringify=Xm;Object.assign(Xm,Au);function Ym(){ne("createValidateStringify")}j.createValidateStringify=Ym;Object.assign(Ym,ku);function Zm(){ne("createRandom")}j.createRandom=Zm;Object.assign(Zm,ep);function eh(){ne("createClone")}j.createClone=eh;Object.assign(eh,tp);function th(){ne("createAssertClone")}j.createAssertClone=th;Object.assign(th,Mu);function nh(){ne("createIsClone")}j.createIsClone=nh;Object.assign(nh,Eu);function ih(){ne("createValidateClone")}j.createValidateClone=ih;Object.assign(ih,Cu);function rh(){ne("createPrune")}j.createPrune=rh;Object.assign(rh,np);function ah(){ne("createAssertPrune")}j.createAssertPrune=ah;Object.assign(ah,Iu);function sh(){ne("createIsPrune")}j.createIsPrune=sh;Object.assign(sh,Su);function oh(){ne("createValidatePrune")}j.createValidatePrune=oh;Object.assign(oh,Ru);function ne(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var lh=X(gn=>{"use strict";var uh=gn&&gn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),S1=gn&&gn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),R1=gn&&gn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&uh(e,i,t);return S1(e,i),e},P1=gn&&gn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&uh(e,i,t)};Object.defineProperty(gn,"__esModule",{value:!0});var N1=R1(ip());gn.default=N1;P1(ip(),gn)});var wd={};Lr(wd,{BaseContract:()=>oa,BigNumber:()=>P,Contract:()=>re,ContractFactory:()=>cr,FixedNumber:()=>yt,Signer:()=>Bt,VoidSigner:()=>si,Wallet:()=>In,Wordlist:()=>hn,constants:()=>mt,errors:()=>Kt,getDefaultProvider:()=>$o,logger:()=>lf,providers:()=>Di,utils:()=>Y,version:()=>Xo,wordlists:()=>mr});var Lp=_n(Qu());var Ep="logger/5.7.0";var Cp=!1,Ip=!1,Us={debug:1,default:2,info:2,warning:3,error:4,off:5},Sp=Us.default,Xu=null;function _h(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var Rp=_h(),Yu;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(Yu||(Yu={}));var Kt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Kt||(Kt={}));var Pp="0123456789abcdef",k=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Us[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Sp>Us[n])&&console.log.apply(console,t)}debug(...e){this._log(k.levels.DEBUG,e)}info(...e){this._log(k.levels.INFO,e)}warn(...e){this._log(k.levels.WARNING,e)}makeError(e,t,n){if(Ip)return this.makeError("censored error",t,{});t||(t=k.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let x=0;x>4],c+=Pp[p[x]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Kt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Kt.CALL_EXCEPTION:case Kt.INSUFFICIENT_FUNDS:case Kt.MISSING_NEW:case Kt.NONCE_EXPIRED:case Kt.REPLACEMENT_UNDERPRICED:case Kt.TRANSACTION_REPLACED:case Kt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,k.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Rp&&this.throwError("platform missing String.prototype.normalize",k.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Rp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,k.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,k.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,k.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",k.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",k.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",k.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Xu||(Xu=new k(Ep)),Xu}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",k.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Cp){if(!e)return;this.globalLogger().throwError("error censorship permanent",k.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ip=!!e,Cp=!!t}static setLogLevel(e){let t=Us[e.toLowerCase()];if(t==null){k.globalLogger().warn("invalid log level - "+e);return}Sp=t}static from(e){return new k(e)}};k.errors=Kt;k.levels=Yu;var Np="bytes/5.7.0";var vt=new k(Np);function Op(i){return!!i.toHexString}function Ur(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return Ur(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ti(i){return Z(i)&&!(i.length%2)||on(i)}function Dp(i){return typeof i=="number"&&i==i&&i%1===0}function on(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!Dp(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function B(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),Ur(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Op(i)&&(i=i.toHexString()),Z(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rB(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),Ur(n)}function Zt(i){let e=B(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),Ur(t)}function Z(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var Zu="0123456789abcdef";function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=Zu[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Op(i))return i.toHexString();if(Z(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(on(i)){let t="0x";for(let n=0;n>4]+Zu[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Pt(i){if(typeof i!="string")i=V(i);else if(!Z(i)||i.length%2)return null;return(i.length-2)/2}function Me(i,e,t){return typeof i!="string"?i=V(i):(!Z(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=V(t).substring(2)}),e}function Fn(i){let e=el(V(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function el(i){typeof i!="string"&&(i=V(i)),Z(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function Ln(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ti(i)){let t=B(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=V(t.slice(0,32)),e.s=V(t.slice(32,64))):t.length===65?(e.r=V(t.slice(0,32)),e.s=V(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=V(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=ir(B(e._vs),32);e._vs=V(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=V(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!Z(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=ce(e.r,32),e.s==null||!Z(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=ce(e.s,32);let t=B(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=V(t);e._vs&&(Z(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=ce(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Na(i){return i=Ln(i),V(le([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var js="bignumber/5.7.0";var Da=Lp.default.BN,ni=new k(js),tl={},Bp=9007199254740991;function Up(i){return i!=null&&(P.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||Z(i)||typeof i=="bigint"||on(i))}var Fp=!1,P=class{constructor(e,t){e!==tl&&ni.throwError("cannot call constructor directly; use BigNumber.from",k.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wt(me(this).fromTwos(e))}toTwos(e){return Wt(me(this).toTwos(e))}abs(){return this._hex[0]==="-"?P.from(this._hex.substring(1)):this}add(e){return Wt(me(this).add(me(e)))}sub(e){return Wt(me(this).sub(me(e)))}div(e){return P.from(e).isZero()&&un("division-by-zero","div"),Wt(me(this).div(me(e)))}mul(e){return Wt(me(this).mul(me(e)))}mod(e){let t=me(e);return t.isNeg()&&un("division-by-zero","mod"),Wt(me(this).umod(t))}pow(e){let t=me(e);return t.isNeg()&&un("negative-power","pow"),Wt(me(this).pow(t))}and(e){let t=me(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Wt(me(this).and(t))}or(e){let t=me(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Wt(me(this).or(t))}xor(e){let t=me(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Wt(me(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Wt(me(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Wt(me(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Wt(me(this).shrn(e))}eq(e){return me(this).eq(me(e))}lt(e){return me(this).lt(me(e))}lte(e){return me(this).lte(me(e))}gt(e){return me(this).gt(me(e))}gte(e){return me(this).gte(me(e))}isNegative(){return this._hex[0]==="-"}isZero(){return me(this).isZero()}toNumber(){try{return me(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ni.throwError("this platform does not support BigInt",k.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Fp||(Fp=!0,ni.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ni.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",k.errors.UNEXPECTED_ARGUMENT,{}):ni.throwError("BigNumber.toString does not accept parameters",k.errors.UNEXPECTED_ARGUMENT,{})),me(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof P)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new P(tl,Oa(e)):e.match(/^-?[0-9]+$/)?new P(tl,Oa(new Da(e))):ni.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Bp||e<=-Bp)&&un("overflow","BigNumber.from",e),P.from(String(e));let t=e;if(typeof t=="bigint")return P.from(t.toString());if(on(t))return P.from(V(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return P.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(Z(n)||n[0]==="-"&&Z(n.substring(1))))return P.from(n)}return ni.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Oa(i){if(typeof i!="string")return Oa(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ni.throwArgumentError("invalid hex","value",i),i=Oa(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Wt(i){return P.from(Oa(i))}function me(i){let e=P.from(i).toHexString();return e[0]==="-"?new Da("-"+e.substring(3),16):new Da(e.substring(2),16)}function un(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ni.throwError(i,k.errors.NUMERIC_FAULT,n)}function nl(i){return new Da(i,36).toString(16)}function il(i){return new Da(i,16).toString(36)}var Vt=new k(js),Ba={},Vp=P.from(0),Hp=P.from(-1);function qp(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,k.errors.NUMERIC_FAULT,r)}var Fa="0";for(;Fa.length<256;)Fa+=Fa;function rl(i){if(typeof i!="number")try{i=P.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Fa.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function jr(i,e){e==null&&(e=0);let t=rl(e);i=P.from(i);let n=i.lt(Vp);n&&(i=i.mul(Hp));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&qp("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new ii(Ba,t,n,r)}},yt=class{constructor(e,t,n,r){e!==Ba&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",k.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(jp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(jp.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=yt.from("1"+Fa.substring(0,e),this.format),r=Ah.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=P.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ce(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return yt.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!Up(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),yt.fromString(jr(e,t),ii.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ii.from(t),r=ln(e,n.decimals);!n.signed&&r.lt(Vp)&&qp("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=ce(a,n.width/8));let s=jr(r,n.decimals);return new yt(Ba,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ii.from(t);if(B(e).length>n.width/8)throw new Error("overflow");let r=P.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=jr(r,n.decimals);return new yt(Ba,a,s,n)}static from(e,t){if(typeof e=="string")return yt.fromString(e,t);if(on(e))return yt.fromBytes(e,t);try{return yt.fromValue(e,0,t)}catch(n){if(n.code!==k.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},jp=yt.from(1),Ah=yt.from("0.5");var Gp="properties/5.7.0";var kh=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Vs=new k(Gp);function R(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function ft(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ee(i){return kh(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function Vr(i,e){(!i||typeof i!="object")&&Vs.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||Vs.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function Te(i){let e={};for(let t in i)e[t]=i[t];return e}var Mh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function zp(i){if(i==null||Mh[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tct(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&R(e,t,ct(n))}return e}return Vs.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ct(i){return Eh(i)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Un="abi/5.7.0";var be=new k(Un),rr={},Kp={calldata:!0,memory:!0,storage:!0},Ch={calldata:!0,memory:!0};function Hs(i,e){if(i==="bytes"||i==="string"){if(Kp[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&Ch[e])return!0;return(Kp[e]||e==="payable")&&be.throwArgumentError("invalid modifier","name",e),!1}function Ih(i,e){let t=i;function n(o){be.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==he.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===he.full?", ":",")+")"):t+=this.type,e!==he.sighash&&(this.indexed===!0&&(t+=" indexed"),e===he.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?lt.fromString(e,t):lt.fromObject(e)}static fromObject(e){return lt.isParamType(e)?e:new lt(rr,{name:e.name||null,type:Hr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(lt.fromObject):null})}static fromString(e,t){function n(r){return lt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(Ih(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function La(i,e){return Ph(i).map(t=>lt.fromString(t,e))}var qt=class{constructor(e,t){e!==rr&&be.throwError("use a static from method",k.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),qs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Dt.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Nt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return be.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Dt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Nt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):be.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=he.sighash),he[e]||be.throwArgumentError("invalid format type","format",e),e===he.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==he.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===he.full?", ":",")+") ",e!==he.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&be.throwArgumentError("invalid event object","value",e);let t={name:Ua(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new Ht(rr,t)}static fromString(e){let t=e.match(ja);t||be.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:be.warn("unknown modifier: "+r)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:La(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Jp(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&be.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||be.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=P.from(t[1]),t[0]):i}function $p(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Qp(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&be.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&be.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&be.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",i),e}var Nt=class extends qt{format(e){if(e||(e=he.sighash),he[e]||be.throwArgumentError("invalid format type","format",e),e===he.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===he.sighash&&be.throwError("cannot format a constructor for sighash",k.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===he.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Nt.fromString(e):Nt.fromObject(e)}static fromObject(e){if(Nt.isConstructorFragment(e))return e;e.type!=="constructor"&&be.throwArgumentError("invalid constructor object","value",e);let t=Qp(e);t.constant&&be.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Nt(rr,n)}static fromString(e){let t={type:"constructor"};e=Jp(e,t);let n=e.match(ja);return(!n||n[1].trim()!=="constructor")&&be.throwArgumentError("invalid constructor string","value",e),t.inputs=La(n[2].trim(),!1),$p(n[3].trim(),t),Nt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Dt=class extends Nt{format(e){if(e||(e=he.sighash),he[e]||be.throwArgumentError("invalid format type","format",e),e===he.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==he.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===he.full?", ":",")+") ",e!==he.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isFunctionFragment(e))return e;e.type!=="function"&&be.throwArgumentError("invalid function object","value",e);let t=Qp(e),n={type:e.type,name:Ua(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(lt.fromObject):[],outputs:e.outputs?e.outputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Dt(rr,n)}static fromString(e){let t={type:"function"};e=Jp(e,t);let n=e.split(" returns ");n.length>2&&be.throwArgumentError("invalid function string","value",e);let r=n[0].match(ja);if(r||be.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&Ua(t.name),t.inputs=La(r[2],!1),$p(r[3].trim(),t),n.length>1){let a=n[1].match(ja);(a[1].trim()!=""||a[3].trim()!="")&&be.throwArgumentError("unexpected tokens","value",e),t.outputs=La(a[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function Wp(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&be.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends qt{format(e){if(e||(e=he.sighash),he[e]||be.throwArgumentError("invalid format type","format",e),e===he.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==he.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===he.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&be.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Ua(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return Wp(new tn(rr,t))}static fromString(e){let t={type:"error"},n=e.match(ja);return n||be.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Ua(t.name),t.inputs=La(n[2],!1),Wp(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Hr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var Rh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ua(i){return(!i||!i.match(Rh))&&be.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var ja=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Ph(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&al.throwError("value out-of-bounds",k.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=le([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},sr=class{constructor(e,t,n,r){R(this,"_data",B(e)),R(this,"wordSize",t||32),R(this,"_coerceFunc",n),R(this,"allowLoose",r),this._offset=0}get data(){return V(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):sr.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:al.throwError("data out-of-bounds",k.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new sr(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return P.from(this.readBytes(this.wordSize))}};var Yp=_n(Xp());function de(i){return"0x"+Yp.default.keccak_256(B(i))}var zs={};Lr(zs,{decode:()=>Va,encode:()=>ri});var Zp="rlp/5.7.0";var jn=new k(Zp);function e0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function t0(i,e,t){let n=0;for(let r=0;re+1+n&&jn.throwError("child data too short",k.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function r0(i,e){if(i.length===0&&jn.throwError("data too short",k.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&jn.throwError("data short segment too short",k.errors.BUFFER_OVERRUN,{});let n=t0(i,e+1,t);return e+1+t+n>i.length&&jn.throwError("data long segment too short",k.errors.BUFFER_OVERRUN,{}),n0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&jn.throwError("data array too short",k.errors.BUFFER_OVERRUN,{}),n0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&jn.throwError("data array too short",k.errors.BUFFER_OVERRUN,{});let n=t0(i,e+1,t);e+1+t+n>i.length&&jn.throwError("data array too short",k.errors.BUFFER_OVERRUN,{});let r=V(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&jn.throwError("data too short",k.errors.BUFFER_OVERRUN,{});let n=V(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:V(i[e])}}function Va(i){let e=B(i),t=r0(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",i),t.result}var a0="address/5.7.0";var Ai=new k(a0);function s0(i){Z(i,20)||Ai.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=B(de(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var Nh=9007199254740991;function Dh(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var sl={};for(let i=0;i<10;i++)sl[String(i)]=String(i);for(let i=0;i<26;i++)sl[String.fromCharCode(65+i)]=String(10+i);var o0=Math.floor(Dh(Nh));function u0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>sl[n]).join("");for(;e.length>=o0;){let n=e.substring(0,o0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function pe(i){let e=null;if(typeof i!="string"&&Ai.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=s0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Ai.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==u0(i)&&Ai.throwArgumentError("bad icap checksum","address",i),e=nl(i.substring(4));e.length<40;)e="0"+e;e=s0("0x"+e)}else Ai.throwArgumentError("invalid address","address",i);return e}function l0(i){try{return pe(i),!0}catch{}return!1}function d0(i){let e=il(pe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+u0("XE00"+e)+e}function or(i){let e=null;try{e=pe(i.from)}catch{Ai.throwArgumentError("missing from address","transaction",i)}let t=Zt(B(P.from(i.nonce).toHexString()));return pe(Me(de(ri([e,t])),12))}function p0(i,e,t){return Pt(e)!==32&&Ai.throwArgumentError("salt must be 32 bytes","salt",e),Pt(t)!==32&&Ai.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),pe(Me(de(le(["0xff",pe(i),e,t])),12))}var Ks=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=pe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return pe(ce(e.readValue().toHexString(),20))}};var Ws=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Gr=new k(Un);function ol(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Gr.throwError("cannot encode object for signature with missing names",k.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Gr.throwError("cannot encode object for signature with duplicate names",k.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Gr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Gr.throwArgumentError("types/value length mismatch","tuple",t);let r=new ar(i.wordSize),a=new ar(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let x=a.length;d.encode(a,c);let E=r.writeUpdatableValue();s.push(A=>{E(A+x)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function ul(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===k.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===k.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var Js=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Gr.throwError("insufficient data length",k.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rZs,EtherSymbol:()=>h0,HashZero:()=>Kr,MaxInt256:()=>m0,MaxUint256:()=>no,MinInt256:()=>f0,NegativeOne:()=>eo,One:()=>to,Two:()=>y0,WeiPerEther:()=>c0,Zero:()=>zr});var Zs="0x0000000000000000000000000000000000000000";var eo=P.from(-1),zr=P.from(0),to=P.from(1),y0=P.from(2),c0=P.from("1000000000000000000"),no=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),f0=P.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),m0=P.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Kr="0x0000000000000000000000000000000000000000000000000000000000000000";var h0="\u039E";var io=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=P.from(t),r=no.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(to).mul(eo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(zr)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var b0="strings/5.7.0";var x0=new k(b0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Ot;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Ot||(Ot={}));function Oh(i,e,t,n,r){return x0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function g0(i,e,t,n,r){if(i===Ot.BAD_PREFIX||i===Ot.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Ot.OVERRUN?t.length-e-1:0}function Bh(i,e,t,n,r){return i===Ot.OVERLONG?(n.push(r),0):(n.push(65533),g0(i,e,t,n,r))}var ro=Object.freeze({error:Oh,ignore:g0,replace:Bh});function dl(i,e){e==null&&(e=ro.error),i=B(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Ot.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Ot.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Ot.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Ot.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Ot.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Ot.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function xe(i,e=Gt.current){e!=Gt.current&&(x0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return B(t)}function ll(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function pl(i,e){return'"'+dl(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?ll(t):(t-=65536,ll((t>>10&1023)+55296)+ll((t&1023)+56320))}).join("")+'"'}function ao(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return ao(dl(i,e))}function ki(i,e=Gt.current){return dl(xe(i,e))}function yl(i){let e=xe(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return V(le([e,Kr]).slice(0,32))}function cl(i){let e=B(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function Fh(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function T0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function ml(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var Lh=T0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Uh="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),jh=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Vh=fl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Hh=fl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),qh=fl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Fh),Gh=T0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function zh(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function Kh(i){return!!ml(i,Lh)}function Wh(i){let e=ml(i,jh);if(e)return[i+e.s];let t=Vh[i];if(t)return t;let n=Hh[i];if(n)return[i+n[0]];let r=qh[i];return r||null}function Jh(i){return!!ml(i,Gh)}function hl(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=ki(i);e=zh(e.map(n=>{if(Uh.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=Wh(n);return r||[n]})),e=ki(ao(e),Gt.NFKC),e.forEach(n=>{if(Jh(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(Kh(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ao(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var so=class extends Ha{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,xe(t))}decode(e){return Jt(super.decode(e))}};var ur=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return ol(e,this.coders,t)}decode(e){return e.coerce(this.name,ul(e,this.coders))}};var oo=new k(Un),$h=new RegExp(/^bytes([0-9]*)$/),Qh=new RegExp(/^(u?int)([0-9]*)$/),Wr=class{constructor(e){R(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ks(e.name);case"bool":return new $s(e.name);case"string":return new so(e.name);case"bytes":return new Qs(e.name);case"array":return new Js(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ur((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Ys(e.name)}let t=e.type.match(Qh);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&oo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new io(n/8,t[1]==="int",e.name)}if(t=e.type.match($h),t){let n=parseInt(t[1]);return(n===0||n>32)&&oo.throwArgumentError("invalid bytes length","param",e),new Xs(n,e.name)}return oo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new sr(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ar(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(lt.from(r)));return new ur(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&oo.throwError("types/values length mismatch",k.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(lt.from(s))),r=new ur(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(lt.from(s)));return new ur(r,"_").decode(this._getReader(B(t),n))}},qa=new Wr;function nn(i){return de(xe(i))}var uo="hash/5.7.0";var bl={};Lr(bl,{decode:()=>Jr,encode:()=>$r});function Jr(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function Xh(i){let e={};for(let t=0;t>--d&1}let x=31,E=Math.pow(2,x),A=E>>>1,v=A>>1,C=E-1,D=0;for(let q=0;q1;){let Se=K+ye>>>1;q>>1|c(),te=te<<1^A,ie=(ie^A)<<1|A|1;F=te,U=1+ie-te}let G=n-4;return N.map(q=>{switch(q-G){case 3:return G+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return G+256+(i[o++]<<8|i[o++]);case 1:return G+i[o++];default:return q-1}})}function Zh(i){let e=0;return()=>i[e++]}function _0(i){return Zh(Yh(i))}function e6(i){return i&1?~i>>1:i>>1}function t6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function A0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(r6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(a6(t,i))}return Xh(w0(e))}function i6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function k0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function r6(i,e){let t=1+e(),n=e(),r=i6(e),a=k0(r.length,1+i,e);return w0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,x)=>{let E=x*n;return[d+x*t,p.map(A=>A+E)]})}))}function a6(i,e){let t=1+e();return k0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function M0(i){let e=Ga(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Ga(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function E0(){return _0(Jr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var lo=E0(),s6=new Set(Ga(lo)),o6=new Set(Ga(lo)),u6=A0(lo),l6=M0(lo),C0=45,I0=95;function S0(i){return ki(i)}function d6(i){return i.filter(e=>e!=65039)}function R0(i){for(let e of i.split(".")){let t=S0(e);try{for(let n=t.lastIndexOf(I0)-1;n>=0;n--)if(t[n]!==I0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===C0&&t[3]===C0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function P0(i){return R0(p6(i,d6))}function p6(i,e){let t=S0(i).reverse(),n=[];for(;t.length;){let r=c6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(s6.has(a)){n.push(a);continue}if(o6.has(a))continue;let s=u6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return R0(y6(String.fromCodePoint(...n)))}function y6(i){return i.normalize("NFC")}function c6(i,e){var t;let n=l6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var f6=new k(uo),D0=new Uint8Array(32);D0.fill(0);function N0(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function xl(i){let e=xe(P0(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(N0(e.slice(n))),t}function gl(i){try{return xl(i).length!==0}catch{}return!1}function Mi(i){typeof i!="string"&&f6.throwArgumentError("invalid ENS name; not a string","name",i);let e=D0,t=xl(i);for(;t.length;)e=de(le([e,de(t.pop())]));return V(e)}function za(i){return V(le(xl(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var O0=`Ethereum Signed Message: -`;function Qr(i){return typeof i=="string"&&(i=xe(i)),de(le([xe(O0),xe(String(i.length)),i]))}var m6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ht=new k(uo),U0=new Uint8Array(32);U0.fill(0);var h6=P.from(-1),j0=P.from(0),V0=P.from(1),b6=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function x6(i){let e=B(i),t=e.length%32;return t?_t([e,U0.slice(t)]):V(e)}var g6=ce(V0.toHexString(),32),T6=ce(j0.toHexString(),32),B0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Tl=["name","version","chainId","verifyingContract","salt"];function F0(i){return function(e){return typeof e!="string"&&ht.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var v6={name:F0("name"),version:F0("version"),chainId:function(i){try{return P.from(i).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return pe(i).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=B(i);if(e.length!==32)throw new Error("bad length");return V(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function vl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",i);let r=b6.mask(t?n-1:n),a=t?r.add(V0).mul(h6):j0;return function(s){let o=P.from(s);return(o.lt(a)||o.gt(r))&&ht.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),ce(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&ht.throwArgumentError("invalid bytes width","type",i),function(n){return B(n).length!==t&&ht.throwArgumentError(`invalid length for ${i}`,"value",n),x6(n)}}}switch(i){case"address":return function(e){return ce(pe(e),32)};case"bool":return function(e){return e?g6:T6};case"bytes":return function(e){return de(e)};case"string":return function(e){return nn(e)}}return null}function L0(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){R(this,"types",Object.freeze(ct(e))),R(this,"_encoderCache",{}),R(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&ht.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!vl(c)&&(n[c]||ht.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?ht.throwArgumentError("missing primary type","types",e):a.length>1&&ht.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),R(this,"primaryType",a[0]);function s(o,d){d[o]&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=L0(o,e[o])+d.map(p=>L0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=vl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(de)),de(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?de(p):p});return s.unshift(r),_t(s)}}return ht.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||ht.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return de(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(vl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):ht.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=B0[n];r||ht.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Tl.indexOf(n.name)-Tl.indexOf(r.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return de(bt.encode(e,t,n))}static resolveNames(e,t,n,r){return m6(this,void 0,void 0,function*(){e=Te(e);let a={};e.verifyingContract&&!Z(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,d)=>(o==="address"&&!Z(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let r={},a=[];Tl.forEach(d=>{let p=e[d];p!=null&&(r[d]=v6[d](p),a.push({name:d,type:B0[d]}))});let s=bt.from(t),o=Te(t);return o.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return V(B(p));if(d.match(/^u?int/))return P.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&ht.throwArgumentError("invalid string","value",p),p}return ht.throwArgumentError("unsupported type","type",d)})}}};var xt=new k(Un);var Xr=class extends en{},Yr=class extends en{},wl=class extends en{},ai=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},w6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function H0(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Ei=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,R(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),R(this,"_abiCoder",ft(new.target,"getAbiCoder")()),R(this,"functions",{}),R(this,"errors",{}),R(this,"events",{}),R(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){xt.warn("duplicate definition - constructor");return}R(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){xt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||R(this,"deploy",Nt.from({payable:!1,type:"constructor"})),R(this,"_isInterface",!0)}format(e){e||(e=he.full),e===he.sighash&&xt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===he.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return qa}static getAddress(e){return pe(e)}static getSighash(e){return Me(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(Z(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];xt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching function","name",n):r.length>1&&xt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Dt.fromString(e).format()];return t||xt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(Z(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];xt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching event","name",n):r.length>1&&xt.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Ht.fromString(e).format()];return t||xt.throwArgumentError("no matching event","signature",e),t}getError(e){if(Z(e)){let n=ft(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}xt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching error","name",n):r.length>1&&xt.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Dt.fromString(e).format()];return t||xt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ft(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ft(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=B(t);return V(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",V(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),V(le([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=B(t);return V(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",V(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),V(le([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=B(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=V(n.slice(0,4)),c=w6[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,d=x.format()}catch{}break}}return xt.throwError("call revert exception"+a,k.errors.CALL_EXCEPTION,{method:e.format(),data:V(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),V(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&xt.throwError("too many arguments for "+e.format(),k.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?de(V(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=P.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),ce(V(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&xt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&xt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(de(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let E=this.getEventTopic(e);(!Z(n[0],32)||n[0].toLowerCase()!==E)&&xt.throwError("fragment/topic mismatch",k.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:E,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((E,A)=>{E.indexed?E.type==="string"||E.type==="bytes"||E.baseType==="tuple"||E.baseType==="array"?(r.push(lt.fromObject({type:"bytes32",name:E.name})),s.push(!0)):(r.push(E),s.push(!1)):(a.push(E),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,le(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,x=0;e.inputs.forEach((E,A)=>{if(E.indexed)if(o==null)p[A]=new ai({_isIndexed:!0,hash:null});else if(s[A])p[A]=new ai({_isIndexed:!0,hash:o[x++]});else try{p[A]=o[x++]}catch(v){p[A]=v}else try{p[A]=d[c++]}catch(v){p[A]=v}if(E.name&&p[E.name]==null){let v=p[A];v instanceof Error?Object.defineProperty(p,E.name,{enumerable:!0,get:()=>{throw H0(`property ${JSON.stringify(E.name)}`,v)}}):p[E.name]=v}});for(let E=0;E{throw H0(`index ${E}`,A)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Yr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:P.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Xr({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=V(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new wl({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var q0="abstract-provider/5.7.0";var _6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},A6=new k(q0),po=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){A6.checkAbstract(new.target,$t),R(this,"_isProvider",!0)}getFeeData(){return _6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ee({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=P.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var G0="abstract-signer/5.7.0";var An=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},dn=new k(G0),k6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],M6=[k.errors.INSUFFICIENT_FUNDS,k.errors.NONCE_EXPIRED,k.errors.REPLACEMENT_UNDERPRICED],Bt=class{constructor(){dn.checkAbstract(new.target,Bt),R(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ee(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ee(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)k6.indexOf(n)===-1&&dn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=Te(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&dn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ee(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>An(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&dn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?dn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&dn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&dn.throwError("network does not support EIP-1559",k.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):dn.throwError("failed to get consistent fee data",k.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(M6.indexOf(r.code)>=0)throw r;return dn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",k.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&dn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ee(t)})}_checkProvider(e){this.provider||dn.throwError("missing provider",k.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},si=class extends Bt{constructor(e,t){super(),R(this,"address",e),R(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{dn.throwError(e,k.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new si(this.address,e)}};var ue=_n(Qu()),Wn=_n(Pl());function sa(i,e,t){return t={path:e,exports:{},require:function(n,r){return $2(n,r??t.path)}},i(t,t.exports),t.exports}function $2(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Bl=Cy;function Cy(i,e){if(!i)throw new Error(e||"Assertion failed")}Cy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=sa(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,E=c&255;x?d.push(x,E):d.push(E)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(E>>1)-1?C=(E>>1)-D:C=D,A.isubn(C)):C=0,x[v]=C,A.iushrn(1)}return x}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var x=0,E=0,A;d.cmpn(-x)>0||p.cmpn(-E)>0;){var v=d.andln(3)+x&3,C=p.andln(3)+E&3;v===3&&(v=-1),C===3&&(C=-1);var D;(v&1)===0?D=0:(A=d.andln(7)+x&7,(A===3||A===5)&&C===2?D=-v:D=v),c[0].push(D);var N;(C&1)===0?N=0:(A=p.andln(7)+E&7,(A===3||A===5)&&v===2?N=-C:N=C),c[1].push(N),2*x===D+1&&(x=1-x),2*E===N+1&&(E=1-E),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var x="_"+p;d.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new ue.default(d,"hex","le")}t.intFromLE=o}),ho=rn.getNAF,Q2=rn.getJSF,bo=rn.assert;function Si(i,e){this.type=i,this.p=new ue.default(e.p,16),this.red=e.prime?ue.default.red(e.prime):ue.default.mont(this.p),this.zero=new ue.default(0).toRed(this.red),this.one=new ue.default(1).toRed(this.red),this.two=new ue.default(2).toRed(this.red),this.n=e.n&&new ue.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var dr=Si;Si.prototype.point=function(){throw new Error("Not implemented")};Si.prototype.validate=function(){throw new Error("Not implemented")};Si.prototype._fixedNafMul=function(e,t){bo(e.precomputed);var n=e._getDoubles(),r=ho(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),x=this.jpoint(null,null,null),E=a;E>0;E--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];bo(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Si.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,x,E;for(c=0;c=1;c-=2){var v=c-1,C=c;if(s[v]!==1||s[C]!==1){d[v]=ho(n[v],s[v],this._bitLength),d[C]=ho(n[C],s[C],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[C].length,p);continue}var D=[t[v],null,null,t[C]];t[v].y.cmp(t[C].y)===0?(D[1]=t[v].add(t[C]),D[2]=t[v].toJ().mixedAdd(t[C].neg())):t[v].y.cmp(t[C].y.redNeg())===0?(D[1]=t[v].toJ().mixedAdd(t[C]),D[2]=t[v].add(t[C].neg())):(D[1]=t[v].toJ().mixedAdd(t[C]),D[2]=t[v].toJ().mixedAdd(t[C].neg()));var N=[-3,-1,-5,-7,0,7,5,1,3],F=Q2(n[v],n[C]);for(p=Math.max(F[0].length,p),d[v]=new Array(p),d[C]=new Array(p),x=0;x=0;c--){for(var ye=0;c>=0;){var te=!0;for(x=0;x=0&&ye++,q=q.dblp(ye),c<0)break;for(x=0;x0?E=o[x][ie-1>>1]:ie<0&&(E=o[x][-ie-1>>1].neg()),E.type==="affine"?q=q.mixedAdd(E):q=q.add(E))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(A=p,v=c),x.negative&&(x=x.neg(),E=E.neg()),A.negative&&(A=A.neg(),v=v.neg()),[{a:x,b:E},{a:A,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),x=e.sub(o).sub(d),E=p.add(c).neg();return{k1:x,k2:E}};cn.prototype.pointFromX=function(e,t){e=new ue.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new ue.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Rt(i,e,t,n){dr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ue.default(0)):(this.x=new ue.default(e,16),this.y=new ue.default(t,16),this.z=new ue.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Fl(Rt,dr.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Rt(this,e,t,n)};Rt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Rt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),x=c.redMul(d),E=r.redMul(c),A=p.redSqr().redIAdd(x).redISub(E).redISub(E),v=p.redMul(E.redISub(A)).redISub(s.redMul(x)),C=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(A,v,C)};Rt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),x=n.redMul(p),E=d.redSqr().redIAdd(c).redISub(x).redISub(x),A=d.redMul(x.redISub(E)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(E,A,v)};Rt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var fo=sa(function(i,e){"use strict";var t=e;t.base=dr,t.short=Y2,t.mont=null,t.edwards=null}),mo=sa(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new fo.short(o):o.type==="edwards"?this.curve=new fo.edwards(o):this.curve=new fo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Wn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Wn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Wn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Wn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Wn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wn.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ii(i){if(!(this instanceof Ii))return new Ii(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(i.entropy,i.entropyEnc||"hex"),t=Cn.toArray(i.nonce,i.nonceEnc||"hex"),n=Cn.toArray(i.pers,i.persEnc||"hex");Bl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Iy=Ii;Ii.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ii.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=Cn.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var Z2=rn.assert;function xo(i,e){if(i instanceof xo)return i;this._importDER(i,e)||(Z2(i.r&&i.s,"Signature without r or s"),this.r=new ue.default(i.r,16),this.s=new ue.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var go=xo;function eb(){this.place=0}function Nl(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Ey(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}xo.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Ey(t),n=Ey(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];Dl(r,t.length),r=r.concat(t),r.push(2),Dl(r,n.length);var a=r.concat(n),s=[48];return Dl(s,a.length),s=s.concat(a),rn.encode(s,e)};var tb=function(){throw new Error("unsupported")},Sy=rn.assert;function pn(i){if(!(this instanceof pn))return new pn(i);typeof i=="string"&&(Sy(Object.prototype.hasOwnProperty.call(mo,i),"Unknown curve "+i),i=mo[i]),i instanceof mo.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var nb=pn;pn.prototype.keyPair=function(e){return new Ll(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Ll.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Ll.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Iy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||tb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new ue.default(2));;){var a=new ue.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new ue.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new Iy({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new ue.default(1)),c=0;;c++){var x=r.k?r.k(c):new ue.default(d.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var E=this.g.mul(x);if(!E.isInfinity()){var A=E.getX(),v=A.umod(this.n);if(v.cmpn(0)!==0){var C=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var D=(E.getY().isOdd()?1:0)|(A.cmp(v)!==0?2:0);return r.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),D^=1),new go({r:v,s:C,recoveryParam:D})}}}}}};pn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new ue.default(e,16)),n=this.keyFromPublic(n,r),t=new go(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};pn.prototype.recoverPubKey=function(i,e,t,n){Sy((3&t)===t,"The recovery param is more than two bits"),e=new go(e,n);var r=this.n,a=new ue.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),x=r.sub(a).mul(c).umod(r),E=o.mul(c).umod(r);return this.g.mulAdd(x,s,E)};pn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new go(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var ib=sa(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=fo,t.curves=mo,t.ec=nb,t.eddsa=null}),Ry=ib.ec;var Py="signing-key/5.7.0";var jl=new k(Py),Ul=null;function Jn(){return Ul||(Ul=new Ry("secp256k1")),Ul}var fn=class{constructor(e){R(this,"curve","secp256k1"),R(this,"privateKey",V(e)),Pt(this.privateKey)!==32&&jl.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Jn().keyFromPrivate(B(this.privateKey));R(this,"publicKey","0x"+t.getPublic(!1,"hex")),R(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),R(this,"_isSigningKey",!0)}_addPoint(e){let t=Jn().keyFromPublic(B(this.publicKey)),n=Jn().keyFromPublic(B(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(B(this.privateKey)),n=B(e);n.length!==32&&jl.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return Ln({recoveryParam:r.recoveryParam,r:ce("0x"+r.r.toString(16),32),s:ce("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=Jn().keyFromPrivate(B(this.privateKey)),n=Jn().keyFromPublic(B(Ja(e)));return ce("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function To(i,e){let t=Ln(e),n={r:B(t.r),s:B(t.s)};return"0x"+Jn().recoverPubKey(B(i),n,t.recoveryParam).encode("hex",!1)}function Ja(i,e){let t=B(i);if(t.length===32){let n=new fn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?V(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):V(t)}return jl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Ny="transactions/5.7.0";var Ut=new k(Ny),vo;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(vo||(vo={}));function Hl(i){return i==="0x"?null:pe(i)}function Lt(i){return i==="0x"?zr:P.from(i)}var rb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],ab={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(i){let e=Ja(i);return pe(Me(de(Me(e,1)),12))}function pr(i,e){return mn(To(B(i),e))}function an(i,e){let t=Zt(P.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function Vl(i,e){return{address:pe(i),storageKeys:(e||[]).map((t,n)=>(Pt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Vl(t[0],t[1])):Vl(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return Vl(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Dy(i){return sn(i).map(e=>[e.address,e.storageKeys])}function Oy(i,e){if(i.gasPrice!=null){let n=P.from(i.gasPrice),r=P.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?pe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Dy(i.accessList||[])];if(e){let n=Ln(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",ri(t)])}function By(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?pe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Dy(i.accessList||[])];if(e){let n=Ln(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",ri(t)])}function sb(i,e){Vr(i,ab);let t=[];rb.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=B(V(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(V(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ti(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(V(n)),t.push("0x"),t.push("0x")),!e)return ri(t);let r=Ln(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(V(a)),t.push(Zt(B(r.r))),t.push(Zt(B(r.s))),ri(t)}function $a(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),sb(i,e);switch(i.type){case 1:return By(i,e);case 2:return Oy(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,k.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function Fy(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=ce(e[1],32),i.s=ce(e[2],32);try{let n=de(t(i));i.from=pr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function ob(i){let e=Va(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",V(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Hl(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=de(i),Fy(r,e.slice(9),Oy)),r}function ub(i){let e=Va(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",V(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Hl(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=de(i),Fy(t,e.slice(8),By)),t}function lb(i){let e=Va(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Hl(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=P.from(e[6]).toNumber()}catch{return t}if(t.r=ce(e[7],32),t.s=ce(e[8],32),P.from(t.r).isZero()&&P.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(V(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=de(ri(r));try{t.from=pr(a,{r:V(t.r),s:V(t.s),recoveryParam:n})}catch{}t.hash=de(i)}return t.type=null,t}function wo(i){let e=B(i);if(e[0]>127)return lb(e);switch(e[0]){case 1:return ub(e);case 2:return ob(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,k.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var Ly="contracts/5.7.0";var Ri=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ce=new k(Ly),db={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function _o(i,e){return Ri(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ce.throwArgumentError("invalid address or ENS name","name",t);try{return pe(t)}catch{}i||Ce.throwError("a provider or signer is needed to resolve ENS names",k.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ce.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function Qa(i,e,t){return Ri(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>Qa(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield _o(i,e):t.type==="tuple"?yield Qa(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Qa(i,n,t.arrayChildren))):Promise.reject(Ce.makeError("invalid value for array",k.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Mo(i,e,t){return Ri(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=Te(t.pop())),Ce.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ee({override:_o(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Ri(this,void 0,void 0,function*(){return pe(p.signer)!==p.override&&Ce.throwError("Contract with a Signer cannot override from",k.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=_o(i.provider,n.from));let r=yield Ee({args:Qa(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ee(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=P.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=P.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=P.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=P.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=P.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=B(a);for(let x=0;xn[p]!=null);return d.length&&Ce.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,k.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function pb(i,e){return function(...t){return Mo(i,e,t)}}function yb(i,e){let t=i.signer||i.provider;return function(...n){return Ri(this,void 0,void 0,function*(){t||Ce.throwError("estimate require a provider or signer",k.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Mo(i,e,n);return yield t.estimateGas(r)})}}function jy(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ct(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function Vy(i,e,t){let n=i.signer||i.provider;return function(...r){return Ri(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=Te(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Mo(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===k.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function cb(i,e){return function(...t){return Ri(this,void 0,void 0,function*(){i.signer||Ce.throwError("sending a transaction requires a signer",k.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Mo(i,e,t),r=yield i.signer.sendTransaction(n);return jy(i,r),r})}}function Uy(i,e,t){return e.constant?Vy(i,e,t):cb(i,e)}function Hy(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var yr=class{constructor(e,t){R(this,"tag",e),R(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ql=class extends yr{constructor(){super("error",null)}},Ao=class extends yr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ce.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(Hy(a),a),R(this,"address",e),R(this,"interface",t),R(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=qr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},ko=class extends yr{constructor(e,t){super("*",{address:e}),R(this,"address",e),R(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},oa=class{constructor(e,t,n){R(this,"interface",ft(new.target,"getInterface")(t)),n==null?(R(this,"provider",null),R(this,"signer",null)):Bt.isSigner(n)?(R(this,"provider",n.provider||null),R(this,"signer",n)):$t.isProvider(n)?(R(this,"provider",n),R(this,"signer",null)):Ce.throwArgumentError("invalid signer or provider","signerOrProvider",n),R(this,"callStatic",{}),R(this,"estimateGas",{}),R(this,"functions",{}),R(this,"populateTransaction",{}),R(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];R(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?R(this.filters,o,this.filters[d[0]]):Ce.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(R(this,"_runningEvents",{}),R(this,"_wrappedEmits",{}),e==null&&Ce.throwArgumentError("invalid contract address or ENS name","addressOrName",e),R(this,"address",e),this.provider)R(this,"resolvedAddress",_o(this.provider,e));else try{R(this,"resolvedAddress",Promise.resolve(pe(e)))}catch{Ce.throwError("provider is required to use ENS name as contract address",k.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ce.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&R(this,s,Uy(this,o,!0)),this.functions[s]==null&&R(this.functions,s,Uy(this,o,!1)),this.callStatic[s]==null&&R(this.callStatic,s,Vy(this,o,!0)),this.populateTransaction[s]==null&&R(this.populateTransaction,s,pb(this,o)),this.estimateGas[s]==null&&R(this.estimateGas,s,yb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&R(this,s,this[d])}catch{}this.functions[s]==null&&R(this.functions,s,this.functions[d]),this.callStatic[s]==null&&R(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&R(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&R(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return or(e)}static getInterface(e){return Ei.isInterface(e)?e:new Ei(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ce.throwError("contract not deployed",k.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ce.throwError("sending a transactions require a signer",k.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=Te(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ce.throwError("cannot override "+n,k.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new si(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&R(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ai.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ql);if(e==="event")return this._normalizeRunningEvent(new yr("event",null));if(e==="*")return this._normalizeRunningEvent(new ko(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Ao(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Ao(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new yr(Hy(t),t))}return this._normalizeRunningEvent(new ko(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ct(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ce.throwError("events require a provider or a signer with a provider",k.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=Te(r.filter);return typeof t=="string"&&Z(t,32)?(n!=null&&Ce.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},re=class extends oa{},cr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:on(t)?r=V(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!Z(r)||r.length%2)&&Ce.throwArgumentError("invalid bytecode","bytecode",t),n&&!Bt.isSigner(n)&&Ce.throwArgumentError("invalid signer","signer",n),R(this,"bytecode",r),R(this,"interface",ft(new.target,"getInterface")(e)),R(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=Te(e.pop());for(let n in t)if(!db[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ce.throwError("cannot override "+n,k.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!P.from(t.value).isZero()&&!this.interface.deploy.payable&&Ce.throwError("non-payable constructor cannot override value",k.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ce.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=V(le([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ri(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ce.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield Qa(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=ft(this.constructor,"getContractAddress")(a),o=ft(this.constructor,"getContract")(s,this.interface,this.signer);return jy(o,a),R(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ce.throwError("missing compiler output",k.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return re.getInterface(e)}static getContractAddress(e){return or(e)}static getContract(e,t,n){return new re(e,t,n)}};var Eo=class{constructor(e){R(this,"alphabet",e),R(this,"base",e.length),R(this,"_alphabetMap",{}),R(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=x>>16&255,d[e.length+2]=x>>8&255,d[e.length+3]=x&255;let E=B(pi(r,i,d));a||(a=E.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(E);for(let C=1;C{var hh=Object.create;var Ls=Object.defineProperty;var xh=Object.getOwnPropertyDescriptor;var bh=Object.getOwnPropertyNames;var gh=Object.getPrototypeOf,Th=Object.prototype.hasOwnProperty;var vh=(a,e,t)=>e in a?Ls(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var X=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Li=(a,e)=>{for(var t in e)Ls(a,t,{get:e[t],enumerable:!0})},wh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bh(e))!Th.call(a,i)&&i!==t&&Ls(a,i,{get:()=>e[i],enumerable:!(n=xh(e,i))||n.enumerable});return a};var _n=(a,e,t)=>(t=a!=null?hh(gh(a)):{},wh(e||!a||!a.__esModule?Ls(t,"default",{value:a,enumerable:!0}):t,a));var me=(a,e,t)=>(vh(a,typeof e!="symbol"?e+"":e,t),t);var Ap=X(()=>{});var Qu=X((Mp,$u)=>{(function(a,e){"use strict";function t(M,u){if(!M)throw new Error(u||"Assertion failed")}function n(M,u){M.super_=u;var y=function(){};y.prototype=u.prototype,M.prototype=new y,M.prototype.constructor=M}function i(M,u,y){if(i.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(M||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Ap().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var T=0;u[0]==="-"&&(T++,this.negative=1),T=0;T-=3)h=u[T]|u[T-1]<<8|u[T-2]<<16,this.words[_]|=h<>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);else if(x==="le")for(T=0,_=0;T>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);return this._strip()};function s(M,u){var y=M.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+M)}function o(M,u,y){var x=s(M,y);return y-1>=u&&(x|=s(M,y-1)<<4),x}i.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var T=0;T=y;T-=2)w=o(u,y,T)<<_,this.words[h]|=w&67108863,_>=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8;else{var g=u.length-y;for(T=g%2===0?y+1:y;T=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8}this._strip()};function l(M,u,y,x){for(var T=0,_=0,h=Math.min(M.length,y),w=u;w=49?_=g-49+10:g>=17?_=g-17+10:_=g,t(g>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var T=0,_=0,h=0;h>>24-T&16777215,T+=2,T>=26&&(T-=26,h--),_!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(_!==0&&(x=_.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var d=E[u],m=k[u];x="";var L=this.clone();for(L.negative=0;!L.isZero();){var c=L.modrn(m).toString(u);L=L.idivn(m),L.isZero()?x=c+x:x=b[d-c.length]+c+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,x){this._strip();var T=this.byteLength(),_=x||Math.max(1,T);t(T<=_,"byte array longer than desired length"),t(_>0,"Requested array length <= 0");var h=v(u,_),w=y==="le"?"LE":"BE";return this["_toArrayLike"+w](h,T),h},i.prototype._toArrayLikeLE=function(u,y){for(var x=0,T=0,_=0,h=0;_>8&255),x>16&255),h===6?(x>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(x=0&&(u[x--]=w>>8&255),x>=0&&(u[x--]=w>>16&255),h===6?(x>=0&&(u[x--]=w>>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(x>=0)for(u[x--]=T;x>=0;)u[x--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function I(M){for(var u=new Array(M.bitLength()),y=0;y>>T&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var T=0;Tu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var T=0;T0&&(this.words[T]=~this.words[T]&67108863>>26-x),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,T=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,T=u):(x=u,T=this);for(var _=0,h=0;h>>26;for(;_!==0&&h>>26;if(this.length=x.length,_!==0)this.words[this.length]=_,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var T,_;x>0?(T=this,_=u):(T=u,_=this);for(var h=0,w=0;w<_.length;w++)y=(T.words[w]|0)-(_.words[w]|0)+h,h=y>>26,this.words[w]=y&67108863;for(;h!==0&&w>26,this.words[w]=y&67108863;if(h===0&&w>>26,L=g&67108863,c=Math.min(d,u.length-1),C=Math.max(0,d-M.length+1);C<=c;C++){var S=d-C|0;T=M.words[S]|0,_=u.words[C]|0,h=T*_+L,m+=h/67108864|0,L=h&67108863}y.words[d]=L|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var N=function(u,y,x){var T=u.words,_=y.words,h=x.words,w=0,g,d,m,L=T[0]|0,c=L&8191,C=L>>>13,S=T[1]|0,O=S&8191,H=S>>>13,Q=T[2]|0,K=Q&8191,z=Q>>>13,yt=T[3]|0,$=yt&8191,oe=yt>>>13,ja=T[4]|0,Pe=ja&8191,Ne=ja>>>13,Ha=T[5]|0,De=Ha&8191,Oe=Ha>>>13,qa=T[6]|0,Be=qa&8191,Fe=qa>>>13,Ga=T[7]|0,Le=Ga&8191,Ue=Ga>>>13,za=T[8]|0,Ve=za&8191,je=za>>>13,Wa=T[9]|0,He=Wa&8191,qe=Wa>>>13,Ka=_[0]|0,Ge=Ka&8191,ze=Ka>>>13,Ja=_[1]|0,We=Ja&8191,Ke=Ja>>>13,$a=_[2]|0,Je=$a&8191,$e=$a>>>13,Qa=_[3]|0,Qe=Qa&8191,Xe=Qa>>>13,Xa=_[4]|0,Ye=Xa&8191,Ze=Xa>>>13,Ya=_[5]|0,et=Ya&8191,tt=Ya>>>13,Za=_[6]|0,nt=Za&8191,at=Za>>>13,ei=_[7]|0,it=ei&8191,rt=ei>>>13,ti=_[8]|0,st=ti&8191,ot=ti>>>13,ni=_[9]|0,ut=ni&8191,dt=ni>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(c,Ge),d=Math.imul(c,ze),d=d+Math.imul(C,Ge)|0,m=Math.imul(C,ze);var ga=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(ga>>>26)|0,ga&=67108863,g=Math.imul(O,Ge),d=Math.imul(O,ze),d=d+Math.imul(H,Ge)|0,m=Math.imul(H,ze),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Ke)|0,d=d+Math.imul(C,We)|0,m=m+Math.imul(C,Ke)|0;var Ta=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(K,Ge),d=Math.imul(K,ze),d=d+Math.imul(z,Ge)|0,m=Math.imul(z,ze),g=g+Math.imul(O,We)|0,d=d+Math.imul(O,Ke)|0,d=d+Math.imul(H,We)|0,m=m+Math.imul(H,Ke)|0,g=g+Math.imul(c,Je)|0,d=d+Math.imul(c,$e)|0,d=d+Math.imul(C,Je)|0,m=m+Math.imul(C,$e)|0;var va=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul($,Ge),d=Math.imul($,ze),d=d+Math.imul(oe,Ge)|0,m=Math.imul(oe,ze),g=g+Math.imul(K,We)|0,d=d+Math.imul(K,Ke)|0,d=d+Math.imul(z,We)|0,m=m+Math.imul(z,Ke)|0,g=g+Math.imul(O,Je)|0,d=d+Math.imul(O,$e)|0,d=d+Math.imul(H,Je)|0,m=m+Math.imul(H,$e)|0,g=g+Math.imul(c,Qe)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(C,Qe)|0,m=m+Math.imul(C,Xe)|0;var wa=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(Pe,Ge),d=Math.imul(Pe,ze),d=d+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul($,We)|0,d=d+Math.imul($,Ke)|0,d=d+Math.imul(oe,We)|0,m=m+Math.imul(oe,Ke)|0,g=g+Math.imul(K,Je)|0,d=d+Math.imul(K,$e)|0,d=d+Math.imul(z,Je)|0,m=m+Math.imul(z,$e)|0,g=g+Math.imul(O,Qe)|0,d=d+Math.imul(O,Xe)|0,d=d+Math.imul(H,Qe)|0,m=m+Math.imul(H,Xe)|0,g=g+Math.imul(c,Ye)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(C,Ye)|0,m=m+Math.imul(C,Ze)|0;var _a=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(De,Ge),d=Math.imul(De,ze),d=d+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,We)|0,d=d+Math.imul(Pe,Ke)|0,d=d+Math.imul(Ne,We)|0,m=m+Math.imul(Ne,Ke)|0,g=g+Math.imul($,Je)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(oe,Je)|0,m=m+Math.imul(oe,$e)|0,g=g+Math.imul(K,Qe)|0,d=d+Math.imul(K,Xe)|0,d=d+Math.imul(z,Qe)|0,m=m+Math.imul(z,Xe)|0,g=g+Math.imul(O,Ye)|0,d=d+Math.imul(O,Ze)|0,d=d+Math.imul(H,Ye)|0,m=m+Math.imul(H,Ze)|0,g=g+Math.imul(c,et)|0,d=d+Math.imul(c,tt)|0,d=d+Math.imul(C,et)|0,m=m+Math.imul(C,tt)|0;var Ou=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ou>>>26)|0,Ou&=67108863,g=Math.imul(Be,Ge),d=Math.imul(Be,ze),d=d+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,We)|0,d=d+Math.imul(De,Ke)|0,d=d+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Ke)|0,g=g+Math.imul(Pe,Je)|0,d=d+Math.imul(Pe,$e)|0,d=d+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul($,Qe)|0,d=d+Math.imul($,Xe)|0,d=d+Math.imul(oe,Qe)|0,m=m+Math.imul(oe,Xe)|0,g=g+Math.imul(K,Ye)|0,d=d+Math.imul(K,Ze)|0,d=d+Math.imul(z,Ye)|0,m=m+Math.imul(z,Ze)|0,g=g+Math.imul(O,et)|0,d=d+Math.imul(O,tt)|0,d=d+Math.imul(H,et)|0,m=m+Math.imul(H,tt)|0,g=g+Math.imul(c,nt)|0,d=d+Math.imul(c,at)|0,d=d+Math.imul(C,nt)|0,m=m+Math.imul(C,at)|0;var Bu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Bu>>>26)|0,Bu&=67108863,g=Math.imul(Le,Ge),d=Math.imul(Le,ze),d=d+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,We)|0,d=d+Math.imul(Be,Ke)|0,d=d+Math.imul(Fe,We)|0,m=m+Math.imul(Fe,Ke)|0,g=g+Math.imul(De,Je)|0,d=d+Math.imul(De,$e)|0,d=d+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,d=d+Math.imul(Pe,Xe)|0,d=d+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul($,Ye)|0,d=d+Math.imul($,Ze)|0,d=d+Math.imul(oe,Ye)|0,m=m+Math.imul(oe,Ze)|0,g=g+Math.imul(K,et)|0,d=d+Math.imul(K,tt)|0,d=d+Math.imul(z,et)|0,m=m+Math.imul(z,tt)|0,g=g+Math.imul(O,nt)|0,d=d+Math.imul(O,at)|0,d=d+Math.imul(H,nt)|0,m=m+Math.imul(H,at)|0,g=g+Math.imul(c,it)|0,d=d+Math.imul(c,rt)|0,d=d+Math.imul(C,it)|0,m=m+Math.imul(C,rt)|0;var Fu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Fu>>>26)|0,Fu&=67108863,g=Math.imul(Ve,Ge),d=Math.imul(Ve,ze),d=d+Math.imul(je,Ge)|0,m=Math.imul(je,ze),g=g+Math.imul(Le,We)|0,d=d+Math.imul(Le,Ke)|0,d=d+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Ke)|0,g=g+Math.imul(Be,Je)|0,d=d+Math.imul(Be,$e)|0,d=d+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,d=d+Math.imul(De,Xe)|0,d=d+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,d=d+Math.imul(Pe,Ze)|0,d=d+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul($,et)|0,d=d+Math.imul($,tt)|0,d=d+Math.imul(oe,et)|0,m=m+Math.imul(oe,tt)|0,g=g+Math.imul(K,nt)|0,d=d+Math.imul(K,at)|0,d=d+Math.imul(z,nt)|0,m=m+Math.imul(z,at)|0,g=g+Math.imul(O,it)|0,d=d+Math.imul(O,rt)|0,d=d+Math.imul(H,it)|0,m=m+Math.imul(H,rt)|0,g=g+Math.imul(c,st)|0,d=d+Math.imul(c,ot)|0,d=d+Math.imul(C,st)|0,m=m+Math.imul(C,ot)|0;var Lu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,g=Math.imul(He,Ge),d=Math.imul(He,ze),d=d+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(Ve,We)|0,d=d+Math.imul(Ve,Ke)|0,d=d+Math.imul(je,We)|0,m=m+Math.imul(je,Ke)|0,g=g+Math.imul(Le,Je)|0,d=d+Math.imul(Le,$e)|0,d=d+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,d=d+Math.imul(Be,Xe)|0,d=d+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,d=d+Math.imul(De,Ze)|0,d=d+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,d=d+Math.imul(Pe,tt)|0,d=d+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul($,nt)|0,d=d+Math.imul($,at)|0,d=d+Math.imul(oe,nt)|0,m=m+Math.imul(oe,at)|0,g=g+Math.imul(K,it)|0,d=d+Math.imul(K,rt)|0,d=d+Math.imul(z,it)|0,m=m+Math.imul(z,rt)|0,g=g+Math.imul(O,st)|0,d=d+Math.imul(O,ot)|0,d=d+Math.imul(H,st)|0,m=m+Math.imul(H,ot)|0,g=g+Math.imul(c,ut)|0,d=d+Math.imul(c,dt)|0,d=d+Math.imul(C,ut)|0,m=m+Math.imul(C,dt)|0;var Uu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,g=Math.imul(He,We),d=Math.imul(He,Ke),d=d+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(Ve,Je)|0,d=d+Math.imul(Ve,$e)|0,d=d+Math.imul(je,Je)|0,m=m+Math.imul(je,$e)|0,g=g+Math.imul(Le,Qe)|0,d=d+Math.imul(Le,Xe)|0,d=d+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,d=d+Math.imul(Be,Ze)|0,d=d+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,d=d+Math.imul(De,tt)|0,d=d+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,d=d+Math.imul(Pe,at)|0,d=d+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul($,it)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(oe,it)|0,m=m+Math.imul(oe,rt)|0,g=g+Math.imul(K,st)|0,d=d+Math.imul(K,ot)|0,d=d+Math.imul(z,st)|0,m=m+Math.imul(z,ot)|0,g=g+Math.imul(O,ut)|0,d=d+Math.imul(O,dt)|0,d=d+Math.imul(H,ut)|0,m=m+Math.imul(H,dt)|0;var Vu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(He,Je),d=Math.imul(He,$e),d=d+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(Ve,Qe)|0,d=d+Math.imul(Ve,Xe)|0,d=d+Math.imul(je,Qe)|0,m=m+Math.imul(je,Xe)|0,g=g+Math.imul(Le,Ye)|0,d=d+Math.imul(Le,Ze)|0,d=d+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,d=d+Math.imul(Be,tt)|0,d=d+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,d=d+Math.imul(De,at)|0,d=d+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,it)|0,d=d+Math.imul(Pe,rt)|0,d=d+Math.imul(Ne,it)|0,m=m+Math.imul(Ne,rt)|0,g=g+Math.imul($,st)|0,d=d+Math.imul($,ot)|0,d=d+Math.imul(oe,st)|0,m=m+Math.imul(oe,ot)|0,g=g+Math.imul(K,ut)|0,d=d+Math.imul(K,dt)|0,d=d+Math.imul(z,ut)|0,m=m+Math.imul(z,dt)|0;var ju=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(ju>>>26)|0,ju&=67108863,g=Math.imul(He,Qe),d=Math.imul(He,Xe),d=d+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(Ve,Ye)|0,d=d+Math.imul(Ve,Ze)|0,d=d+Math.imul(je,Ye)|0,m=m+Math.imul(je,Ze)|0,g=g+Math.imul(Le,et)|0,d=d+Math.imul(Le,tt)|0,d=d+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,it)|0,d=d+Math.imul(De,rt)|0,d=d+Math.imul(Oe,it)|0,m=m+Math.imul(Oe,rt)|0,g=g+Math.imul(Pe,st)|0,d=d+Math.imul(Pe,ot)|0,d=d+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul($,ut)|0,d=d+Math.imul($,dt)|0,d=d+Math.imul(oe,ut)|0,m=m+Math.imul(oe,dt)|0;var Hu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(He,Ye),d=Math.imul(He,Ze),d=d+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(Ve,et)|0,d=d+Math.imul(Ve,tt)|0,d=d+Math.imul(je,et)|0,m=m+Math.imul(je,tt)|0,g=g+Math.imul(Le,nt)|0,d=d+Math.imul(Le,at)|0,d=d+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,it)|0,d=d+Math.imul(Be,rt)|0,d=d+Math.imul(Fe,it)|0,m=m+Math.imul(Fe,rt)|0,g=g+Math.imul(De,st)|0,d=d+Math.imul(De,ot)|0,d=d+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,d=d+Math.imul(Pe,dt)|0,d=d+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,dt)|0;var qu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(qu>>>26)|0,qu&=67108863,g=Math.imul(He,et),d=Math.imul(He,tt),d=d+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(Ve,nt)|0,d=d+Math.imul(Ve,at)|0,d=d+Math.imul(je,nt)|0,m=m+Math.imul(je,at)|0,g=g+Math.imul(Le,it)|0,d=d+Math.imul(Le,rt)|0,d=d+Math.imul(Ue,it)|0,m=m+Math.imul(Ue,rt)|0,g=g+Math.imul(Be,st)|0,d=d+Math.imul(Be,ot)|0,d=d+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,d=d+Math.imul(De,dt)|0,d=d+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,dt)|0;var Gu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(He,nt),d=Math.imul(He,at),d=d+Math.imul(qe,nt)|0,m=Math.imul(qe,at),g=g+Math.imul(Ve,it)|0,d=d+Math.imul(Ve,rt)|0,d=d+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Le,st)|0,d=d+Math.imul(Le,ot)|0,d=d+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,d=d+Math.imul(Be,dt)|0,d=d+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,dt)|0;var zu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(He,it),d=Math.imul(He,rt),d=d+Math.imul(qe,it)|0,m=Math.imul(qe,rt),g=g+Math.imul(Ve,st)|0,d=d+Math.imul(Ve,ot)|0,d=d+Math.imul(je,st)|0,m=m+Math.imul(je,ot)|0,g=g+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,dt)|0;var Wu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(He,st),d=Math.imul(He,ot),d=d+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(Ve,ut)|0,d=d+Math.imul(Ve,dt)|0,d=d+Math.imul(je,ut)|0,m=m+Math.imul(je,dt)|0;var Ku=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(He,ut),d=Math.imul(He,dt),d=d+Math.imul(qe,ut)|0,m=Math.imul(qe,dt);var Ju=(w+g|0)+((d&8191)<<13)|0;return w=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,h[0]=ga,h[1]=Ta,h[2]=va,h[3]=wa,h[4]=_a,h[5]=Ou,h[6]=Bu,h[7]=Fu,h[8]=Lu,h[9]=Uu,h[10]=Vu,h[11]=ju,h[12]=Hu,h[13]=qu,h[14]=Gu,h[15]=zu,h[16]=Wu,h[17]=Ku,h[18]=Ju,w!==0&&(h[19]=w,x.length++),x};Math.imul||(N=D);function F(M,u,y){y.negative=u.negative^M.negative,y.length=M.length+u.length;for(var x=0,T=0,_=0;_>>26)|0,T+=h>>>26,h&=67108863}y.words[_]=w,x=h,h=T}return x!==0?y.words[_]=x:y.length--,y._strip()}function U(M,u,y){return F(M,u,y)}i.prototype.mulTo=function(u,y){var x,T=this.length+u.length;return this.length===10&&u.length===10?x=N(this,u,y):T<63?x=D(this,u,y):T<1024?x=F(this,u,y):x=U(this,u,y),x};function G(M,u){this.x=M,this.y=u}G.prototype.makeRBT=function(u){for(var y=new Array(u),x=i.prototype._countBits(u)-1,T=0;T>=1;return T},G.prototype.permute=function(u,y,x,T,_,h){for(var w=0;w>>1)_++;return 1<<_+1+T},G.prototype.conjugate=function(u,y,x){if(!(x<=1))for(var T=0;T>>13,x[2*h+1]=_&8191,_=_>>>13;for(h=2*y;h>=26,x+=_/67108864|0,x+=h>>>26,this.words[T]=h&67108863}return x!==0&&(this.words[T]=x,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=I(u);if(y.length===0)return new i(1);for(var x=this,T=0;T=0);var y=u%26,x=(u-y)/26,T=67108863>>>26-y<<26-y,_;if(y!==0){var h=0;for(_=0;_>>26-y}h&&(this.words[_]=h,this.length++)}if(x!==0){for(_=this.length-1;_>=0;_--)this.words[_+x]=this.words[_];for(_=0;_=0);var T;y?T=(y-y%26)/26:T=0;var _=u%26,h=Math.min((u-_)/26,this.length),w=67108863^67108863>>>_<<_,g=x;if(T-=h,T=Math.max(0,T),g){for(var d=0;dh)for(this.length-=h,d=0;d=0&&(m!==0||d>=T);d--){var L=this.words[d]|0;this.words[d]=m<<26-_|L>>>_,m=L&w}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,T=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var T=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[_+x]=h&67108863}for(;_>26,this.words[_+x]=h&67108863;if(w===0)return this._strip();for(t(w===-1),w=0,_=0;_>26,this.words[_]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var x=this.length-u.length,T=this.clone(),_=u,h=_.words[_.length-1]|0,w=this._countBits(h);x=26-w,x!==0&&(_=_.ushln(x),T.iushln(x),h=_.words[_.length-1]|0);var g=T.length-_.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var C=(T.words[_.length+c]|0)*67108864+(T.words[_.length+c-1]|0);for(C=Math.min(C/h|0,67108863),T._ishlnsubmul(_,C,c);T.negative!==0;)C--,T.negative=0,T._ishlnsubmul(_,1,c),T.isZero()||(T.negative^=1);d&&(d.words[c]=C)}return d&&d._strip(),T._strip(),y!=="div"&&x!==0&&T.iushrn(x),{div:d||null,mod:T}},i.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var T,_,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(T=h.div.neg()),y!=="div"&&(_=h.mod.neg(),x&&_.negative!==0&&_.iadd(u)),{div:T,mod:_}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(T=h.div.neg()),{div:T,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(_=h.mod.neg(),x&&_.negative!==0&&_.isub(u)),{div:h.div,mod:_}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,T=u.ushrn(1),_=u.andln(1),h=x.cmp(T);return h<0||_===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,T=0,_=this.length-1;_>=0;_--)T=(x*T+(this.words[_]|0))%u;return y?-T:T},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,T=this.length-1;T>=0;T--){var _=(this.words[T]|0)+x*67108864;this.words[T]=_/u|0,x=_%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new i(1),_=new i(0),h=new i(0),w=new i(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var d=x.clone(),m=y.clone();!y.isZero();){for(var L=0,c=1;(y.words[0]&c)===0&&L<26;++L,c<<=1);if(L>0)for(y.iushrn(L);L-- >0;)(T.isOdd()||_.isOdd())&&(T.iadd(d),_.isub(m)),T.iushrn(1),_.iushrn(1);for(var C=0,S=1;(x.words[0]&S)===0&&C<26;++C,S<<=1);if(C>0)for(x.iushrn(C);C-- >0;)(h.isOdd()||w.isOdd())&&(h.iadd(d),w.isub(m)),h.iushrn(1),w.iushrn(1);y.cmp(x)>=0?(y.isub(x),T.isub(h),_.isub(w)):(x.isub(y),h.isub(T),w.isub(_))}return{a:h,b:w,gcd:x.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new i(1),_=new i(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var w=0,g=1;(y.words[0]&g)===0&&w<26;++w,g<<=1);if(w>0)for(y.iushrn(w);w-- >0;)T.isOdd()&&T.iadd(h),T.iushrn(1);for(var d=0,m=1;(x.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(x.iushrn(d);d-- >0;)_.isOdd()&&_.iadd(h),_.iushrn(1);y.cmp(x)>=0?(y.isub(x),T.isub(_)):(x.isub(y),_.isub(T))}var L;return y.cmpn(1)===0?L=T:L=_,L.cmpn(0)<0&&L.iadd(u),L},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var T=0;y.isEven()&&x.isEven();T++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var _=y.cmp(x);if(_<0){var h=y;y=x,x=h}else if(_===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(T)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,T=1<>>26,w&=67108863,this.words[h]=w}return _!==0&&(this.words[h]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var T=this.words[0]|0;x=T===u?0:Tu.length)return 1;if(this.length=0;x--){var T=this.words[x]|0,_=u.words[x]|0;if(T!==_){T<_?y=-1:T>_&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new re(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function W(M,u){this.name=M,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}W.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},W.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var T=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},W.prototype.split=function(u,y){u.iushrn(this.n,0,y)},W.prototype.imulK=function(u){return u.imul(this.k)};function ye(){W.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ye,W),ye.prototype.split=function(u,y){for(var x=4194303,T=Math.min(u.length,9),_=0;_>>22,h=w}h>>>=22,u.words[_-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},ye.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=_,y=T}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(q[u])return q[u];var y;if(u==="k256")y=new ye;else if(u==="p224")y=new te;else if(u==="p192")y=new ae;else if(u==="p25519")y=new Re;else throw new Error("Unknown prime "+u);return q[u]=y,y};function re(M){if(typeof M=="string"){var u=i._prime(M);this.m=u.p,this.prime=u}else t(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}re.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},re.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},re.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},re.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},re.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},re.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},re.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},re.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},re.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},re.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},re.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},re.prototype.isqr=function(u){return this.imul(u,u.clone())},re.prototype.sqr=function(u){return this.mul(u,u)},re.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(u,x)}for(var T=this.m.subn(1),_=0;!T.isZero()&&T.andln(1)===0;)_++,T.iushrn(1);t(!T.isZero());var h=new i(1).toRed(this),w=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(w)!==0;)d.redIAdd(w);for(var m=this.pow(d,T),L=this.pow(u,T.addn(1).iushrn(1)),c=this.pow(u,T),C=_;c.cmp(h)!==0;){for(var S=c,O=0;S.cmp(h)!==0;O++)S=S.redSqr();t(O=0;_--){for(var m=y.words[_],L=d-1;L>=0;L--){var c=m>>L&1;if(h!==T[0]&&(h=this.sqr(h)),c===0&&w===0){g=0;continue}w<<=1,w|=c,g++,!(g!==x&&(_!==0||L!==0))&&(h=this.mul(h,T[w]),g=0,w=0)}d=26}return h},re.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},re.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new _e(u)};function _e(M){re.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(_e,re),_e.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},_e.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},_e.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),T=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=x.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},_e.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var x=u.mul(y),T=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=x.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},_e.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof $u>"u"||$u,Mp)});var Xp=X((bg,Gs)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Gs=="object"&&Gs.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],E=[1,256,65536,16777216],k=[6,1536,393216,100663296],v=[0,8,16,24],I=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],D=[224,256,384,512],N=[128,256],F=["hex","buffer","arrayBuffer","array","digest"],U={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var G=function(c,C,S){return function(O){return new d(c,C,c).update(O)[S]()}},q=function(c,C,S){return function(O,H){return new d(c,C,H).update(O)[S]()}},W=function(c,C,S){return function(O,H,Q,K){return u["cshake"+c].update(O,H,Q,K)[S]()}},ye=function(c,C,S){return function(O,H,Q,K){return u["kmac"+c].update(O,H,Q,K)[S]()}},te=function(c,C,S,O){for(var H=0;H>5,this.byteCount=this.blockCount<<2,this.outputBlocks=S>>5,this.extraBytes=(S&31)>>3;for(var O=0;O<50;++O)this.s[O]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var C,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);C=!0}for(var O=this.blocks,H=this.byteCount,Q=c.length,K=this.blockCount,z=0,yt=this.s,$,oe;z>2]|=c[z]<>2]|=oe<>2]|=(192|oe>>6)<>2]|=(128|oe&63)<=57344?(O[$>>2]|=(224|oe>>12)<>2]|=(128|oe>>6&63)<>2]|=(128|oe&63)<>2]|=(240|oe>>18)<>2]|=(128|oe>>12&63)<>2]|=(128|oe>>6&63)<>2]|=(128|oe&63)<=H){for(this.start=$-H,this.block=O[K],$=0;$>8,S=c&255;S>0;)H.unshift(S),c=c>>8,S=c&255,++O;return C?H.push(O):H.unshift(O),this.update(H),H.length},d.prototype.encodeString=function(c){var C,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);C=!0}var O=0,H=c.length;if(C)O=H;else for(var Q=0;Q=57344?O+=3:(K=65536+((K&1023)<<10|c.charCodeAt(++Q)&1023),O+=4)}return O+=this.encode(O*8),this.update(c),O},d.prototype.bytepad=function(c,C){for(var S=this.encode(C),O=0;O>2]|=this.padding[C&3],this.lastByteIndex===this.byteCount)for(c[0]=c[S],C=1;C>4&15]+p[z&15]+p[z>>12&15]+p[z>>8&15]+p[z>>20&15]+p[z>>16&15]+p[z>>28&15]+p[z>>24&15];Q%c===0&&(L(C),H=0)}return O&&(z=C[H],K+=p[z>>4&15]+p[z&15],O>1&&(K+=p[z>>12&15]+p[z>>8&15]),O>2&&(K+=p[z>>20&15]+p[z>>16&15])),K},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,C=this.s,S=this.outputBlocks,O=this.extraBytes,H=0,Q=0,K=this.outputBits>>3,z;O?z=new ArrayBuffer(S+1<<2):z=new ArrayBuffer(K);for(var yt=new Uint32Array(z);Q>8&255,K[z+2]=yt>>16&255,K[z+3]=yt>>24&255;Q%c===0&&L(C)}return O&&(z=Q<<2,yt=C[H],K[z]=yt&255,O>1&&(K[z+1]=yt>>8&255),O>2&&(K[z+2]=yt>>16&255)),K};function m(c,C,S){d.call(this,c,C,S)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var L=function(c){var C,S,O,H,Q,K,z,yt,$,oe,ja,Pe,Ne,Ha,De,Oe,qa,Be,Fe,Ga,Le,Ue,za,Ve,je,Wa,He,qe,Ka,Ge,ze,Ja,We,Ke,$a,Je,$e,Qa,Qe,Xe,Xa,Ye,Ze,Ya,et,tt,Za,nt,at,ei,it,rt,ti,st,ot,ni,ut,dt,ga,Ta,va,wa,_a;for(O=0;O<48;O+=2)H=c[0]^c[10]^c[20]^c[30]^c[40],Q=c[1]^c[11]^c[21]^c[31]^c[41],K=c[2]^c[12]^c[22]^c[32]^c[42],z=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],$=c[5]^c[15]^c[25]^c[35]^c[45],oe=c[6]^c[16]^c[26]^c[36]^c[46],ja=c[7]^c[17]^c[27]^c[37]^c[47],Pe=c[8]^c[18]^c[28]^c[38]^c[48],Ne=c[9]^c[19]^c[29]^c[39]^c[49],C=Pe^(K<<1|z>>>31),S=Ne^(z<<1|K>>>31),c[0]^=C,c[1]^=S,c[10]^=C,c[11]^=S,c[20]^=C,c[21]^=S,c[30]^=C,c[31]^=S,c[40]^=C,c[41]^=S,C=H^(yt<<1|$>>>31),S=Q^($<<1|yt>>>31),c[2]^=C,c[3]^=S,c[12]^=C,c[13]^=S,c[22]^=C,c[23]^=S,c[32]^=C,c[33]^=S,c[42]^=C,c[43]^=S,C=K^(oe<<1|ja>>>31),S=z^(ja<<1|oe>>>31),c[4]^=C,c[5]^=S,c[14]^=C,c[15]^=S,c[24]^=C,c[25]^=S,c[34]^=C,c[35]^=S,c[44]^=C,c[45]^=S,C=yt^(Pe<<1|Ne>>>31),S=$^(Ne<<1|Pe>>>31),c[6]^=C,c[7]^=S,c[16]^=C,c[17]^=S,c[26]^=C,c[27]^=S,c[36]^=C,c[37]^=S,c[46]^=C,c[47]^=S,C=oe^(H<<1|Q>>>31),S=ja^(Q<<1|H>>>31),c[8]^=C,c[9]^=S,c[18]^=C,c[19]^=S,c[28]^=C,c[29]^=S,c[38]^=C,c[39]^=S,c[48]^=C,c[49]^=S,Ha=c[0],De=c[1],tt=c[11]<<4|c[10]>>>28,Za=c[10]<<4|c[11]>>>28,qe=c[20]<<3|c[21]>>>29,Ka=c[21]<<3|c[20]>>>29,Ta=c[31]<<9|c[30]>>>23,va=c[30]<<9|c[31]>>>23,Ye=c[40]<<18|c[41]>>>14,Ze=c[41]<<18|c[40]>>>14,Ke=c[2]<<1|c[3]>>>31,$a=c[3]<<1|c[2]>>>31,Oe=c[13]<<12|c[12]>>>20,qa=c[12]<<12|c[13]>>>20,nt=c[22]<<10|c[23]>>>22,at=c[23]<<10|c[22]>>>22,Ge=c[33]<<13|c[32]>>>19,ze=c[32]<<13|c[33]>>>19,wa=c[42]<<2|c[43]>>>30,_a=c[43]<<2|c[42]>>>30,st=c[5]<<30|c[4]>>>2,ot=c[4]<<30|c[5]>>>2,Je=c[14]<<6|c[15]>>>26,$e=c[15]<<6|c[14]>>>26,Be=c[25]<<11|c[24]>>>21,Fe=c[24]<<11|c[25]>>>21,ei=c[34]<<15|c[35]>>>17,it=c[35]<<15|c[34]>>>17,Ja=c[45]<<29|c[44]>>>3,We=c[44]<<29|c[45]>>>3,Ve=c[6]<<28|c[7]>>>4,je=c[7]<<28|c[6]>>>4,ni=c[17]<<23|c[16]>>>9,ut=c[16]<<23|c[17]>>>9,Qa=c[26]<<25|c[27]>>>7,Qe=c[27]<<25|c[26]>>>7,Ga=c[36]<<21|c[37]>>>11,Le=c[37]<<21|c[36]>>>11,rt=c[47]<<24|c[46]>>>8,ti=c[46]<<24|c[47]>>>8,Ya=c[8]<<27|c[9]>>>5,et=c[9]<<27|c[8]>>>5,Wa=c[18]<<20|c[19]>>>12,He=c[19]<<20|c[18]>>>12,dt=c[29]<<7|c[28]>>>25,ga=c[28]<<7|c[29]>>>25,Xe=c[38]<<8|c[39]>>>24,Xa=c[39]<<8|c[38]>>>24,Ue=c[48]<<14|c[49]>>>18,za=c[49]<<14|c[48]>>>18,c[0]=Ha^~Oe&Be,c[1]=De^~qa&Fe,c[10]=Ve^~Wa&qe,c[11]=je^~He&Ka,c[20]=Ke^~Je&Qa,c[21]=$a^~$e&Qe,c[30]=Ya^~tt&nt,c[31]=et^~Za&at,c[40]=st^~ni&dt,c[41]=ot^~ut&ga,c[2]=Oe^~Be&Ga,c[3]=qa^~Fe&Le,c[12]=Wa^~qe&Ge,c[13]=He^~Ka&ze,c[22]=Je^~Qa&Xe,c[23]=$e^~Qe&Xa,c[32]=tt^~nt&ei,c[33]=Za^~at&it,c[42]=ni^~dt&Ta,c[43]=ut^~ga&va,c[4]=Be^~Ga&Ue,c[5]=Fe^~Le&za,c[14]=qe^~Ge&Ja,c[15]=Ka^~ze&We,c[24]=Qa^~Xe&Ye,c[25]=Qe^~Xa&Ze,c[34]=nt^~ei&rt,c[35]=at^~it&ti,c[44]=dt^~Ta&wa,c[45]=ga^~va&_a,c[6]=Ga^~Ue&Ha,c[7]=Le^~za&De,c[16]=Ge^~Ja&Ve,c[17]=ze^~We&je,c[26]=Xe^~Ye&Ke,c[27]=Xa^~Ze&$a,c[36]=ei^~rt&Ya,c[37]=it^~ti&et,c[46]=Ta^~wa&st,c[47]=va^~_a&ot,c[8]=Ue^~Ha&Oe,c[9]=za^~De&qa,c[18]=Ja^~Ve&Wa,c[19]=We^~je&He,c[28]=Ye^~Ke&Je,c[29]=Ze^~$a&$e,c[38]=rt^~Ya&tt,c[39]=ti^~et&Za,c[48]=wa^~st&ni,c[49]=_a^~ot&ut,c[0]^=I[O],c[1]^=I[O+1]};if(s)Gs.exports=u;else{for(x=0;x{Wy.exports=zy;function zy(a,e){if(!a)throw new Error(e||"Assertion failed")}zy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var Ky=X((l3,_d)=>{typeof Object.create=="function"?_d.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:_d.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var An=X(Se=>{"use strict";var E6=Zi(),I6=Ky();Se.inherits=I6;function C6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function S6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):C6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Se.htonl=Jy;function P6(a,e){for(var t="",n=0;n>>0}return r}Se.join32=N6;function D6(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Se.split32=D6;function O6(a,e){return a>>>e|a<<32-e}Se.rotr32=O6;function B6(a,e){return a<>>32-e}Se.rotl32=B6;function F6(a,e){return a+e>>>0}Se.sum32=F6;function L6(a,e,t){return a+e+t>>>0}Se.sum32_3=L6;function U6(a,e,t,n){return a+e+t+n>>>0}Se.sum32_4=U6;function V6(a,e,t,n,i){return a+e+t+n+i>>>0}Se.sum32_5=V6;function j6(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Se.sum64=j6;function H6(a,e,t,n){var i=e+n>>>0,r=(i>>0}Se.sum64_hi=H6;function q6(a,e,t,n){var i=e+n;return i>>>0}Se.sum64_lo=q6;function G6(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Se.sum64_4_hi=G6;function z6(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Se.sum64_4_lo=z6;function W6(a,e,t,n,i,r,s,o,l,p){var f=0,b=e;b=b+n>>>0,f+=b>>0,f+=b>>0,f+=b>>0,f+=b>>0}Se.sum64_5_hi=W6;function K6(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Se.sum64_5_lo=K6;function J6(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Se.rotr64_hi=J6;function $6(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Se.rotr64_lo=$6;function Q6(a,e,t){return a>>>t}Se.shr64_hi=Q6;function X6(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Se.shr64_lo=X6});var er=X(Yy=>{"use strict";var Xy=An(),Y6=Zi();function yo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Yy.BlockHash=yo;yo.prototype.update=function(e,t){if(e=Xy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Xy.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var Z6=An(),jn=Z6.rotr32;function e2(a,e,t,n){if(a===0)return Zy(e,t,n);if(a===1||a===3)return t0(e,t,n);if(a===2)return e0(e,t,n)}oa.ft_1=e2;function Zy(a,e,t){return a&e^~a&t}oa.ch32=Zy;function e0(a,e,t){return a&e^a&t^e&t}oa.maj32=e0;function t0(a,e,t){return a^e^t}oa.p32=t0;function t2(a){return jn(a,2)^jn(a,13)^jn(a,22)}oa.s0_256=t2;function n2(a){return jn(a,6)^jn(a,11)^jn(a,25)}oa.s1_256=n2;function a2(a){return jn(a,7)^jn(a,18)^a>>>3}oa.g0_256=a2;function i2(a){return jn(a,17)^jn(a,19)^a>>>10}oa.g1_256=i2});var i0=X((c3,a0)=>{"use strict";var tr=An(),r2=er(),s2=kd(),Ad=tr.rotl32,Wr=tr.sum32,o2=tr.sum32_5,u2=s2.ft_1,n0=r2.BlockHash,d2=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;n0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}tr.inherits(Hn,n0);a0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var nr=An(),l2=er(),ar=kd(),p2=Zi(),Mn=nr.sum32,y2=nr.sum32_4,f2=nr.sum32_5,c2=ar.ch32,m2=ar.maj32,h2=ar.s0_256,x2=ar.s1_256,b2=ar.g0_256,g2=ar.g1_256,r0=l2.BlockHash,T2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function qn(){if(!(this instanceof qn))return new qn;r0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=T2,this.W=new Array(64)}nr.inherits(qn,r0);s0.exports=qn;qn.blockSize=512;qn.outSize=256;qn.hmacStrength=192;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Ed=An(),o0=Md();function ua(){if(!(this instanceof ua))return new ua;o0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ed.inherits(ua,o0);u0.exports=ua;ua.blockSize=512;ua.outSize=224;ua.hmacStrength=192;ua.padLength=64;ua.prototype._digest=function(e){return e==="hex"?Ed.toHex32(this.h.slice(0,7),"big"):Ed.split32(this.h.slice(0,7),"big")}});var Sd=X((x3,f0)=>{"use strict";var Qt=An(),v2=er(),w2=Zi(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,l0=Qt.shr64_hi,p0=Qt.shr64_lo,Ia=Qt.sum64,Id=Qt.sum64_hi,Cd=Qt.sum64_lo,_2=Qt.sum64_4_hi,k2=Qt.sum64_4_lo,A2=Qt.sum64_5_hi,M2=Qt.sum64_5_lo,y0=v2.BlockHash,E2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;y0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=E2,this.W=new Array(160)}Qt.inherits(En,y0);f0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Rd=An(),c0=Sd();function da(){if(!(this instanceof da))return new da;c0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Rd.inherits(da,c0);m0.exports=da;da.blockSize=1024;da.outSize=384;da.hmacStrength=192;da.padLength=128;da.prototype._digest=function(e){return e==="hex"?Rd.toHex32(this.h.slice(0,12),"big"):Rd.split32(this.h.slice(0,12),"big")}});var x0=X(ir=>{"use strict";ir.sha1=i0();ir.sha224=d0();ir.sha256=Md();ir.sha384=h0();ir.sha512=Sd()});var _0=X(w0=>{"use strict";var di=An(),V2=er(),fo=di.rotl32,b0=di.sum32,Kr=di.sum32_3,g0=di.sum32_4,v0=V2.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;v0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}di.inherits(Wn,v0);w0.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,b=s,E=o,k=0;k<80;k++){var v=b0(fo(g0(n,T0(k,i,r,s),e[q2[k]+t],j2(k)),z2[k]),o);n=o,o=s,s=fo(r,10),r=i,i=v,v=b0(fo(g0(l,T0(79-k,p,f,b),e[G2[k]+t],H2(k)),W2[k]),E),l=E,E=b,b=fo(f,10),f=p,p=v}v=Kr(this.h[1],r,b),this.h[1]=Kr(this.h[2],s,E),this.h[2]=Kr(this.h[3],o,l),this.h[3]=Kr(this.h[4],n,p),this.h[4]=Kr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?di.toHex32(this.h,"little"):di.split32(this.h,"little")};function T0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function j2(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function H2(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var q2=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],G2=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],z2=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],W2=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var A0=X((v3,k0)=>{"use strict";var K2=An(),J2=Zi();function rr(a,e,t){if(!(this instanceof rr))return new rr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(K2.toArray(e,t))}k0.exports=rr;rr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),J2(e.length<=this.blockSize);for(var t=e.length;t{var St=M0;St.utils=An();St.common=er();St.sha=x0();St.ripemd=_0();St.hmac=A0();St.sha1=St.sha.sha1;St.sha256=St.sha.sha256;St.sha224=St.sha.sha224;St.sha384=St.sha.sha384;St.sha512=St.sha.sha512;St.ripemd160=St.ripemd.ripemd160});var Xd=X((Qd,ef)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var w=0;w255)return!1;return!0}function n(h,w){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return w&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,w,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),w.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&L<224?(d.push(String.fromCharCode((L&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((L&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:w}}(),o=function(){function h(d){for(var m=[],L=0;L>4]+w[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],b=[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],E=[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],k=[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],v=[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],I=[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],D=[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],N=[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],F=[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],U=[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],G=[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],q=[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],W=[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],ye=[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 te(h){for(var w=[],g=0;g>2,this._Ke[L][w%4]=m[w],this._Kd[h-L][w%4]=m[w];for(var c=0,C=d,S;C>16&255]<<24^f[S>>8&255]<<16^f[S&255]<<8^f[S>>24&255]^p[c]<<24,c+=1,d!=8)for(var w=1;w>8&255]<<8^f[S>>16&255]<<16^f[S>>24&255]<<24;for(var w=d/2+1;w>2,H=C%4,this._Ke[O][H]=m[w],this._Kd[h-O][H]=m[w++],C++}for(var O=1;O>24&255]^q[S>>16&255]^W[S>>8&255]^ye[S&255]},ae.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var w=this._Ke.length-1,g=[0,0,0,0],d=te(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var L=1;L>24&255]^k[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^I[d[(m+3)%4]&255]^this._Ke[L][m];d=g.slice()}for(var c=i(16),C,m=0;m<4;m++)C=this._Ke[w][m],c[4*m]=(f[d[m]>>24&255]^C>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^C>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^C>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^C)&255;return c},ae.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var w=this._Kd.length-1,g=[0,0,0,0],d=te(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var L=1;L>24&255]^N[d[(m+3)%4]>>16&255]^F[d[(m+2)%4]>>8&255]^U[d[(m+1)%4]&255]^this._Kd[L][m];d=g.slice()}for(var c=i(16),C,m=0;m<4;m++)C=this._Kd[w][m],c[4*m]=(b[d[m]>>24&255]^C>>24)&255,c[4*m+1]=(b[d[(m+3)%4]>>16&255]^C>>16)&255,c[4*m+2]=(b[d[(m+2)%4]>>8&255]^C>>8)&255,c[4*m+3]=(b[d[(m+1)%4]&255]^C)&255;return c};var Re=function(h){if(!(this instanceof Re))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new ae(h)};Re.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var w=i(h.length),g=i(16),d=0;d=0;--w)this._counter[w]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,w){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",w instanceof u||(w=new u(w)),this._counter=w,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new ae(h)};y.prototype.encrypt=function(h){for(var w=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-w,d=0;d{"use strict";(function(a){function t(k){let v=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]),I=1779033703,D=3144134277,N=1013904242,F=2773480762,U=1359893119,G=2600822924,q=528734635,W=1541459225,ye=new Uint32Array(64);function te(y){let x=0,T=y.length;for(;T>=64;){let _=I,h=D,w=N,g=F,d=U,m=G,L=q,c=W,C,S,O,H,Q;for(S=0;S<16;S++)O=x+S*4,ye[S]=(y[O]&255)<<24|(y[O+1]&255)<<16|(y[O+2]&255)<<8|y[O+3]&255;for(S=16;S<64;S++)C=ye[S-2],H=(C>>>17|C<<32-17)^(C>>>19|C<<32-19)^C>>>10,C=ye[S-15],Q=(C>>>7|C<<32-7)^(C>>>18|C<<32-18)^C>>>3,ye[S]=(H+ye[S-7]|0)+(Q+ye[S-16]|0)|0;for(S=0;S<64;S++)H=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&L)|0)+(c+(v[S]+ye[S]|0)|0)|0,Q=((_>>>2|_<<32-2)^(_>>>13|_<<32-13)^(_>>>22|_<<32-22))+(_&h^_&w^h&w)|0,c=L,L=m,m=d,d=g+H|0,g=w,w=h,h=_,_=H+Q|0;I=I+_|0,D=D+h|0,N=N+w|0,F=F+g|0,U=U+d|0,G=G+m|0,q=q+L|0,W=W+c|0,x+=64,T-=64}}te(k);let ae,Re=k.length%64,re=k.length/536870912|0,_e=k.length<<3,M=Re<56?56:120,u=k.slice(k.length-Re,k.length);for(u.push(128),ae=Re+1;ae>>24&255),u.push(re>>>16&255),u.push(re>>>8&255),u.push(re>>>0&255),u.push(_e>>>24&255),u.push(_e>>>16&255),u.push(_e>>>8&255),u.push(_e>>>0&255),te(u),[I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255]}function n(k,v,I){k=k.length<=64?k:t(k);let D=64+v.length+4,N=new Array(D),F=new Array(64),U,G=[];for(U=0;U<64;U++)N[U]=54;for(U=0;U=D-4;W--){if(N[W]++,N[W]<=255)return;N[W]=0}}for(;I>=32;)q(),G=G.concat(t(F.concat(t(N)))),I-=32;return I>0&&(q(),G=G.concat(t(F.concat(t(N))).slice(0,I))),G}function i(k,v,I,D,N){let F;for(l(k,(2*I-1)*16,N,0,16),F=0;F<2*I;F++)o(k,F*16,N,16),s(N,D),l(N,0,k,v+F*16,16);for(F=0;F>>32-v}function s(k,v){l(k,0,v,0,16);for(let I=8;I>0;I-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let I=0;I<16;++I)k[I]+=v[I]}function o(k,v,I,D){for(let N=0;N=256)return!1}return!0}function f(k,v){if(typeof k!="number"||k%1)throw new Error("invalid "+v);return k}function b(k,v,I,D,N,F,U){if(I=f(I,"N"),D=f(D,"r"),N=f(N,"p"),F=f(F,"dkLen"),I===0||(I&I-1)!==0)throw new Error("N must be power of 2");if(I>2147483647/128/D)throw new Error("N too large");if(D>2147483647/128/N)throw new Error("r too large");if(!p(k))throw new Error("password must be an array or buffer");if(k=Array.prototype.slice.call(k),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let G=n(k,v,N*128*D),q=new Uint32Array(N*32*D);for(let d=0;dh&&(d=h);for(let L=0;Lh&&(d=h);for(let L=0;L>0&255),G.push(q[L]>>8&255),G.push(q[L]>>16&255),G.push(q[L]>>24&255);let m=n(k,G,F);return U&&U(null,1,m),m}U&&w(g)};if(!U)for(;;){let d=g();if(d!=null)return d}g()}let E={scrypt:function(k,v,I,D,N,F,U){return new Promise(function(G,q){let W=0;U&&U(0),b(k,v,I,D,N,F,function(ye,te,ae){if(ye)q(ye);else if(ae)U&&W!==1&&U(1),G(new Uint8Array(ae));else if(U&&te!==W)return W=te,U(te)})})},syncScrypt:function(k,v,I,D,N,F){return new Uint8Array(b(k,v,I,D,N,F))}};typeof nl<"u"?nf.exports=E:typeof define=="function"&&define.amd?define(E):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=E)})(nl)});var If=X((l4,Ef)=>{"use strict";var Fo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ol={};for(as=0;as>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Af(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=cr(e)^n>>5}for(e=cr(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=Af(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=cr(n)^s,i+=Fo.charAt(s)}for(r=0;r<6;++r)n=cr(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Fo.charAt(o)}return i}function Mf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=Af(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(b)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function P5(){var a=Mf.apply(null,arguments);if(typeof a=="object")return a}function N5(a){var e=Mf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Lo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof Ul=="object"&&typeof Vl<"u"?Vl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(Ul,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,b=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")b=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(E,k){var v=function(D){var N=typeof Request<"u"&&o instanceof Request?o.clone():o;n(N,l).then(function(F){if(Array.isArray(b)&&b.indexOf(F.status)===-1)E(F);else if(typeof b=="function")try{return Promise.resolve(b(D,null,F)).then(function(U){U?I(D,null,F):E(F)}).catch(k)}catch(U){k(U)}else D=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var jl=X(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.$dictionary=void 0;Zo.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Ms=X((_A,Wc)=>{Wc.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var ql=X(Fa=>{var Ae=Ms(),Hl=()=>[{type:Ae.RANGE,from:48,to:57}],Kc=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(Hl()),Jc=()=>[{type:Ae.CHAR,value:9},{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:11},{type:Ae.CHAR,value:12},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:32},{type:Ae.CHAR,value:160},{type:Ae.CHAR,value:5760},{type:Ae.RANGE,from:8192,to:8202},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233},{type:Ae.CHAR,value:8239},{type:Ae.CHAR,value:8287},{type:Ae.CHAR,value:12288},{type:Ae.CHAR,value:65279}],wx=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Fa.words=()=>({type:Ae.SET,set:Kc(),not:!1});Fa.notWords=()=>({type:Ae.SET,set:Kc(),not:!0});Fa.ints=()=>({type:Ae.SET,set:Hl(),not:!1});Fa.notInts=()=>({type:Ae.SET,set:Hl(),not:!0});Fa.whitespace=()=>({type:Ae.SET,set:Jc(),not:!1});Fa.notWhitespace=()=>({type:Ae.SET,set:Jc(),not:!0});Fa.anyChar=()=>({type:Ae.SET,set:wx(),not:!0})});var Qc=X(Es=>{var $c=Ms(),kr=ql(),_x="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",kx={0:0,t:9,n:10,v:11,f:12,r:13};Es.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?_x.indexOf(l):kx[p],b=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),a};Es.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(kr.words());else if(i[2])t.push(kr.ints());else if(i[3])t.push(kr.whitespace());else if(i[4])t.push(kr.notWords());else if(i[5])t.push(kr.notInts());else if(i[6])t.push(kr.notWhitespace());else if(i[7])t.push({type:$c.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:$c.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Es.error(e,"Unterminated character class")};Es.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var Xc=X(Is=>{var eu=Ms();Is.wordBoundary=()=>({type:eu.POSITION,value:"b"});Is.nonWordBoundary=()=>({type:eu.POSITION,value:"B"});Is.begin=()=>({type:eu.POSITION,value:"^"});Is.end=()=>({type:eu.POSITION,value:"$"})});var Yc=X((EA,Gl)=>{var Ar=Qc(),xn=Ms(),vi=ql(),tu=Xc();Gl.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=N=>{Ar.error(a,`Nothing to repeat at column ${N-1}`)},p=Ar.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Zc.exports=La});var nm=X((CA,tm)=>{var nu=Yc(),Cs=em(),wi=nu.types;tm.exports=class Ss{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=nu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ss.prototype.max!=null?Ss.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case wi.ROOT:case wi.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var Ax=_i&&_i.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(_i,"__esModule",{value:!0});_i.RandomGenerator=void 0;var Mx=Ax(nm()),Ex;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new Mx.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(Ex=_i.RandomGenerator||(_i.RandomGenerator={}))});var Rs=X(Mr=>{"use strict";var Ix=Mr&&Mr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.TypeGuardError=void 0;var Cx=function(a){Ix(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Mr.TypeGuardError=Cx});var im=X(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$any=void 0;var Sx=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};au.$any=Sx});var rm=X(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$every=void 0;var Rx=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.$guard=void 0;var Px=Rs(),Nx=function(a){return function(e,t){if(e===!0)throw new Px.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};ru.$guard=Nx});var om=X(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.$is_between=void 0;var Dx=function(a,e,t){return e<=a&&a<=t};su.$is_between=Dx});var um=X(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$is_custom=void 0;var Ox=jl(),Bx=function(a,e,t,n){var i,r=(i=Ox.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};ou.$is_custom=Bx});var dm=X(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$is_date=void 0;var Fx=function(a){return Lx.test(a)};uu.$is_date=Fx;var Lx=/^(\d{4})-(\d{2})-(\d{2})$/});var lm=X(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$is_datetime=void 0;var Ux=function(a){return!isNaN(new Date(a).getTime())};du.$is_datetime=Ux});var pm=X(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_email=void 0;var Vx=function(a){return jx.test(a)};lu.$is_email=Vx;var jx=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var ym=X(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_ipv4=void 0;var Hx=function(a){return qx.test(a)};pu.$is_ipv4=Hx;var qx=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var fm=X(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_ipv6=void 0;var Gx=function(a){return zx.test(a)};yu.$is_ipv6=Gx;var zx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var cm=X(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_url=void 0;var Wx=function(a){return Kx.test(a)};fu.$is_url=Wx;var Kx=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var mm=X(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_uuid=void 0;var Jx=function(a){return $x.test(a)};cu.$is_uuid=Jx;var $x=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var hm=X(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$join=void 0;var Qx=function(a){return Xx(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};mu.$join=Qx;var Xx=function(a){return Yx(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},Yx=function(a){return Zx.has(a)},Zx=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var xm=X(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$number=void 0;var eb=Rs(),tb=function(a){if(isFinite(a)===!1)throw new eb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};hu.$number=tb});var bm=X(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$report=void 0;var nb=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};xu.$report=nb});var gm=X(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$rest=void 0;var ab=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};bu.$rest=ab});var Tm=X(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$string=void 0;var ib=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};gu.$string=ib});var vm=X(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$tail=void 0;var rb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Tu.$tail=rb});var Am=X(ki=>{"use strict";var Vt=ki&&ki.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:bb.$number,string:vb.$string,tail:wb.$tail,rest:Tb.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:sb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:wm.RandomGenerator,pick:wm.RandomGenerator.pick}};var e=function(t){return function(n){throw new _m.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(_b=ki.Namespace||(ki.Namespace={}))});var Mm=X(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.MapUtil=void 0;var kb;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(kb=Ps.MapUtil||(Ps.MapUtil={}))});var Im=X(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0})});var Sm=X(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0})});var Pm=X(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0})});var Dm=X(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0})});var Bm=X(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0})});var Lm=X(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0})});var ap=X(V=>{"use strict";var Ab=V&&V.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Ai=V&&V.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ab(e,a,t)};Object.defineProperty(V,"__esModule",{value:!0});V.createValidatePrune=V.createIsPrune=V.createAssertPrune=V.createPrune=V.createValidateClone=V.createIsClone=V.createAssertClone=V.createClone=V.createRandom=V.createValidateStringify=V.createIsStringify=V.createAssertStringify=V.createStringify=V.createValidateParse=V.createAssertParse=V.createIsParse=V.createValidateEquals=V.createEquals=V.createAssertEquals=V.createValidate=V.createIs=V.createAssertType=V.createAssert=V.validatePrune=V.isPrune=V.assertPrune=V.prune=V.validateClone=V.isClone=V.assertClone=V.clone=V.literals=V.random=V.metadata=V.validateStringify=V.isStringify=V.assertStringify=V.stringify=V.validateParse=V.isParse=V.assertParse=V.application=V.customValidators=V.validateEquals=V.equals=V.assertEquals=V.validate=V.is=V.assertType=V.assert=void 0;var Er=jl(),Me=Am(),Mb=Mm();Ai(Im(),V);Ai(Sm(),V);Ai(Pm(),V);Ai(Dm(),V);Ai(Bm(),V);Ai(Lm(),V);Ai(Rs(),V);function zl(){ne("assert")}V.assert=zl;Object.assign(zl,Me.Namespace.assert("assert"));function Wl(){ne("assertType")}V.assertType=Wl;Object.assign(Wl,Me.Namespace.assert("assertType"));function vu(){ne("is")}V.is=vu;Object.assign(vu,Me.Namespace.assert("is"));function wu(){ne("validate")}V.validate=wu;Object.assign(wu,Me.Namespace.validate());function Kl(){ne("assertEquals")}V.assertEquals=Kl;Object.assign(Kl,Me.Namespace.assert("assertEquals"));function Jl(){ne("equals")}V.equals=Jl;Object.assign(Jl,Me.Namespace.is());function $l(){ne("validateEquals")}V.validateEquals=$l;Object.assign($l,Me.Namespace.validate());V.customValidators={size:function(a){var e,t;return a?(t=(e=Er.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Er.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Er.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Er.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=Mb.MapUtil.take(Er.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Er.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function Eb(){ne("application")}V.application=Eb;function Ql(){ne("assertParse")}V.assertParse=Ql;Object.assign(Ql,Me.Namespace.assert("assertParse"));function Xl(){ne("isParse")}V.isParse=Xl;Object.assign(Xl,vu);function Yl(){ne("validateParse")}V.validateParse=Yl;Object.assign(Yl,wu);function Zl(){ne("stringify")}V.stringify=Zl;Object.assign(Zl,Me.Namespace.stringify("stringify"));function _u(){ne("assertStringify")}V.assertStringify=_u;Object.assign(_u,Me.Namespace.assert("assertStringify"));Object.assign(_u,Me.Namespace.stringify("assertStringify"));function ku(){ne("isStringify")}V.isStringify=ku;Object.assign(ku,Me.Namespace.is());Object.assign(ku,Me.Namespace.stringify("isStringify"));function Au(){ne("validateStringify")}V.validateStringify=Au;Object.assign(Au,Me.Namespace.validate());Object.assign(Au,Me.Namespace.stringify("validateStringify"));function Ib(){ne("metadata")}V.metadata=Ib;function ep(){ne("random")}V.random=ep;Object.assign(ep,Me.Namespace.random());function Cb(){ne("literals")}V.literals=Cb;function tp(){ne("clone")}V.clone=tp;Object.assign(tp,Me.Namespace.clone("clone"));function Mu(){ne("assertClone")}V.assertClone=Mu;Object.assign(Mu,Me.Namespace.assert("assertClone"));Object.assign(Mu,Me.Namespace.clone("assertClone"));function Eu(){ne("isClone")}V.isClone=Eu;Object.assign(Eu,Me.Namespace.is());Object.assign(Eu,Me.Namespace.clone("isClone"));function Iu(){ne("validateClone")}V.validateClone=Iu;Object.assign(Iu,Me.Namespace.validate());Object.assign(Iu,Me.Namespace.clone("validateClone"));function np(){ne("prune")}V.prune=np;Object.assign(np,Me.Namespace.prune("prune"));function Cu(){ne("assertPrune")}V.assertPrune=Cu;Object.assign(Cu,Me.Namespace.assert("assertPrune"));Object.assign(Cu,Me.Namespace.prune("assertPrune"));function Su(){ne("isPrune")}V.isPrune=Su;Object.assign(Su,Me.Namespace.is());Object.assign(Su,Me.Namespace.prune("isPrune"));function Ru(){ne("validatePrune")}V.validatePrune=Ru;Object.assign(Ru,Me.Namespace.prune("validatePrune"));Object.assign(Ru,Me.Namespace.validate());function Um(){ne("createAssert")}V.createAssert=Um;Object.assign(Um,zl);function Vm(){ne("createAssertType")}V.createAssertType=Vm;Object.assign(Vm,Wl);function jm(){ne("createIs")}V.createIs=jm;Object.assign(jm,vu);function Hm(){ne("createValidate")}V.createValidate=Hm;Object.assign(Hm,wu);function qm(){ne("createAssertEquals")}V.createAssertEquals=qm;Object.assign(qm,Kl);function Gm(){ne("createEquals")}V.createEquals=Gm;Object.assign(Gm,Jl);function zm(){ne("createValidateEquals")}V.createValidateEquals=zm;Object.assign(zm,$l);function Wm(){ne("createIsParse")}V.createIsParse=Wm;Object.assign(Wm,Xl);function Km(){ne("createAssertParse")}V.createAssertParse=Km;Object.assign(Km,Ql);function Jm(){ne("createValidateParse")}V.createValidateParse=Jm;Object.assign(Jm,Yl);function $m(){ne("createStringify")}V.createStringify=$m;Object.assign($m,Zl);function Qm(){ne("createAssertStringify")}V.createAssertStringify=Qm;Object.assign(Qm,_u);function Xm(){ne("createIsStringify")}V.createIsStringify=Xm;Object.assign(Xm,ku);function Ym(){ne("createValidateStringify")}V.createValidateStringify=Ym;Object.assign(Ym,Au);function Zm(){ne("createRandom")}V.createRandom=Zm;Object.assign(Zm,ep);function eh(){ne("createClone")}V.createClone=eh;Object.assign(eh,tp);function th(){ne("createAssertClone")}V.createAssertClone=th;Object.assign(th,Mu);function nh(){ne("createIsClone")}V.createIsClone=nh;Object.assign(nh,Eu);function ah(){ne("createValidateClone")}V.createValidateClone=ah;Object.assign(ah,Iu);function ih(){ne("createPrune")}V.createPrune=ih;Object.assign(ih,np);function rh(){ne("createAssertPrune")}V.createAssertPrune=rh;Object.assign(rh,Cu);function sh(){ne("createIsPrune")}V.createIsPrune=sh;Object.assign(sh,Su);function oh(){ne("createValidatePrune")}V.createValidatePrune=oh;Object.assign(oh,Ru);function ne(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var dh=X(gn=>{"use strict";var uh=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Sb=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),Rb=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&uh(e,a,t);return Sb(e,a),e},Pb=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&uh(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Nb=Rb(ap());gn.default=Nb;Pb(ap(),gn)});var wl={};Li(wl,{BaseContract:()=>or,BigNumber:()=>P,Contract:()=>ie,ContractFactory:()=>fi,FixedNumber:()=>ft,Signer:()=>Bt,VoidSigner:()=>sa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>$o,logger:()=>dc,providers:()=>Da,utils:()=>Y,version:()=>Xo,wordlists:()=>mi});var Lp=_n(Qu());var Ep="logger/5.7.0";var Ip=!1,Cp=!1,Us={debug:1,default:2,info:2,warning:3,error:4,off:5},Sp=Us.default,Xu=null;function _h(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Rp=_h(),Yu;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(Yu||(Yu={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var Pp="0123456789abcdef",A=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Us[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Sp>Us[n])&&console.log.apply(console,t)}debug(...e){this._log(A.levels.DEBUG,e)}info(...e){this._log(A.levels.INFO,e)}warn(...e){this._log(A.levels.WARNING,e)}makeError(e,t,n){if(Cp)return this.makeError("censored error",t,{});t||(t=A.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let b=0;b>4],f+=Pp[p[b]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,A.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Rp&&this.throwError("platform missing String.prototype.normalize",A.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Rp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,A.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,A.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,A.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",A.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",A.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",A.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Xu||(Xu=new A(Ep)),Xu}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ip){if(!e)return;this.globalLogger().throwError("error censorship permanent",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Cp=!!e,Ip=!!t}static setLogLevel(e){let t=Us[e.toLowerCase()];if(t==null){A.globalLogger().warn("invalid log level - "+e);return}Sp=t}static from(e){return new A(e)}};A.errors=Wt;A.levels=Yu;var Np="bytes/5.7.0";var wt=new A(Np);function Op(a){return!!a.toHexString}function Ui(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return Ui(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function ta(a){return Z(a)&&!(a.length%2)||on(a)}function Dp(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Dp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function B(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),Ui(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Op(a)&&(a=a.toHexString()),Z(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;iB(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),Ui(n)}function Zt(a){let e=B(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),Ui(t)}function Z(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var Zu="0123456789abcdef";function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=Zu[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Op(a))return a.toHexString();if(Z(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+Zu[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Pt(a){if(typeof a!="string")a=j(a);else if(!Z(a)||a.length%2)return null;return(a.length-2)/2}function Ee(a,e,t){return typeof a!="string"?a=j(a):(!Z(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=j(t).substring(2)}),e}function Fn(a){let e=ed(j(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function ed(a){typeof a!="string"&&(a=j(a)),Z(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Ln(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ta(a)){let t=B(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=j(t.slice(0,32)),e.s=j(t.slice(32,64))):t.length===65?(e.r=j(t.slice(0,32)),e.s=j(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=j(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ai(B(e._vs),32);e._vs=j(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=j(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!Z(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=fe(e.r,32),e.s==null||!Z(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=fe(e.s,32);let t=B(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=j(t);e._vs&&(Z(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=fe(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Nr(a){return a=Ln(a),j(de([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Vs="bignumber/5.7.0";var Dr=Lp.default.BN,na=new A(Vs),td={},Bp=9007199254740991;function Up(a){return a!=null&&(P.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||Z(a)||typeof a=="bigint"||on(a))}var Fp=!1,P=class{constructor(e,t){e!==td&&na.throwError("cannot call constructor directly; use BigNumber.from",A.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(he(this).fromTwos(e))}toTwos(e){return Kt(he(this).toTwos(e))}abs(){return this._hex[0]==="-"?P.from(this._hex.substring(1)):this}add(e){return Kt(he(this).add(he(e)))}sub(e){return Kt(he(this).sub(he(e)))}div(e){return P.from(e).isZero()&&un("division-by-zero","div"),Kt(he(this).div(he(e)))}mul(e){return Kt(he(this).mul(he(e)))}mod(e){let t=he(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(he(this).umod(t))}pow(e){let t=he(e);return t.isNeg()&&un("negative-power","pow"),Kt(he(this).pow(t))}and(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(he(this).and(t))}or(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(he(this).or(t))}xor(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(he(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(he(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(he(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(he(this).shrn(e))}eq(e){return he(this).eq(he(e))}lt(e){return he(this).lt(he(e))}lte(e){return he(this).lte(he(e))}gt(e){return he(this).gt(he(e))}gte(e){return he(this).gte(he(e))}isNegative(){return this._hex[0]==="-"}isZero(){return he(this).isZero()}toNumber(){try{return he(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return na.throwError("this platform does not support BigInt",A.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Fp||(Fp=!0,na.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?na.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",A.errors.UNEXPECTED_ARGUMENT,{}):na.throwError("BigNumber.toString does not accept parameters",A.errors.UNEXPECTED_ARGUMENT,{})),he(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof P)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new P(td,Or(e)):e.match(/^-?[0-9]+$/)?new P(td,Or(new Dr(e))):na.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Bp||e<=-Bp)&&un("overflow","BigNumber.from",e),P.from(String(e));let t=e;if(typeof t=="bigint")return P.from(t.toString());if(on(t))return P.from(j(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return P.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(Z(n)||n[0]==="-"&&Z(n.substring(1))))return P.from(n)}return na.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Or(a){if(typeof a!="string")return Or(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&na.throwArgumentError("invalid hex","value",a),a=Or(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return P.from(Or(a))}function he(a){let e=P.from(a).toHexString();return e[0]==="-"?new Dr("-"+e.substring(3),16):new Dr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),na.throwError(a,A.errors.NUMERIC_FAULT,n)}function nd(a){return new Dr(a,36).toString(16)}function ad(a){return new Dr(a,16).toString(36)}var jt=new A(Vs),Br={},jp=P.from(0),Hp=P.from(-1);function qp(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,A.errors.NUMERIC_FAULT,i)}var Fr="0";for(;Fr.length<256;)Fr+=Fr;function id(a){if(typeof a!="number")try{a=P.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+Fr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Vi(a,e){e==null&&(e=0);let t=id(e);a=P.from(a);let n=a.lt(jp);n&&(a=a.mul(Hp));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&qp("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new aa(Br,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Br&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",A.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(Vp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(Vp.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+Fr.substring(0,e),this.format),i=kh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=P.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return fe(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!Up(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString(Vi(e,t),aa.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=aa.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(jp)&&qp("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=fe(r,n.width/8));let s=Vi(i,n.decimals);return new ft(Br,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=aa.from(t);if(B(e).length>n.width/8)throw new Error("overflow");let i=P.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Vi(i,n.decimals);return new ft(Br,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(on(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==A.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},Vp=ft.from(1),kh=ft.from("0.5");var Gp="properties/5.7.0";var Ah=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},js=new A(Gp);function R(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function mt(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ie(a){return Ah(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function ji(a,e){(!a||typeof a!="object")&&js.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||js.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function ve(a){let e={};for(let t in a)e[t]=a[t];return e}var Mh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function zp(a){if(a==null||Mh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tct(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&R(e,t,ct(n))}return e}return js.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function ct(a){return Eh(a)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Un="abi/5.7.0";var be=new A(Un),ii={},Wp={calldata:!0,memory:!0,storage:!0},Ih={calldata:!0,memory:!0};function Hs(a,e){if(a==="bytes"||a==="string"){if(Wp[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&Ih[e])return!0;return(Wp[e]||e==="payable")&&be.throwArgumentError("invalid modifier","name",e),!1}function Ch(a,e){let t=a;function n(o){be.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?lt.fromString(e,t):lt.fromObject(e)}static fromObject(e){return lt.isParamType(e)?e:new lt(ii,{name:e.name||null,type:Hi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(lt.fromObject):null})}static fromString(e,t){function n(i){return lt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Ch(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Lr(a,e){return Ph(a).map(t=>lt.fromString(t,e))}var qt=class{constructor(e,t){e!==ii&&be.throwError("use a static from method",A.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),qs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Dt.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Nt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return be.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Dt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Nt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):be.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&be.throwArgumentError("invalid event object","value",e);let t={name:Ur(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new Ht(ii,t)}static fromString(e){let t=e.match(Vr);t||be.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:be.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Lr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Jp(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&be.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||be.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=P.from(t[1]),t[0]):a}function $p(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Qp(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&be.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&be.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&be.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",a),e}var Nt=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&be.throwError("cannot format a constructor for sighash",A.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Nt.fromString(e):Nt.fromObject(e)}static fromObject(e){if(Nt.isConstructorFragment(e))return e;e.type!=="constructor"&&be.throwArgumentError("invalid constructor object","value",e);let t=Qp(e);t.constant&&be.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Nt(ii,n)}static fromString(e){let t={type:"constructor"};e=Jp(e,t);let n=e.match(Vr);return(!n||n[1].trim()!=="constructor")&&be.throwArgumentError("invalid constructor string","value",e),t.inputs=Lr(n[2].trim(),!1),$p(n[3].trim(),t),Nt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Dt=class extends Nt{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isFunctionFragment(e))return e;e.type!=="function"&&be.throwArgumentError("invalid function object","value",e);let t=Qp(e),n={type:e.type,name:Ur(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(lt.fromObject):[],outputs:e.outputs?e.outputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Dt(ii,n)}static fromString(e){let t={type:"function"};e=Jp(e,t);let n=e.split(" returns ");n.length>2&&be.throwArgumentError("invalid function string","value",e);let i=n[0].match(Vr);if(i||be.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Ur(t.name),t.inputs=Lr(i[2],!1),$p(i[3].trim(),t),n.length>1){let r=n[1].match(Vr);(r[1].trim()!=""||r[3].trim()!="")&&be.throwArgumentError("unexpected tokens","value",e),t.outputs=Lr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function Kp(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&be.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&be.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Ur(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return Kp(new tn(ii,t))}static fromString(e){let t={type:"error"},n=e.match(Vr);return n||be.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Ur(t.name),t.inputs=Lr(n[2],!1),Kp(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Hi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Rh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ur(a){return(!a||!a.match(Rh))&&be.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Vr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Ph(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&rd.throwError("value out-of-bounds",A.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=de([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},si=class{constructor(e,t,n,i){R(this,"_data",B(e)),R(this,"wordSize",t||32),R(this,"_coerceFunc",n),R(this,"allowLoose",i),this._offset=0}get data(){return j(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):si.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:rd.throwError("data out-of-bounds",A.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new si(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return P.from(this.readBytes(this.wordSize))}};var Yp=_n(Xp());function le(a){return"0x"+Yp.default.keccak_256(B(a))}var zs={};Li(zs,{decode:()=>jr,encode:()=>ia});var Zp="rlp/5.7.0";var Vn=new A(Zp);function ey(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function ty(a,e,t){let n=0;for(let i=0;ie+1+n&&Vn.throwError("child data too short",A.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function iy(a,e){if(a.length===0&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Vn.throwError("data short segment too short",A.errors.BUFFER_OVERRUN,{});let n=ty(a,e+1,t);return e+1+t+n>a.length&&Vn.throwError("data long segment too short",A.errors.BUFFER_OVERRUN,{}),ny(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{}),ny(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let n=ty(a,e+1,t);e+1+t+n>a.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let i=j(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{});let n=j(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:j(a[e])}}function jr(a){let e=B(a),t=iy(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",a),t.result}var ry="address/5.7.0";var ka=new A(ry);function sy(a){Z(a,20)||ka.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=B(le(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var Nh=9007199254740991;function Dh(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var sd={};for(let a=0;a<10;a++)sd[String(a)]=String(a);for(let a=0;a<26;a++)sd[String.fromCharCode(65+a)]=String(10+a);var oy=Math.floor(Dh(Nh));function uy(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>sd[n]).join("");for(;e.length>=oy;){let n=e.substring(0,oy);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function pe(a){let e=null;if(typeof a!="string"&&ka.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=sy(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&ka.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==uy(a)&&ka.throwArgumentError("bad icap checksum","address",a),e=nd(a.substring(4));e.length<40;)e="0"+e;e=sy("0x"+e)}else ka.throwArgumentError("invalid address","address",a);return e}function dy(a){try{return pe(a),!0}catch{}return!1}function ly(a){let e=ad(pe(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+uy("XE00"+e)+e}function oi(a){let e=null;try{e=pe(a.from)}catch{ka.throwArgumentError("missing from address","transaction",a)}let t=Zt(B(P.from(a.nonce).toHexString()));return pe(Ee(le(ia([e,t])),12))}function py(a,e,t){return Pt(e)!==32&&ka.throwArgumentError("salt must be 32 bytes","salt",e),Pt(t)!==32&&ka.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),pe(Ee(le(de(["0xff",pe(a),e,t])),12))}var Ws=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=pe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return pe(fe(e.readValue().toHexString(),20))}};var Ks=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Gi=new A(Un);function od(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Gi.throwError("cannot encode object for signature with missing names",A.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Gi.throwError("cannot encode object for signature with duplicate names",A.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Gi.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Gi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ri(a.wordSize),r=new ri(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let b=r.length;l.encode(r,f);let E=i.writeUpdatableValue();s.push(k=>{E(k+b)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function ud(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===A.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===A.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var Js=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Gi.throwError("insufficient data length",A.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;iZs,EtherSymbol:()=>hy,HashZero:()=>Wi,MaxInt256:()=>my,MaxUint256:()=>no,MinInt256:()=>cy,NegativeOne:()=>eo,One:()=>to,Two:()=>yy,WeiPerEther:()=>fy,Zero:()=>zi});var Zs="0x0000000000000000000000000000000000000000";var eo=P.from(-1),zi=P.from(0),to=P.from(1),yy=P.from(2),fy=P.from("1000000000000000000"),no=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),cy=P.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),my=P.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Wi="0x0000000000000000000000000000000000000000000000000000000000000000";var hy="\u039E";var ao=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=P.from(t),i=no.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(to).mul(eo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(zi)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var xy="strings/5.7.0";var by=new A(xy),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Ot;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Ot||(Ot={}));function Oh(a,e,t,n,i){return by.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function gy(a,e,t,n,i){if(a===Ot.BAD_PREFIX||a===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Ot.OVERRUN?t.length-e-1:0}function Bh(a,e,t,n,i){return a===Ot.OVERLONG?(n.push(i),0):(n.push(65533),gy(a,e,t,n,i))}var io=Object.freeze({error:Oh,ignore:gy,replace:Bh});function ld(a,e){e==null&&(e=io.error),a=B(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Ot.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Ot.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Ot.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Ot.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Ot.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Ot.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ge(a,e=Gt.current){e!=Gt.current&&(by.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return B(t)}function dd(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function pd(a,e){return'"'+ld(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?dd(t):(t-=65536,dd((t>>10&1023)+55296)+dd((t&1023)+56320))}).join("")+'"'}function ro(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return ro(ld(a,e))}function Aa(a,e=Gt.current){return ld(ge(a,e))}function yd(a){let e=ge(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return j(de([e,Wi]).slice(0,32))}function fd(a){let e=B(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function Fh(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function Ty(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function md(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var Lh=Ty("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Uh="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),Vh=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],jh=cd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Hh=cd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),qh=cd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Fh),Gh=Ty("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function zh(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function Wh(a){return!!md(a,Lh)}function Kh(a){let e=md(a,Vh);if(e)return[a+e.s];let t=jh[a];if(t)return t;let n=Hh[a];if(n)return[a+n[0]];let i=qh[a];return i||null}function Jh(a){return!!md(a,Gh)}function hd(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Aa(a);e=zh(e.map(n=>{if(Uh.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=Kh(n);return i||[n]})),e=Aa(ro(e),Gt.NFKC),e.forEach(n=>{if(Jh(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(Wh(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ro(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var so=class extends Hr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ge(t))}decode(e){return Jt(super.decode(e))}};var ui=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return od(e,this.coders,t)}decode(e){return e.coerce(this.name,ud(e,this.coders))}};var oo=new A(Un),$h=new RegExp(/^bytes([0-9]*)$/),Qh=new RegExp(/^(u?int)([0-9]*)$/),Ki=class{constructor(e){R(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ws(e.name);case"bool":return new $s(e.name);case"string":return new so(e.name);case"bytes":return new Qs(e.name);case"array":return new Js(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ui((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Ys(e.name)}let t=e.type.match(Qh);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&oo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new ao(n/8,t[1]==="int",e.name)}if(t=e.type.match($h),t){let n=parseInt(t[1]);return(n===0||n>32)&&oo.throwArgumentError("invalid bytes length","param",e),new Xs(n,e.name)}return oo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new si(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ri(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(lt.from(i)));return new ui(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&oo.throwError("types/values length mismatch",A.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(lt.from(s))),i=new ui(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(lt.from(s)));return new ui(i,"_").decode(this._getReader(B(t),n))}},qr=new Ki;function nn(a){return le(ge(a))}var uo="hash/5.7.0";var xd={};Li(xd,{decode:()=>Ji,encode:()=>$i});function Ji(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function Xh(a){let e={};for(let t=0;t>--l&1}let b=31,E=Math.pow(2,b),k=E>>>1,v=k>>1,I=E-1,D=0;for(let q=0;q1;){let Re=W+ye>>>1;q>>1|f(),te=te<<1^k,ae=(ae^k)<<1|k|1;F=te,U=1+ae-te}let G=n-4;return N.map(q=>{switch(q-G){case 3:return G+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return G+256+(a[o++]<<8|a[o++]);case 1:return G+a[o++];default:return q-1}})}function Zh(a){let e=0;return()=>a[e++]}function _y(a){return Zh(Yh(a))}function e6(a){return a&1?~a>>1:a>>1}function t6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function ky(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(i6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(r6(t,a))}return Xh(wy(e))}function a6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Ay(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function i6(a,e){let t=1+e(),n=e(),i=a6(e),r=Ay(i.length,1+a,e);return wy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,b)=>{let E=b*n;return[l+b*t,p.map(k=>k+E)]})}))}function r6(a,e){let t=1+e();return Ay(t,1+a,e).map(i=>[i[0],i.slice(1)])}function My(a){let e=Gr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Gr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Ey(){return _y(Ji("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var lo=Ey(),s6=new Set(Gr(lo)),o6=new Set(Gr(lo)),u6=ky(lo),d6=My(lo),Iy=45,Cy=95;function Sy(a){return Aa(a)}function l6(a){return a.filter(e=>e!=65039)}function Ry(a){for(let e of a.split(".")){let t=Sy(e);try{for(let n=t.lastIndexOf(Cy)-1;n>=0;n--)if(t[n]!==Cy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Iy&&t[3]===Iy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function Py(a){return Ry(p6(a,l6))}function p6(a,e){let t=Sy(a).reverse(),n=[];for(;t.length;){let i=f6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(s6.has(r)){n.push(r);continue}if(o6.has(r))continue;let s=u6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ry(y6(String.fromCodePoint(...n)))}function y6(a){return a.normalize("NFC")}function f6(a,e){var t;let n=d6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var c6=new A(uo),Dy=new Uint8Array(32);Dy.fill(0);function Ny(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function bd(a){let e=ge(Py(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(Ny(e.slice(n))),t}function gd(a){try{return bd(a).length!==0}catch{}return!1}function Ma(a){typeof a!="string"&&c6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Dy,t=bd(a);for(;t.length;)e=le(de([e,le(t.pop())]));return j(e)}function zr(a){return j(de(bd(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Oy=`Ethereum Signed Message: +`;function Qi(a){return typeof a=="string"&&(a=ge(a)),le(de([ge(Oy),ge(String(a.length)),a]))}var m6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new A(uo),Uy=new Uint8Array(32);Uy.fill(0);var h6=P.from(-1),Vy=P.from(0),jy=P.from(1),x6=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function b6(a){let e=B(a),t=e.length%32;return t?kt([e,Uy.slice(t)]):j(e)}var g6=fe(jy.toHexString(),32),T6=fe(Vy.toHexString(),32),By={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Td=["name","version","chainId","verifyingContract","salt"];function Fy(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var v6={name:Fy("name"),version:Fy("version"),chainId:function(a){try{return P.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return pe(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=B(a);if(e.length!==32)throw new Error("bad length");return j(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function vd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=x6.mask(t?n-1:n),r=t?i.add(jy).mul(h6):Vy;return function(s){let o=P.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),fe(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return B(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),b6(n)}}}switch(a){case"address":return function(e){return fe(pe(e),32)};case"bool":return function(e){return e?g6:T6};case"bytes":return function(e){return le(e)};case"string":return function(e){return nn(e)}}return null}function Ly(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){R(this,"types",Object.freeze(ct(e))),R(this,"_encoderCache",{}),R(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!vd(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),R(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=Ly(o,e[o])+l.map(p=>Ly(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=vd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(le)),le(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?le(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return le(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(vd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=By[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Td.indexOf(n.name)-Td.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return le(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return m6(this,void 0,void 0,function*(){e=ve(e);let r={};e.verifyingContract&&!Z(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!Z(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Td.forEach(l=>{let p=e[l];p!=null&&(i[l]=v6[l](p),r.push({name:l,type:By[l]}))});let s=bt.from(t),o=ve(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return j(B(p));if(l.match(/^u?int/))return P.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new A(Un);var Xi=class extends en{},Yi=class extends en{},wd=class extends en{},ra=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},w6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Hy(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ea=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,R(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),R(this,"_abiCoder",mt(new.target,"getAbiCoder")()),R(this,"functions",{}),R(this,"errors",{}),R(this,"events",{}),R(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}R(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||R(this,"deploy",Nt.from({payable:!1,type:"constructor"})),R(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return qr}static getAddress(e){return pe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(Z(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(Z(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(Z(e)){let n=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=B(t);return j(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",j(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),j(de([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=B(t);return j(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",j(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),j(de([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=B(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=j(n.slice(0,4)),f=w6[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,l=b.format()}catch{}break}}return gt.throwError("call revert exception"+r,A.errors.CALL_EXCEPTION,{method:e.format(),data:j(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),j(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),A.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?le(j(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=P.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),fe(j(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(le(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let E=this.getEventTopic(e);(!Z(n[0],32)||n[0].toLowerCase()!==E)&>.throwError("fragment/topic mismatch",A.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:E,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((E,k)=>{E.indexed?E.type==="string"||E.type==="bytes"||E.baseType==="tuple"||E.baseType==="array"?(i.push(lt.fromObject({type:"bytes32",name:E.name})),s.push(!0)):(i.push(E),s.push(!1)):(r.push(E),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,de(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,b=0;e.inputs.forEach((E,k)=>{if(E.indexed)if(o==null)p[k]=new ra({_isIndexed:!0,hash:null});else if(s[k])p[k]=new ra({_isIndexed:!0,hash:o[b++]});else try{p[k]=o[b++]}catch(v){p[k]=v}else try{p[k]=l[f++]}catch(v){p[k]=v}if(E.name&&p[E.name]==null){let v=p[k];v instanceof Error?Object.defineProperty(p,E.name,{enumerable:!0,get:()=>{throw Hy(`property ${JSON.stringify(E.name)}`,v)}}):p[E.name]=v}});for(let E=0;E{throw Hy(`index ${E}`,k)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Yi({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:P.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Xi({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=j(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new wd({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var qy="abstract-provider/5.7.0";var _6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},k6=new A(qy),po=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){k6.checkAbstract(new.target,$t),R(this,"_isProvider",!0)}getFeeData(){return _6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=P.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var Gy="abstract-signer/5.7.0";var kn=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ln=new A(Gy),A6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],M6=[A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED],Bt=class{constructor(){ln.checkAbstract(new.target,Bt),R(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ie(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ie(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)A6.indexOf(n)===-1&&ln.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=ve(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>kn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&ln.throwError("network does not support EIP-1559",A.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",A.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(M6.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ie(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",A.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},sa=class extends Bt{constructor(e,t){super(),R(this,"address",e),R(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,A.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new sa(this.address,e)}};var ue=_n(Qu()),Kn=_n(Pd());function sr(a,e,t){return t={path:e,exports:{},require:function(n,i){return $2(n,i??t.path)}},a(t,t.exports),t.exports}function $2(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Bd=I0;function I0(a,e){if(!a)throw new Error(e||"Assertion failed")}I0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=sr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,E=f&255;b?l.push(b,E):l.push(E)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(E>>1)-1?I=(E>>1)-D:I=D,k.isubn(I)):I=0,b[v]=I,k.iushrn(1)}return b}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var b=0,E=0,k;l.cmpn(-b)>0||p.cmpn(-E)>0;){var v=l.andln(3)+b&3,I=p.andln(3)+E&3;v===3&&(v=-1),I===3&&(I=-1);var D;(v&1)===0?D=0:(k=l.andln(7)+b&7,(k===3||k===5)&&I===2?D=-v:D=v),f[0].push(D);var N;(I&1)===0?N=0:(k=p.andln(7)+E&7,(k===3||k===5)&&v===2?N=-I:N=I),f[1].push(N),2*b===D+1&&(b=1-b),2*E===N+1&&(E=1-E),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var b="_"+p;l.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new ue.default(l,"hex","le")}t.intFromLE=o}),ho=an.getNAF,Q2=an.getJSF,xo=an.assert;function Sa(a,e){this.type=a,this.p=new ue.default(e.p,16),this.red=e.prime?ue.default.red(e.prime):ue.default.mont(this.p),this.zero=new ue.default(0).toRed(this.red),this.one=new ue.default(1).toRed(this.red),this.two=new ue.default(2).toRed(this.red),this.n=e.n&&new ue.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var li=Sa;Sa.prototype.point=function(){throw new Error("Not implemented")};Sa.prototype.validate=function(){throw new Error("Not implemented")};Sa.prototype._fixedNafMul=function(e,t){xo(e.precomputed);var n=e._getDoubles(),i=ho(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),b=this.jpoint(null,null,null),E=r;E>0;E--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];xo(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Sa.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,b,E;for(f=0;f=1;f-=2){var v=f-1,I=f;if(s[v]!==1||s[I]!==1){l[v]=ho(n[v],s[v],this._bitLength),l[I]=ho(n[I],s[I],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[I].length,p);continue}var D=[t[v],null,null,t[I]];t[v].y.cmp(t[I].y)===0?(D[1]=t[v].add(t[I]),D[2]=t[v].toJ().mixedAdd(t[I].neg())):t[v].y.cmp(t[I].y.redNeg())===0?(D[1]=t[v].toJ().mixedAdd(t[I]),D[2]=t[v].add(t[I].neg())):(D[1]=t[v].toJ().mixedAdd(t[I]),D[2]=t[v].toJ().mixedAdd(t[I].neg()));var N=[-3,-1,-5,-7,0,7,5,1,3],F=Q2(n[v],n[I]);for(p=Math.max(F[0].length,p),l[v]=new Array(p),l[I]=new Array(p),b=0;b=0;f--){for(var ye=0;f>=0;){var te=!0;for(b=0;b=0&&ye++,q=q.dblp(ye),f<0)break;for(b=0;b0?E=o[b][ae-1>>1]:ae<0&&(E=o[b][-ae-1>>1].neg()),E.type==="affine"?q=q.mixedAdd(E):q=q.add(E))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(k=p,v=f),b.negative&&(b=b.neg(),E=E.neg()),k.negative&&(k=k.neg(),v=v.neg()),[{a:b,b:E},{a:k,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),b=e.sub(o).sub(l),E=p.add(f).neg();return{k1:b,k2:E}};fn.prototype.pointFromX=function(e,t){e=new ue.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new ue.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Rt(a,e,t,n){li.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ue.default(0)):(this.x=new ue.default(e,16),this.y=new ue.default(t,16),this.z=new ue.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Fd(Rt,li.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Rt(this,e,t,n)};Rt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Rt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),b=f.redMul(l),E=i.redMul(f),k=p.redSqr().redIAdd(b).redISub(E).redISub(E),v=p.redMul(E.redISub(k)).redISub(s.redMul(b)),I=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(k,v,I)};Rt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),b=n.redMul(p),E=l.redSqr().redIAdd(f).redISub(b).redISub(b),k=l.redMul(b.redISub(E)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(E,k,v)};Rt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var co=sr(function(a,e){"use strict";var t=e;t.base=li,t.short=Y2,t.mont=null,t.edwards=null}),mo=sr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new co.short(o):o.type==="edwards"?this.curve=new co.edwards(o):this.curve=new co.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Kn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Kn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Kn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Kn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Kn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Kn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Kn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Kn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ca(a){if(!(this instanceof Ca))return new Ca(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(a.entropy,a.entropyEnc||"hex"),t=In.toArray(a.nonce,a.nonceEnc||"hex"),n=In.toArray(a.pers,a.persEnc||"hex");Bd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var C0=Ca;Ca.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ca.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=In.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var Z2=an.assert;function bo(a,e){if(a instanceof bo)return a;this._importDER(a,e)||(Z2(a.r&&a.s,"Signature without r or s"),this.r=new ue.default(a.r,16),this.s=new ue.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var go=bo;function e5(){this.place=0}function Nd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function E0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}bo.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=E0(t),n=E0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Dd(i,t.length),i=i.concat(t),i.push(2),Dd(i,n.length);var r=i.concat(n),s=[48];return Dd(s,r.length),s=s.concat(r),an.encode(s,e)};var t5=function(){throw new Error("unsupported")},S0=an.assert;function pn(a){if(!(this instanceof pn))return new pn(a);typeof a=="string"&&(S0(Object.prototype.hasOwnProperty.call(mo,a),"Unknown curve "+a),a=mo[a]),a instanceof mo.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var n5=pn;pn.prototype.keyPair=function(e){return new Ld(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Ld.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Ld.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new C0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||t5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new ue.default(2));;){var r=new ue.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new ue.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new C0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new ue.default(1)),f=0;;f++){var b=i.k?i.k(f):new ue.default(l.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var E=this.g.mul(b);if(!E.isInfinity()){var k=E.getX(),v=k.umod(this.n);if(v.cmpn(0)!==0){var I=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(I=I.umod(this.n),I.cmpn(0)!==0){var D=(E.getY().isOdd()?1:0)|(k.cmp(v)!==0?2:0);return i.canonical&&I.cmp(this.nh)>0&&(I=this.n.sub(I),D^=1),new go({r:v,s:I,recoveryParam:D})}}}}}};pn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new ue.default(e,16)),n=this.keyFromPublic(n,i),t=new go(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(a,e,t,n){S0((3&t)===t,"The recovery param is more than two bits"),e=new go(e,n);var i=this.n,r=new ue.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),b=i.sub(r).mul(f).umod(i),E=o.mul(f).umod(i);return this.g.mulAdd(b,s,E)};pn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new go(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var a5=sr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=co,t.curves=mo,t.ec=n5,t.eddsa=null}),R0=a5.ec;var P0="signing-key/5.7.0";var Vd=new A(P0),Ud=null;function Jn(){return Ud||(Ud=new R0("secp256k1")),Ud}var cn=class{constructor(e){R(this,"curve","secp256k1"),R(this,"privateKey",j(e)),Pt(this.privateKey)!==32&&Vd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Jn().keyFromPrivate(B(this.privateKey));R(this,"publicKey","0x"+t.getPublic(!1,"hex")),R(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),R(this,"_isSigningKey",!0)}_addPoint(e){let t=Jn().keyFromPublic(B(this.publicKey)),n=Jn().keyFromPublic(B(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(B(this.privateKey)),n=B(e);n.length!==32&&Vd.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Ln({recoveryParam:i.recoveryParam,r:fe("0x"+i.r.toString(16),32),s:fe("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Jn().keyFromPrivate(B(this.privateKey)),n=Jn().keyFromPublic(B(Jr(e)));return fe("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function To(a,e){let t=Ln(e),n={r:B(t.r),s:B(t.s)};return"0x"+Jn().recoverPubKey(B(a),n,t.recoveryParam).encode("hex",!1)}function Jr(a,e){let t=B(a);if(t.length===32){let n=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?j(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):j(t)}return Vd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var N0="transactions/5.7.0";var Ut=new A(N0),vo;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(vo||(vo={}));function Hd(a){return a==="0x"?null:pe(a)}function Lt(a){return a==="0x"?zi:P.from(a)}var i5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],r5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(a){let e=Jr(a);return pe(Ee(le(Ee(e,1)),12))}function pi(a,e){return mn(To(B(a),e))}function rn(a,e){let t=Zt(P.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function jd(a,e){return{address:pe(a),storageKeys:(e||[]).map((t,n)=>(Pt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),jd(t[0],t[1])):jd(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return jd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function D0(a){return sn(a).map(e=>[e.address,e.storageKeys])}function O0(a,e){if(a.gasPrice!=null){let n=P.from(a.gasPrice),i=P.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?pe(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",D0(a.accessList||[])];if(e){let n=Ln(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",ia(t)])}function B0(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?pe(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",D0(a.accessList||[])];if(e){let n=Ln(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",ia(t)])}function s5(a,e){ji(a,r5);let t=[];i5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=B(j(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(j(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!ta(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(j(n)),t.push("0x"),t.push("0x")),!e)return ia(t);let i=Ln(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(j(r)),t.push(Zt(B(i.r))),t.push(Zt(B(i.s))),ia(t)}function $r(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),s5(a,e);switch(a.type){case 1:return B0(a,e);case 2:return O0(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,A.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function F0(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=fe(e[1],32),a.s=fe(e[2],32);try{let n=le(t(a));a.from=pi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function o5(a){let e=jr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",j(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Hd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=le(a),F0(i,e.slice(9),O0)),i}function u5(a){let e=jr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",j(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Hd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=le(a),F0(t,e.slice(8),B0)),t}function d5(a){let e=jr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Hd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=P.from(e[6]).toNumber()}catch{return t}if(t.r=fe(e[7],32),t.s=fe(e[8],32),P.from(t.r).isZero()&&P.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(j(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=le(ia(i));try{t.from=pi(r,{r:j(t.r),s:j(t.s),recoveryParam:n})}catch{}t.hash=le(a)}return t.type=null,t}function wo(a){let e=B(a);if(e[0]>127)return d5(e);switch(e[0]){case 1:return u5(e);case 2:return o5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,A.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var L0="contracts/5.7.0";var Ra=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ce=new A(L0),l5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function _o(a,e){return Ra(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ce.throwArgumentError("invalid address or ENS name","name",t);try{return pe(t)}catch{}a||Ce.throwError("a provider or signer is needed to resolve ENS names",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Ce.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function Qr(a,e,t){return Ra(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>Qr(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield _o(a,e):t.type==="tuple"?yield Qr(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Qr(a,n,t.arrayChildren))):Promise.reject(Ce.makeError("invalid value for array",A.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Mo(a,e,t){return Ra(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=ve(t.pop())),Ce.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ie({override:_o(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Ra(this,void 0,void 0,function*(){return pe(p.signer)!==p.override&&Ce.throwError("Contract with a Signer cannot override from",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=_o(a.provider,n.from));let i=yield Ie({args:Qr(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ie(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=P.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=P.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=P.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=P.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=P.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=B(r);for(let b=0;bn[p]!=null);return l.length&&Ce.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,A.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function p5(a,e){return function(...t){return Mo(a,e,t)}}function y5(a,e){let t=a.signer||a.provider;return function(...n){return Ra(this,void 0,void 0,function*(){t||Ce.throwError("estimate require a provider or signer",A.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Mo(a,e,n);return yield t.estimateGas(i)})}}function V0(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function j0(a,e,t){let n=a.signer||a.provider;return function(...i){return Ra(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=ve(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Mo(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===A.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function f5(a,e){return function(...t){return Ra(this,void 0,void 0,function*(){a.signer||Ce.throwError("sending a transaction requires a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Mo(a,e,t),i=yield a.signer.sendTransaction(n);return V0(a,i),i})}}function U0(a,e,t){return e.constant?j0(a,e,t):f5(a,e)}function H0(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var yi=class{constructor(e,t){R(this,"tag",e),R(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},qd=class extends yi{constructor(){super("error",null)}},ko=class extends yi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Ce.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(H0(r),r),R(this,"address",e),R(this,"interface",t),R(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=qi(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Ao=class extends yi{constructor(e,t){super("*",{address:e}),R(this,"address",e),R(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},or=class{constructor(e,t,n){R(this,"interface",mt(new.target,"getInterface")(t)),n==null?(R(this,"provider",null),R(this,"signer",null)):Bt.isSigner(n)?(R(this,"provider",n.provider||null),R(this,"signer",n)):$t.isProvider(n)?(R(this,"provider",n),R(this,"signer",null)):Ce.throwArgumentError("invalid signer or provider","signerOrProvider",n),R(this,"callStatic",{}),R(this,"estimateGas",{}),R(this,"functions",{}),R(this,"populateTransaction",{}),R(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];R(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?R(this.filters,o,this.filters[l[0]]):Ce.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(R(this,"_runningEvents",{}),R(this,"_wrappedEmits",{}),e==null&&Ce.throwArgumentError("invalid contract address or ENS name","addressOrName",e),R(this,"address",e),this.provider)R(this,"resolvedAddress",_o(this.provider,e));else try{R(this,"resolvedAddress",Promise.resolve(pe(e)))}catch{Ce.throwError("provider is required to use ENS name as contract address",A.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Ce.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&R(this,s,U0(this,o,!0)),this.functions[s]==null&&R(this.functions,s,U0(this,o,!1)),this.callStatic[s]==null&&R(this.callStatic,s,j0(this,o,!0)),this.populateTransaction[s]==null&&R(this.populateTransaction,s,p5(this,o)),this.estimateGas[s]==null&&R(this.estimateGas,s,y5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&R(this,s,this[l])}catch{}this.functions[s]==null&&R(this.functions,s,this.functions[l]),this.callStatic[s]==null&&R(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&R(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&R(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return oi(e)}static getInterface(e){return Ea.isInterface(e)?e:new Ea(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ce.throwError("contract not deployed",A.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ce.throwError("sending a transactions require a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=ve(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ce.throwError("cannot override "+n,A.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new sa(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&R(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ra.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new qd);if(e==="event")return this._normalizeRunningEvent(new yi("event",null));if(e==="*")return this._normalizeRunningEvent(new Ao(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new ko(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new ko(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new yi(H0(t),t))}return this._normalizeRunningEvent(new Ao(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=ct(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Ce.throwError("events require a provider or a signer with a provider",A.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=ve(i.filter);return typeof t=="string"&&Z(t,32)?(n!=null&&Ce.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},ie=class extends or{},fi=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:on(t)?i=j(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!Z(i)||i.length%2)&&Ce.throwArgumentError("invalid bytecode","bytecode",t),n&&!Bt.isSigner(n)&&Ce.throwArgumentError("invalid signer","signer",n),R(this,"bytecode",i),R(this,"interface",mt(new.target,"getInterface")(e)),R(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=ve(e.pop());for(let n in t)if(!l5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ce.throwError("cannot override "+n,A.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!P.from(t.value).isZero()&&!this.interface.deploy.payable&&Ce.throwError("non-payable constructor cannot override value",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ce.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=j(de([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ra(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ce.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield Qr(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return V0(o,r),R(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ce.throwError("missing compiler output",A.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return ie.getInterface(e)}static getContractAddress(e){return oi(e)}static getContract(e,t,n){return new ie(e,t,n)}};var Eo=class{constructor(e){R(this,"alphabet",e),R(this,"base",e.length),R(this,"_alphabetMap",{}),R(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=b>>16&255,l[e.length+2]=b>>8&255,l[e.length+3]=b&255;let E=B(pa(i,a,l));r||(r=E.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(E);for(let I=1;I=256)throw new Error("Depth too large!");return Jy(le([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",V(this.depth),this.parentFingerprint,ce(V(this.index),4),this.chainCode,this.privateKey!=null?le(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(la,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~da));let n=new Uint8Array(37);if(e&da){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(B(this.privateKey),1),t&&(t+="'")}else n.set(B(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let r=B(pi($n.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Co(P.from(a).add(this.privateKey).mod(bb)):d=new fn(V(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(la,o,d,this.fingerprint,Co(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=da)throw new Error("invalid path index - "+a);n=n._derive(da+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=da)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=B(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=B(pi($n.sha512,xb,n));return new Ct(la,Co(r.slice(0,32)),null,"0x00000000",Co(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=Wl(n),e=hr(pa(e,n),n),Ct._fromSeed(Jl(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=di.decode(e);(t.length!==82||Jy(t.slice(0,78))!==e)&&Za.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=V(t.slice(5,9)),a=parseInt(V(t.slice(9,13)).substring(2),16),s=V(t.slice(13,45)),o=t.slice(45,78);switch(V(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(la,null,V(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(la,V(o.slice(1)),null,r,s,a,n,null)}return Za.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Jl(i,e){e||(e="");let t=xe("mnemonic"+e,Gt.NFKD);return fr(xe(i,Gt.NFKD),t,2048,64,"sha512")}function pa(i,e){e=Wl(e),Za.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=B(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=$y(s);if((B(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return V(n.slice(0,a/8))}function hr(i,e){if(e=Wl(e),i=B(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&gb(8-n)),n+=3);let r=i.length/4,a=B(Xt(i))[0]&$y(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function Qy(i,e){try{return pa(i,e),!0}catch{}return!1}function Xy(i){return(typeof i!="number"||i<0||i>=da||i%1)&&Za.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var Yy="random/5.7.0";var $l=new k(Yy);function Tb(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Zy=Tb(),Io=Zy.crypto||Zy.msCrypto;(!Io||!Io.getRandomValues)&&($l.warn("WARNING: Missing strong random number source"),Io={getRandomValues:function(i){return $l.throwError("no secure random source avaialble",k.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(i){(i<=0||i>1024||i%1||i!=i)&&$l.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return Io.getRandomValues(e),B(e)}function es(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var Yl=_n(Xl());var So="json-wallets/5.7.0";function ci(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),B(i)}function ya(i,e){for(i=String(i);i.length{D=B(D);let N=D.slice(0,16),F=D.slice(16,32),U=D.slice(32,64),G=new fi.default.Counter(x),q=new fi.default.ModeOfOperation.ctr(N,G),K=B(q.encrypt(r)),ye=de(le([F,K])),te={address:i.address.substring(2).toLowerCase(),id:tc(E),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:V(x).substring(2)},ciphertext:V(K).substring(2),kdf:"scrypt",kdfparams:{salt:V(c).substring(2),n:A,dklen:32,p:C,r:v},mac:ye.substring(2)}};if(s){let ie=Qn(16),Se=new fi.default.Counter(ie),ae=new fi.default.ModeOfOperation.ctr(U,Se),we=B(ae.encrypt(s)),M=new Date,u=M.getUTCFullYear()+"-"+ya(M.getUTCMonth()+1,2)+"-"+ya(M.getUTCDate(),2)+"T"+ya(M.getUTCHours(),2)+"-"+ya(M.getUTCMinutes(),2)+"-"+ya(M.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:V(ie).substring(2),mnemonicCiphertext:V(we).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(te)})}function dc(i,e,t){if(Ro(i)){t&&t(0);let n=ed(i,e);return t&&t(1),Promise.resolve(n)}return Po(i)?lc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function pc(i,e){if(Ro(i))return ed(i,e);if(Po(i))return uc(i,e);throw new Error("invalid JSON wallet")}var yc="wallet/5.7.0";var cc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ca=new k(yc);function kb(i){return i!=null&&Z(i.privateKey,32)&&i.address!=null}function Mb(i){let e=i.mnemonic;return e&&e.phrase}var In=class extends Bt{constructor(e,t){if(super(),kb(e)){let n=new fn(e.privateKey);if(R(this,"_signingKey",()=>n),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&ca.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Mb(e)){let r=e.mnemonic;R(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||yi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);mn(s.privateKey)!==this.address&&ca.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else R(this,"_mnemonic",()=>null)}else{if(fn.isSigningKey(e))e.curve!=="secp256k1"&&ca.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),R(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new fn(e);R(this,"_signingKey",()=>n)}R(this,"_mnemonic",()=>null),R(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&ca.throwArgumentError("invalid provider","provider",t),R(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new In(this,e)}signTransaction(e){return Ee(e).then(t=>{t.from!=null&&(pe(t.from)!==this.address&&ca.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(de($a(t)));return $a(t,n)})}signMessage(e){return cc(this,void 0,void 0,function*(){return Na(this._signingKey().signDigest(Qr(e)))})}_signTypedData(e,t,n){return cc(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,a=>(this.provider==null&&ca.throwError("cannot resolve ENS names without a provider",k.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Na(this._signingKey().signDigest(bt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),ad(this,e,t,n)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Me(de(le([t,e.extraEntropy])),0,16)));let n=hr(t,e.locale);return In.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return dc(e,t,n).then(r=>new In(r))}static fromEncryptedJsonSync(e,t){return new In(pc(e,t))}static fromMnemonic(e,t,n){return t||(t=yi),new In(Ct.fromMnemonic(e,null,n).derivePath(t))}};function fc(i,e){return pr(Qr(i),e)}function mc(i,e,t,n){return pr(bt.hash(i,e,t),n)}var Di={};Lr(Di,{AlchemyProvider:()=>ga,AlchemyWebSocketProvider:()=>ys,AnkrProvider:()=>cs,BaseProvider:()=>Yn,CloudflareProvider:()=>fs,EtherscanProvider:()=>ms,FallbackProvider:()=>bs,Formatter:()=>J,InfuraProvider:()=>va,InfuraWebSocketProvider:()=>gs,IpcProvider:()=>xd,JsonRpcBatchProvider:()=>Jo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>ba,NodesmithProvider:()=>Ts,PocketProvider:()=>vs,Provider:()=>$t,Resolver:()=>ha,StaticJsonRpcProvider:()=>ps,UrlJsonRpcProvider:()=>It,Web3Provider:()=>ws,WebSocketProvider:()=>bi,getDefaultProvider:()=>$o,getNetwork:()=>ns,isCommunityResourcable:()=>ud,isCommunityResource:()=>as,showThrottleMessage:()=>Xn});var hc="networks/5.7.1";var bc=new k(hc);function Eb(i){return i&&typeof i.renetwork=="function"}function mi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return mi(t)},e}function Oo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return Oo(i,n)},t}var xc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:mi("homestead")},gc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:mi("ropsten")},Tc={chainId:63,name:"classicMordor",_defaultProvider:Oo("https://www.ethercluster.com/mordor","classicMordor")},Do={unspecified:{chainId:0,name:"unspecified"},homestead:xc,mainnet:xc,morden:{chainId:2,name:"morden"},ropsten:gc,testnet:gc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:mi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:mi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:mi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:mi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Oo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Tc,classicTestnet:Tc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Oo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:mi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:mi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ns(i){if(i==null)return null;if(typeof i=="number"){for(let n in Do){let r=Do[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=Do[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Do[i.name];if(!e)return typeof i.chainId!="number"&&bc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&bc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(Eb(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var vc="web/5.7.1";var Cb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function wc(i,e){return Cb(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:B(new Uint8Array(r))}})}var Ib=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Sn=new k(vc);function _c(i){return new Promise(e=>{setTimeout(e,i)})}function Pi(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ti(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return V(i)}return i}function Sb(i){return xe(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function sd(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,x=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Sn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(x=i.timeout),i.headers)for(let N in i.headers)o[N.toLowerCase()]={key:N,value:String(i.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",k.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let N=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+$r(xe(N))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=Te(i.fetchOptions))}let E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),A=d?d.match(E):null;if(A)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]||"text/plain"},body:A[2]?Jr(A[3]):Sb(A[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){Sn.throwError("processing response error",k.errors.SERVER_ERROR,{body:Pi(A[1],A[2]),error:N,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(N=>{let F=o[N];v[F.key]=F.value}),p.headers=v;let C=function(){let N=null;return{promise:new Promise(function(G,q){x&&(N=setTimeout(()=>{N!=null&&(N=null,q(Sn.makeError("timeout",k.errors.TIMEOUT,{requestBody:Pi(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:d})))},x))}),cancel:function(){N!=null&&(clearTimeout(N),N=null)}}}(),D=function(){return Ib(this,void 0,void 0,function*(){for(let N=0;N=300)&&(C.cancel(),Sn.throwError("bad response",k.errors.SERVER_ERROR,{status:F.statusCode,headers:F.headers,body:Pi(U,F.headers?F.headers["content-type"]:null),requestBody:Pi(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let G=yield t(U,F);return C.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Sn.throwError("invalid JSON",k.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=xe(e);let a=typeof i=="string"?{url:i}:Te(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=Te(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return sd(i,r,n)}function Pn(i,e){return e||(e={}),e=Te(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(c){s()&&n(c)})}p()})}var yd=_n(Ec());var _e="providers/5.7.2";var rs=new k(_e),J=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:J.allowNull(this.accessList.bind(this),null),blockHash:J.allowNull(s,null),blockNumber:J.allowNull(d,null),transactionIndex:J.allowNull(d,null),confirmations:J.allowNull(d,null),from:t,gasPrice:J.allowNull(n),maxPriorityFeePerGas:J.allowNull(n),maxFeePerGas:J.allowNull(n),gasLimit:n,to:J.allowNull(t,null),value:n,nonce:d,data:a,r:J.allowNull(this.uint256),s:J.allowNull(this.uint256),v:J.allowNull(d),creates:J.allowNull(t,null),raw:J.allowNull(a)},e.transactionRequest={from:J.allowNull(t),nonce:J.allowNull(d),gasLimit:J.allowNull(n),gasPrice:J.allowNull(n),maxPriorityFeePerGas:J.allowNull(n),maxFeePerGas:J.allowNull(n),to:J.allowNull(t),value:J.allowNull(n),data:J.allowNull(c),type:J.allowNull(d),accessList:J.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:J.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:J.allowNull(this.address,null),from:J.allowNull(this.address,null),contractAddress:J.allowNull(t,null),transactionIndex:d,root:J.allowNull(o),gasUsed:n,logsBloom:J.allowNull(a),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:J.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:J.allowNull(n),status:J.allowNull(d),type:p},e.block={hash:J.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:J.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:J.allowNull(t),extraData:a,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(n)},e.blockWithTransactions=Te(e.block),e.blockWithTransactions.transactions=J.allowNull(J.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:J.allowNull(r,void 0),toBlock:J.allowNull(r,void 0),blockHash:J.allowNull(s,void 0),address:J.allowNull(t,void 0),topics:J.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:J.allowNull(d),blockHash:J.allowNull(s),transactionIndex:d,removed:J.allowNull(this.boolean.bind(this)),address:t,data:J.allowFalsish(a,"0x"),topics:J.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:P.from(e).toNumber()}type(e){return e==="0x"||e==null?0:P.from(e).toNumber()}bigNumber(e){return P.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),Z(e))?e.toLowerCase():rs.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Me(e,12));return t===Zs?null:t}contractAddress(e){return or(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Z(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Pt(n)!==32?rs.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=P.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!Z(e))throw new Error("invalid uint256");return ce(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=J.check(t,e);return r._difficulty=n==null?null:P.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return J.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&P.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=J.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Z(n)&&(n=P.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),Z(n)&&(n=P.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return wo(e)}receiptLog(e){return J.check(this.formats.receiptLog,e)}receipt(e){let t=J.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=P.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&rs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):rs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&rs.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return J.check(this.formats.filter,e)}filterLog(e){return J.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function ud(i){return i&&typeof i.isCommunityResource=="function"}function as(i){return ud(i)&&i.isCommunityResource()}var Cc=!1;function Xn(){Cc||(Cc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var se=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},fe=new k(_e),Lb=10;function Ic(i){return i==null?"null":(Pt(i)!==32&&fe.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function Sc(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[Ic(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Ic(e)}).join("&")}function Ub(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function ma(i){if(typeof i=="string"){if(i=i.toLowerCase(),Pt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+Sc(i);if(po.isForkEvent(i))throw fe.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+Sc(i.topics||[])}throw new Error("invalid event - "+i)}function ss(){return new Date().getTime()}function Rc(i){return new Promise(e=>{setTimeout(e,i)})}var jb=["block","network","pending","poll"],cd=class{constructor(e,t,n){R(this,"tag",e),R(this,"listener",t),R(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=Ub(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||jb.indexOf(this.tag)>=0}},Vb={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ld(i){return ce(P.from(i).toHexString(),32)}function Pc(i){return di.encode(le([i,Me(Xt(Xt(i)),0,4)]))}var Oc=new RegExp("^(ipfs)://(.*)$","i"),Nc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Oc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Uo(i,e){try{return Jt(os(i,e))}catch{}return null}function os(i,e){if(i==="0x")return null;let t=P.from(Me(i,e,e+32)).toNumber(),n=P.from(Me(i,t,t+32)).toNumber();return Me(i,t+32,t+32+n)}function dd(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):fe.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function Dc(i){let e=B(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Hb(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function Bc(i){let e=[],t=0;for(let n=0;nP.from(e).eq(1)).catch(e=>{if(e.code===k.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return se(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Mi(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",Bc([za(this.name),n.data])]));try{let a=yield this.provider.call(n);return B(a).length%32===4&&fe.throwError("resolver threw error",k.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=os(a,0)),a}catch(a){if(a.code===k.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return se(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?os(n,0):null})}_getAddress(e,t){let n=Vb[String(e)];if(n==null&&fe.throwError(`unsupported coin type: ${e}`,k.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=B(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return Pc(le([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return Pc(le([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=yd.default.toWords(r.slice(2));return o.unshift(s),yd.default.encode(n.prefix,o)}}return null}getAddress(e){return se(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Kr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===k.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",ld(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&fe.throwError("invalid or unsupported coin data",k.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return se(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return fe.throwError("invalid or unsupported content hash data",k.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return se(this,void 0,void 0,function*(){let t=xe(e);t=le([ld(64),ld(t.length),t]),t.length%32!==0&&(t=le([t,ce("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",V(t));return n==null||n==="0x"?null:Jt(n)})}},pd=null,qb=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),R(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ft(new.target,"getNetwork")(e);t?(R(this,"_network",t),this.emit("network",t,null)):fe.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return se(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||fe.throwError("no network detected",k.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:R(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===k.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return pd==null&&(pd=new J),pd}static getNetwork(e){return ns(e??"homestead")}ccipReadFetch(e,t,n){return se(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),x=yield Rn({url:p,errorPassThrough:!0},c,(A,v)=>(A.status=v.statusCode,A));if(x.data)return x.data;let E=x.message||"unknown error";if(x.status>=400&&x.status<500)return fe.throwError(`response not found during CCIP fetch: ${E}`,k.errors.SERVER_ERROR,{url:d,errorMessage:E});s.push(E)}return fe.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,k.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return se(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(ss()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=ss(),n=Ee({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=ss();return r=P.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return se(this,void 0,void 0,function*(){let e=qb++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)fe.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",fe.makeError("network block skew detected",k.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return se(this,void 0,void 0,function*(){return fe.throwError("provider does not support network detection",k.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return se(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Rc(0),this._network;let n=fe.makeError("underlying network changed",k.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ss();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return se(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return se(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(E=>{E()}),!1)},x=E=>{E.confirmations{this.removeListener(e,x)}),r){let E=r.startBlock,A=null,v=C=>se(this,void 0,void 0,function*(){p||(yield Rc(1e3),this.getTransactionCount(r.from).then(D=>se(this,void 0,void 0,function*(){if(!p){if(D<=r.nonce)E=C;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(A==null&&(A=E-3,A{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let E=setTimeout(()=>{c()||o(fe.makeError("timeout exceeded",k.errors.TIMEOUT,{timeout:n}))},n);E.unref&&E.unref(),d.push(()=>{clearTimeout(E)})}})})}getBlockNumber(){return se(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return se(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return P.from(e)}catch(t){return fe.throwError("bad result from backend",k.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ee({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return P.from(r)}catch(a){return fe.throwError("bad result from backend",k.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ee({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return P.from(r).toNumber()}catch(a){return fe.throwError("bad result from backend",k.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ee({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return V(r)}catch(a){return fe.throwError("bad result from backend",k.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return se(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ee({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Fn(s))}),a=yield this.perform("getStorageAt",r);try{return V(a)}catch(s){return fe.throwError("bad result from backend",k.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&fe.throwError("Transaction hash mismatch from Provider.sendTransaction.",k.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>se(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&fe.throwError("transaction failed",k.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return se(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>V(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return se(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?P.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?V(a):null))}),this.formatter.transactionRequest(yield Ee(n))})}_getFilter(e){return se(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ee(t))})}_call(e,t,n){return se(this,void 0,void 0,function*(){n>=Lb&&fe.throwError("CCIP read exceeded maximum redirections",k.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Pt(a)%32===4)try{let s=Me(a,4),o=Me(s,0,32);P.from(o).eq(r)||fe.throwError("CCIP Read sender did not match",k.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=P.from(Me(s,32,64)).toNumber(),c=P.from(Me(s,p,p+32)).toNumber(),x=Me(s,p+32);for(let N=0;Nse(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>se(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>se(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return se(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ee({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return se(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return se(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&fe.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return se(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new ha(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return se(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||fe.throwError("network does not support ENS",k.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Mi(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return se(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Z(e))throw n}typeof e!="string"&&fe.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return se(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=Uo(yield this.call({to:n,data:"0x691f3431"+Mi(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return se(this,void 0,void 0,function*(){let t=null;if(Z(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new ha(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==k.errors.CALL_EXCEPTION)throw o}try{let o=Uo(yield this.call({to:s,data:"0x691f3431"+Mi(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==k.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return fe.throwError(e+" not implemented",k.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new cd(ma(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=ma(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=ma(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=ma(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=ma(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=ma(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var hi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new k(_e),Gb=["call","estimateGas"];function ls(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=Z(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=ls(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return ls(JSON.parse(i),e)}catch{}return null}function Lc(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=ls(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",k.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=ls(e.body,!1);a==null&&(a=ls(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",k.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===k.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",k.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",k.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",k.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",k.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),Gb.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",k.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function Fc(i){return new Promise(function(e){setTimeout(e,i)})}function zb(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function us(i){return i&&i.toLowerCase()}var fd={},ba=class extends Bt{constructor(e,t,n){if(super(),e!==fd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),n==null&&(n=0),typeof n=="string"?(R(this,"_address",this.provider.formatter.address(n)),R(this,"_index",null)):typeof n=="number"?(R(this,"_index",n),R(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",k.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new md(fd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,k.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Te(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=Te(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>hi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ee({tx:Ee(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",k.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Lc("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",k.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return hi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>hi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return hi(this,void 0,void 0,function*(){let t=typeof e=="string"?xe(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[V(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",k.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return hi(this,void 0,void 0,function*(){let t=typeof e=="string"?xe(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),V(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",k.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return hi(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(bt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",k.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return hi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},md=class extends ba{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},Kb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=ft(this.constructor,"defaultUrl")()),typeof e=="string"?R(this,"connection",Object.freeze({url:e})):R(this,"connection",Object.freeze(Te(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return hi(this,void 0,void 0,function*(){yield Fc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ft(this.constructor,"getNetwork");try{return t(P.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",k.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",k.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new ba(fd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Rn(this.connection,JSON.stringify(n),zb).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[us(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[us(t.address),t.blockTag]];case"getCode":return["eth_getCode",[us(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[us(t.address),ce(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=us(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return hi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&P.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=Te(t),t.transaction=Te(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",k.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return Lc(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return Fc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=Te(Kb);if(t)for(let a in t)t[a]&&(n[a]=!0);Vr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Fn(P.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=V(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var xa=null;try{if(xa=WebSocket,xa==null)throw new Error("inject please")}catch{let e=new k(_e);xa=function(){e.throwError("WebSockets not supported in this environment",k.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var hd=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},jo=new k(_e),Wb=1,bi=class extends Yt{constructor(e,t){t==="any"&&jo.throwError("WebSocketProvider does not support 'any' network yet",k.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?R(this,"_websocket",new xa(this.connection.url)):R(this,"_websocket",e),R(this,"_requests",{}),R(this,"_subs",{}),R(this,"_subIds",{}),R(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),R(p,"code",s.error.code||null),R(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){jo.throwError("cannot reset events block on WebSocketProvider",k.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){jo.throwError("cannot set polling interval on WebSocketProvider",k.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return hd(this,void 0,void 0,function*(){return null})}set polling(e){!e||jo.throwError("cannot set polling on WebSocketProvider",k.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=Wb++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return hd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=P.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return hd(this,void 0,void 0,function*(){this.websocket.readyState===xa.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var Jb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ds=new k(_e),ps=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Jb(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ds.throwError("no network detected",k.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ps{constructor(e,t){ds.checkAbstract(new.target,It),e=ft(new.target,"getNetwork")(e),t=ft(new.target,"getApiKey")(t);let n=ft(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{R(this,r,t[r])})}_startPending(){ds.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ds.throwError("API provider does not support signing",k.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ds.throwError("not implemented; sub-classes must override getUrl",k.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Uc=new k(_e),Vo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ys=class extends bi{constructor(e,t){let n=new ga(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),R(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Vo}},ga=class extends It{static getWebSocketProvider(e,t){return new ys(e,t)}static getApiKey(e){return e==null?Vo:(e&&typeof e!="string"&&Uc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Uc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===Vo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Vo}};var $b=new k(_e),Ho="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Qb(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return $b.throwArgumentError("unsupported network","name",i)}var cs=class extends It{isCommunityResource(){return this.apiKey===Ho}static getApiKey(e){return e??Ho}static getUrl(e,t){t==null&&(t=Ho);let n={allowGzip:!0,url:"https://"+Qb(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Ho&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var Xb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},jc=new k(_e),fs=class extends It{static getApiKey(e){return e!=null&&jc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:jc.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Xb(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var qo=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ni=new k(_e);function Vc(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Fn(V(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=V(n),e[t]=n)}return e}function Yb(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function Hc(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function qc(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function bd(i,e,t){if(i==="call"&&e.code===k.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),Z(a))return a;Ni.throwError("missing revert data in call exception",k.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===k.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Ni.throwError("insufficient funds for intrinsic transaction cost",k.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ni.throwError("nonce has already been used",k.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Ni.throwError("replacement fee too low",k.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Ni.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",k.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var ms=class extends Yn{constructor(e,t){super(e),R(this,"baseUrl",this.getBaseUrl()),R(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Ni.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return qo(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?Hc:Yb;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Rn(o,d,s||Hc);return this.emit("debug",{action:"response",request:r,response:ct(p),provider:this}),p})}detectNetwork(){return qo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return qo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>bd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=Vc(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return bd("call",a,t.transaction)}}case"estimateGas":{let r=Vc(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return bd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=qc(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=qc(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ni.throwError("unsupported topic count",k.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ni.throwError("unsupported topic format",k.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Ko=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function d(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},br=new k(_e);function Go(){return new Date().getTime()}function Gc(i){let e=null;for(let t=0;te?null:(n+r)/2}function Ta(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(P.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Ta(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Ta(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var Zb=1;function Kc(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var e5=[k.errors.CALL_EXCEPTION,k.errors.INSUFFICIENT_FUNDS,k.errors.NONCE_EXPIRED,k.errors.REPLACEMENT_UNDERPRICED,k.errors.UNPREDICTABLE_GAS_LIMIT],t5=["address","args","errorArgs","errorSignature","method","transaction"];function zo(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function n5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function i5(i,e,t){let n=Ta;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=zc(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return zc(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=Te(r),r.confirmations=-1,Ta(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=Te(r),r.transactions=r.transactions.map(a=>(a=Te(a),a.confirmations=-1,a)),Ta(r))}:n=function(r){return r==null?null:Ta(r)};break;default:throw new Error("unknown method: "+e)}return n5(n,i.quorum)}function hs(i,e){return Ko(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function r5(i,e,t,n){return Ko(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Z(n.blockTag)&&(r=yield hs(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Z(n.blockTag)&&(r=yield hs(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Z(n.blockTag)&&(r=yield hs(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Z(n.blockTag)&&(r=yield hs(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&Z(a.fromBlock)||a.toBlock&&Z(a.toBlock))&&(r=yield hs(i,e)),r.getLogs(a)}}return br.throwError("unknown method error",k.errors.UNKNOWN_ERROR,{method:t,params:n})})}var bs=class extends Yn{constructor(e,t){e.length===0&&br.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=as(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=Te(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=as(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&br.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&br.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=Gc(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),R(this,"providerConfigs",Object.freeze(n)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Ko(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return Gc(e)})}perform(e,t){return Ko(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=Go(),p=r.filter(A=>A.runner&&d-A.startA+v.weight,0);for(;p{A.staller=null}),A.runner=r5(A,a,e,t).then(C=>{A.done=!0,A.result=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(A,Go()),request:{method:e,params:ct(t)},provider:this})},C=>{A.done=!0,A.error=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(A,Go()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(A,null),request:{method:e,params:ct(t)},provider:this}),p+=A.weight}let c=[];r.forEach(A=>{A.done||!A.runner||(c.push(A.runner),A.staller&&c.push(A.staller.getPromise()))}),c.length&&(yield Promise.race(c));let x=r.filter(A=>A.done&&A.error==null);if(x.length>=this.quorum){let A=n(x);if(A!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),A;o||(yield Kc(100).getPromise()),o=!1}let E=r.reduce((A,v)=>{if(!v.done||v.error==null)return A;let C=v.error.code;return e5.indexOf(C)>=0&&(A[C]||(A[C]={error:v.error,weight:0}),A[C].weight+=v.weight),A},{});if(Object.keys(E).forEach(A=>{let v=E[A];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let C=v.error,D={};t5.forEach(N=>{C[N]!=null&&(D[N]=C[N])}),br.throwError(C.reason||C.message,A,D)}),r.filter(A=>!A.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),br.throwError("failed to meet quorum",k.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>zo(d)),provider:this})})}};var xd=null;var Wo=new k(_e),xs="84842078b09946638c03157f83405213",gs=class extends bi{constructor(e,t){let n=new va(e,t),r=n.connection;r.password&&Wo.throwError("INFURA WebSocket project secrets unsupported",k.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),R(this,"apiKey",n.projectId),R(this,"projectId",n.projectId),R(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===xs}},va=class extends It{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){let t={apiKey:xs,projectId:xs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Wo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Wo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Wo.throwError("unsupported network",k.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===xs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===xs}};var Jo=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let x=d[c];if(x.error){let E=new Error(x.error.message);E.code=x.error.code,E.data=x.error.data,p.reject(E)}else p.resolve(x.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var gd=new k(_e),a5="ETHERS_JS_SHARED",Ts=class extends It{static getApiKey(e){return e&&typeof e!="string"&&gd.throwArgumentError("invalid apiKey","apiKey",e),e||a5}static getUrl(e,t){gd.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:gd.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var Wc=new k(_e),Jc="62e1ad51b37b8e00394bda3b",vs=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Jc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Wc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:Wc.throwError("unsupported network",k.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===Jc}};var $c=new k(_e),s5=1;function Qc(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:s5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function o5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var ws=class extends Yt{constructor(e,t){e==null&&$c.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=o5(e)):e.sendAsync?r=Qc(e,e.sendAsync.bind(e)):e.send?r=Qc(e,e.send.bind(e)):$c.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),R(this,"jsonRpcFetchFunc",r),R(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Xc=new k(_e);function $o(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new bi(i);default:Xc.throwArgumentError("unsupported URL scheme","network",i)}}let t=ns(i);return(!t||!t._defaultProvider)&&Xc.throwError("unsupported getDefaultProvider network",k.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:bs,AlchemyProvider:ga,AnkrProvider:cs,CloudflareProvider:fs,EtherscanProvider:ms,InfuraProvider:va,JsonRpcProvider:Yt,NodesmithProvider:Ts,PocketProvider:vs,Web3Provider:ws,IpcProvider:null},e)}var Y={};Lr(Y,{AbiCoder:()=>Wr,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>he,Fragment:()=>qt,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>ai,Interface:()=>Ei,LogDescription:()=>Xr,Logger:()=>k,ParamType:()=>lt,RLP:()=>zs,SigningKey:()=>fn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yr,TransactionTypes:()=>vo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ro,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>sd,_toEscapedUtf8String:()=>pl,accessListify:()=>sn,arrayify:()=>B,base58:()=>di,base64:()=>bl,checkProperties:()=>Vr,checkResultErrors:()=>qr,commify:()=>sf,computeAddress:()=>mn,computeHmac:()=>pi,computePublicKey:()=>Ja,concat:()=>le,deepCopy:()=>ct,defaultAbiCoder:()=>qa,defaultPath:()=>yi,defineReadOnly:()=>R,dnsEncode:()=>za,entropyToMnemonic:()=>hr,fetchJson:()=>Rn,formatBytes32String:()=>yl,formatEther:()=>of,formatUnits:()=>Td,getAccountPath:()=>Xy,getAddress:()=>pe,getContractAddress:()=>or,getCreate2Address:()=>p0,getIcapAddress:()=>d0,getJsonWalletAddress:()=>td,getStatic:()=>ft,hashMessage:()=>Qr,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Me,hexStripZeros:()=>el,hexValue:()=>Fn,hexZeroPad:()=>ce,hexlify:()=>V,id:()=>nn,isAddress:()=>l0,isBytes:()=>on,isBytesLike:()=>ti,isHexString:()=>Z,isValidMnemonic:()=>Qy,isValidName:()=>gl,joinSignature:()=>Na,keccak256:()=>de,mnemonicToEntropy:()=>pa,mnemonicToSeed:()=>Jl,namehash:()=>Mi,nameprep:()=>hl,parseBytes32String:()=>cl,parseEther:()=>uf,parseTransaction:()=>wo,parseUnits:()=>vd,poll:()=>Pn,randomBytes:()=>Qn,recoverAddress:()=>pr,recoverPublicKey:()=>To,resolveProperties:()=>Ee,ripemd160:()=>Xa,serializeTransaction:()=>$a,sha256:()=>Xt,sha512:()=>Gl,shallowCopy:()=>Te,shuffled:()=>es,solidityKeccak256:()=>ef,solidityPack:()=>Qo,soliditySha256:()=>tf,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>xe,toUtf8CodePoints:()=>ki,toUtf8String:()=>Jt,verifyMessage:()=>fc,verifyTypedData:()=>mc,zeroPad:()=>ir});var Yc="solidity/5.7.0";var u5=new RegExp("^bytes([0-9]+)$"),l5=new RegExp("^(u?int)([0-9]*)$"),d5=new RegExp("^(.*)\\[([0-9]*)\\]$"),p5="0000000000000000000000000000000000000000000000000000000000000000",wa=new k(Yc);function Zc(i,e,t){switch(i){case"address":return t?ir(e,32):B(e);case"string":return xe(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ir(e,32):B(e)}let n=i.match(l5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&wa.throwArgumentError("invalid number type","type",i),t&&(r=256),e=P.from(e).toTwos(r),ir(e,r/8)}if(n=i.match(u5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&wa.throwArgumentError("invalid bytes type","type",i),B(e).byteLength!==r&&wa.throwArgumentError(`invalid value for ${i}`,"value",e),t?B((e+p5).substring(0,66)):e}if(n=i.match(d5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&wa.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(Zc(r,o,!0))}),le(s)}return wa.throwArgumentError("invalid type","type",i)}function Qo(i,e){i.length!=e.length&&wa.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(Zc(n,e[r]))}),V(le(t))}function ef(i,e){return de(Qo(i,e))}function tf(i,e){return Xt(Qo(i,e))}var nf="units/5.7.0";var rf=new k(nf),af=["wei","kwei","mwei","gwei","szabo","finney","ether"];function sf(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&rf.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Td(i,e){if(typeof e=="string"){let t=af.indexOf(e);t!==-1&&(e=3*t)}return jr(i,e??18)}function vd(i,e){if(typeof i!="string"&&rf.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=af.indexOf(e);t!==-1&&(e=3*t)}return ln(i,e??18)}function of(i){return Td(i,18)}function uf(i){return vd(i,18)}var Xo="ethers/5.7.2";var lf=new k(Xo);try{let i=window;i._ethers==null&&(i._ethers=wd)}catch{}var xi;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(xi||(xi={}));var _d;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(_d||(_d={}));var _s;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(_s||(_s={}));var Ad;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(Ad||(Ad={}));var As;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(As||(As={}));var kd;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(kd||(kd={}));var Md;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Md||(Md={}));var Ed;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Ed||(Ed={}));var ve;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(ve||(ve={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var Id="0x12345678",Cd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Cd||(Cd={}));var Tt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Tt||(Tt={}));var ge;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ge||(ge={}));var Sd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],xr=class{static createInterface(){return new Y.Interface(Sd)}static connect(e,t){return new re(e,Sd,t)}};Mt(xr,"abi",Sd);var Rd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],gr=class{static createInterface(){return new Y.Interface(Rd)}static connect(e,t){return new re(e,Rd,t)}};Mt(gr,"abi",Rd);var df=(i,e)=>{throw new Error(`${e}: ${i}`)},Pd=i=>i!=null;var{keccak256:c5,toUtf8Bytes:f5}=Y,{MaxUint256:m5}=mt;var Nd=i=>Y.formatEther(i);var Dd=i=>{let e=i.reduce((t,n)=>t|1<{let e=P.from(i);return[...Array(Tt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Pd)},Tr=async(i,e,t,n)=>{if(P.from(t).eq(P.from(n)))return m5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return P.from(o)},Oi=i=>c5(f5(i));var _a=async(i,e)=>(await gr.connect(i,e).version()).toNumber(),Od=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Pd);var{hexDataSlice:Bd}=Y,{MaxUint256:h5}=mt,pf=i=>{let e=Bd(i,0,3),t=P.from(Bd(i,4,35)),n=P.from(Bd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},yf=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[P.from(t),h5,a];let o=P.from(ve.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await Tr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},b5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>yf(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?Zn(i,e,t,n[0],r):b5(i,e,t,n,r):yf(i,e,t,n,r);var{MaxUint256:cf}=mt,{AddressZero:x5}=mt;async function g5(i,e){let t;try{return t=await i.getCapabilityRoles(Y.hexZeroPad(e,4)),Yo(t)}catch{return[]}}async function ks(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:x}=pf(s),E=xr.connect(a,n.signer||n.provider),A=await g5(E,p);if(A.includes(Tt.Root)||A.length===0){if(!P.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ve.RootDomain}`);o=cf}else{let{skillId:F}=await e.getDomain(c),U=await i.getChildSkillId(F,x);if(U.eq(d))o=cf;else{let{children:G}=await i.getSkill(d),q=G.findIndex(K=>K.eq(U));if(q<0)throw new Error(`Could not find ${U} as a child of ${d}`);o=P.from(q)}}let{key:v,value:C,branchMask:D,siblings:N}=await t.getReputationWithProofs(d,x5);return{actionCid:o,key:v,value:C,branchMask:D,siblings:N}}var{AddressZero:T5}=mt,ei=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||xi.Gnosis;this.endpointUrl=n?.customEndpointUrl||_s[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(P.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=P.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ei.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=P.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ei.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ei.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,x=await this.colony.getDomain(c);return{domainId:c,skillId:x.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:x})=>x===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?P.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=P.from(e||0).toString(),a=`${n}/${r}`;return ei.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=P.from(e||0).toString(),a=`${n}/${r}/${T5}/noProof`,s=await ei.fetchReputation(a);return{...s,reputationAmount:P.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(P.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var ff=10,K7=wt(ff),mf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},hf=ff-1;var bf=6,$7=wt(bf),xf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},gf=bf-1;var Tf=7,Y7=wt(Tf),vf={1:[],2:[],3:[],4:[],5:[],6:[]},wf=Tf-1;var _f=7,tA=wt(_f),Af={1:[],2:[],3:[],4:[],5:[],6:[]},kf=_f-1;var Mf=4,rA=wt(Mf),Ef={1:[],2:[],3:[]},Cf=Mf-1;var If=5,oA=wt(If),Sf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Rf=If-1;var Pf=2,dA=wt(Pf),Nf={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Df=Pf-1;var Of=4,cA=wt(Of),Bf={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Ff=Of-1;var Lf=7,hA=wt(Lf),Uf={1:[],2:[],3:[],4:[],5:[],6:[]},jf=Lf-1;var Vf=11,gA=wt(Vf),Fd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Ld=Vf-1;var Hf=6,wA=wt(Hf),qf={1:[],2:[],3:[],4:[],5:[]},Gf=Hf-1;var Bi=(i,e,t)=>{switch(i){case ge.CoinMachine:{let n=mf[e];return!!n&&!n.includes(t)}case ge.EvaluatedExpenditure:{let n=xf[e];return!!n&&!n.includes(t)}case ge.FundingQueue:{let n=vf[e];return!!n&&!n.includes(t)}case ge.IVotingReputation:{let n=Fd[e];return!!n&&!n.includes(t)}case ge.OneTxPayment:{let n=Af[e];return!!n&&!n.includes(t)}case ge.ReputationBootstrapper:{let n=Ef[e];return!!n&&!n.includes(t)}case ge.StagedExpenditure:{let n=Nf[e];return!!n&&!n.includes(t)}case ge.StakedExpenditure:{let n=Sf[e];return!!n&&!n.includes(t)}case ge.StreamingPayments:{let n=Bf[e];return!!n&&!n.includes(t)}case ge.TokenSupplier:{let n=Uf[e];return!!n&&!n.includes(t)}case ge.VotingReputation:{let n=Fd[e];return!!n&&!n.includes(t)}case ge.Whitelist:{let n=qf[e];return!!n&&!n.includes(t)}default:return df(i,"Could not find extension with name")}};var v5={[ge.CoinMachine]:hf,[ge.EvaluatedExpenditure]:gf,[ge.FundingQueue]:wf,[ge.IVotingReputation]:Ld,[ge.OneTxPayment]:kf,[ge.ReputationBootstrapper]:Cf,[ge.StagedExpenditure]:Df,[ge.StakedExpenditure]:Rf,[ge.StreamingPayments]:Ff,[ge.TokenSupplier]:jf,[ge.VotingReputation]:Ld,[ge.Whitelist]:Gf};var dh=_n(zf(),1);var D1=_n(lh(),1);var dt;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(dt||(dt={}));var rp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(rp||(rp={}));var Xk=(0,dh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),ap={[dt.Annotation]:"Annotation(address,bytes32,string)",[dt.Colony]:"ColonyMetadata(address,string)",[dt.Decision]:"Annotation(address,bytes32,string)",[dt.Domain]:"DomainMetadata(address,uint256,string)",[dt.Misc]:"",[dt.DEFAULT]:""};var Zk=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var sp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new Y.Interface(sp)}static connect(e,t){return new re(e,sp,t)}};Mt(Tn,"abi",sp);var op=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new Y.Interface(op)}static connect(e,t){return new re(e,op,t)}};Mt(vn,"abi",op);var up=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Mr=class{static createInterface(){return new Y.Interface(up)}static connect(e,t){return new re(e,up,t)}};Mt(Mr,"abi",up);var Pu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],yh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",U1=i=>i.length>1,Nn=class extends cr{constructor(...e){U1(e)?super(...e):super(Pu,yh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Y.Interface(Pu)}static connect(e,t){return new re(e,Pu,t)}};Mt(Nn,"bytecode",yh),Mt(Nn,"abi",Pu);var lp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Er=class{static createInterface(){return new Y.Interface(lp)}static connect(e,t){return new re(e,lp,t)}};Mt(Er,"abi",lp);var Ca;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Ca||(Ca={}));var wn;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(wn||(wn={}));var{AddressZero:fh}=mt;async function H1(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var q1=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Nn.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await H1(t)}catch{n=!1}try{await t.getMetatransactionNonce(fh)}catch{r=!1}try{await t.nonces(fh)}catch{a=!1}return n?r?t.tokenClientType=wn.Colony:(t=Er.connect(i,e),t.tokenClientType=wn.ColonyLegacy):a?(t=vn.connect(i,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(i,e),t.tokenClientType=wn.Erc20),t.clientType=Ca.TokenClient,t},dp=q1;var{AddressZero:pp}=mt,z1=Tn.connect(pp,new Di.BaseProvider(3656691)).interface,K1=Mr.connect(pp,new Di.BaseProvider(3656691)).interface,W1=vn.connect(pp,new Di.BaseProvider(3656691)).interface;var yp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ns=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new re(e,yp,t)}};Ns.abi=yp;var cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ds=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new re(e,cp,t)}};Ds.abi=cp;var fp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Ia=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new re(e,fp,t)}};Ia.abi=fp;var Cr=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,ap[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Od(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:$1,solidityKeccak256:Q1,splitSignature:X1}=Y,Sa=class extends Cr{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===xi.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=Q1(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=$1(d),c=await n.signMessage(p),{r:x,s:E,v:A}=X1(c),v={target:t,payload:e,userAddress:s,r:x,s:E,v:A};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ee=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Nu=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ve.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ir=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new re(e,mp,t)}};Ir.abi=mp;var hp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Sr=class{static createInterface(){return new Y.Interface(hp)}static connect(e,t){return new re(e,hp,t)}};Sr.abi=hp;var bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Rr=class{static createInterface(){return new Y.Interface(bp)}static connect(e,t){return new re(e,bp,t)}};Rr.abi=bp;var xp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Pr=class{static createInterface(){return new Y.Interface(xp)}static connect(e,t){return new re(e,xp,t)}};Pr.abi=xp;var gp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Nr=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new re(e,gp,t)}};Nr.abi=gp;var Tp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Dr=class{static createInterface(){return new Y.Interface(Tp)}static connect(e,t){return new re(e,Tp,t)}};Dr.abi=Tp;var{AddressZero:rx}=mt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oi(Dn.extensionType),e.address);if(t===rx)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let n=await _a(t,e.colonyNetwork.signerOrProvider);if(!Bi(Dn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Dn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Dn(e,a,n)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||ve.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((A,v)=>a[A].localeCompare(a[v]));let c=p.map(A=>a[A]),x=p.map(A=>d[A]),E=p.map(A=>o[A]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[A,v]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding],this.oneTxPaymentContract.address),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding]);return[A,v,C,D,c,E,x,s,ve.SkillIgnore]},async A=>({...ee("OneTxPaymentMade",A)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oi(ge.OneTxPayment),t],async n=>({...ee("ExtensionUpgraded",n)}))}},Ui=Dn;Ui.supportedVersions=[{version:3,factory:Pr},{version:4,factory:Nr},{version:5,factory:Dr}],Ui.extensionType=ge.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ee("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ee("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ee("Approval",n)}))}};var Os=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Nn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ee("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ee("LogSetOwner",n)}))}};var Bs=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ee("Approval",r)}))}};var mh=async(i,e)=>{let t=await dp(e,i.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Os(i,t);case wn.Erc20:return new On(i,t);case wn.Erc2612:return new Bs(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Or=class{static createInterface(){return new Y.Interface(vp)}static connect(e,t){return new re(e,vp,t)}};Or.abi=vp;var wp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Br=class{static createInterface(){return new Y.Interface(wp)}static connect(e,t){return new re(e,wp,t)}};Br.abi=wp;var _p=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fr=class{static createInterface(){return new Y.Interface(_p)}static connect(e,t){return new re(e,_p,t)}};Fr.abi=_p;var{AddressZero:Ap}=mt;var Du=P.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oi(Bn.extensionType),e.address);if(t===Ap)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await _a(t,e.colonyNetwork.signerOrProvider);if(!Bi(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,a,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=P.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return Y.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ee("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await ks(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Ap,Id);return[e,t,Ap,Id,n,r,a,s]},async t=>({...ee("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(dt.Decision,t),[e,n]},async n=>({...ee("Annotation",n)}),{metadataType:dt.Decision})}approveStake(e,t=ve.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Nu("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let E=await this.getMinStake(o,t);if(P.from(n).lt(E))throw new Error(`The staked amount is too small. Please stake at least ${Nd(E)}`);let{domainId:A,rootHash:v}=await this.getMotion(e),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),A,Tt.Arbitration,this.address),{skillId:N}=await this.colony.getTeam(A),{key:F,value:U,branchMask:G,siblings:q}=await this.colony.reputation.getReputationWithProofs(N,a,v);return[e,C,D,P.from(t),n,F,U,G,q]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ee("MotionStaked",a),...ee("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:x,siblings:E}=await this.colony.reputation.getReputationWithProofs(o,d,s),A=await this.createMotionSalt(e),v=Y.solidityKeccak256(["bytes","uint256"],[A,t]);return[e,v,p,c,x,E]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ee("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,c,p);if(!x)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:E,value:A,branchMask:v,siblings:C}=p;return[e,c,P.from(x),E,A,v,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ee("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Tr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:x,branchMask:E,siblings:A}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,x,E,A]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ee("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ee("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oi(ge.VotingReputation),t],async n=>({...ee("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},ji=Bn;ji.supportedVersions=[{version:7,factory:Or},{version:8,factory:Br},{version:9,factory:Fr}],ji.extensionType=ge.VotingReputation;var ux={["motion"]:ji,["oneTx"]:Ui},Pa=class{static async connect(e,t){let n=await _a(t,e.signerOrProvider),r=Pa.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await mh(e,s),d=new Pa(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return Pa.supportedVersions[Pa.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ei(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Ra({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Ra({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ji.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ui.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(dt.Colony,e),[t]},async t=>({...ee("ColonyMetadata",t)}),{metadataType:dt.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(dt.Domain,e),[ve.RootDomain,t]},{roles:Tt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:dt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ve.RootDomain],{roles:Tt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(dt.Domain,e),[ve.RootDomain,t]},{roles:Tt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainMetadata",t)}),{metadataType:dt.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Tt.Architecture,domain:e},async n=>({...ee("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ee("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=ve.RootDomain,s=n||ve.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${P.from(t).toString()} does not exist`);let[p,c]=await Zn(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Tt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),E=await Tr(x,this.colony,a,s),A=await Tr(x,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:C}=await this.colony.getDomain(t);return[p,c,a,E,A,v,C,e,o]},async d=>({...ee("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=ve.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=ve.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ee("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(dt.Annotation,t),[e,n]},async n=>({...ee("Annotation",n)}),{metadataType:dt.Annotation})}installExtension(e){let t=ux[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Bi(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oi(r),t.getLatestSupportedVersion()],async s=>({...Nu("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=ve.RootDomain){let n=await this.colony.getUserRoles(e,t);return Yo(n)}setRoles(e,t,n=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=Dd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ee("ColonyRoleSet",r),...ee("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Dd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ee("ColonyRoleSet",r),...ee("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ee("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ee("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ee("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ee("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ee("ColonyUpgraded",n)}))}awardReputation(e,t,n=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ee("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,P.from(0).sub(t)],{domain:n,roles:Tt.Arbitration},async r=>({...ee("ArbitraryReputationUpdate",r)}))}},Fs=Pa;Fs.supportedVersions=[{version:11,factory:Ir},{version:12,factory:Sr},{version:13,factory:Rr}];var{splitSignature:MS}=Y;var{namehash:WS}=Y,{AddressZero:JS}=mt;var dx=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x64",chainName:"Gnosis Chain via Colony",nativeCurrency:{name:"xDAI",symbol:"XDAI",decimals:18},rpcUrls:[As.Gnosis],blockExplorerUrls:["https://blockscout.com/xdai/mainnet"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",dx);})(); +`)}static register(e,t){if(t||(t=e.locale),m5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||R(n._ethers.wordlists,t,e))}catch{}}};var h5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",Yr=null;function W0(a){if(Yr==null&&(Yr=h5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Yr=null,new Error("BIP39 Wordlist for en (English) FAILED")}var zd=class extends hn{constructor(){super("en")}getWord(e){return W0(this),Yr[e]}getWordIndex(e){return W0(this),Yr.indexOf(e)}},Wd=new zd;hn.register(Wd);var mi={en:Wd};var K0="hdnode/5.7.0";var Zr=new A(K0),x5=P.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b5=ge("Bitcoin seed"),lr=2147483648;function $0(a){return(1<=256)throw new Error("Depth too large!");return J0(de([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",j(this.depth),this.parentFingerprint,fe(j(this.index),4),this.chainCode,this.privateKey!=null?de(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(dr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~lr));let n=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(B(this.privateKey),1),t&&(t+="'")}else n.set(B(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let i=B(pa($n.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Io(P.from(r).add(this.privateKey).mod(x5)):l=new cn(j(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(dr,o,l,this.fingerprint,Io(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=lr)throw new Error("invalid path index - "+r);n=n._derive(lr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=lr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=B(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=B(pa($n.sha512,b5,n));return new It(dr,Io(i.slice(0,32)),null,"0x00000000",Io(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=Kd(n),e=hi(pr(e,n),n),It._fromSeed(Jd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=la.decode(e);(t.length!==82||J0(t.slice(0,78))!==e)&&Zr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=j(t.slice(5,9)),r=parseInt(j(t.slice(9,13)).substring(2),16),s=j(t.slice(13,45)),o=t.slice(45,78);switch(j(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(dr,null,j(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(dr,j(o.slice(1)),null,i,s,r,n,null)}return Zr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Jd(a,e){e||(e="");let t=ge("mnemonic"+e,Gt.NFKD);return ci(ge(a,Gt.NFKD),t,2048,64,"sha512")}function pr(a,e){e=Kd(e),Zr.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=B(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=$0(s);if((B(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return j(n.slice(0,r/8))}function hi(a,e){if(e=Kd(e),a=B(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&g5(8-n)),n+=3);let i=a.length/4,r=B(Xt(a))[0]&$0(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Q0(a,e){try{return pr(a,e),!0}catch{}return!1}function X0(a){return(typeof a!="number"||a<0||a>=lr||a%1)&&Zr.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var Y0="random/5.7.0";var $d=new A(Y0);function T5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Z0=T5(),Co=Z0.crypto||Z0.msCrypto;(!Co||!Co.getRandomValues)&&($d.warn("WARNING: Missing strong random number source"),Co={getRandomValues:function(a){return $d.throwError("no secure random source avaialble",A.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(a){(a<=0||a>1024||a%1||a!=a)&&$d.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Co.getRandomValues(e),B(e)}function es(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var Yd=_n(Xd());var So="json-wallets/5.7.0";function fa(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),B(a)}function yr(a,e){for(a=String(a);a.length{D=B(D);let N=D.slice(0,16),F=D.slice(16,32),U=D.slice(32,64),G=new ca.default.Counter(b),q=new ca.default.ModeOfOperation.ctr(N,G),W=B(q.encrypt(i)),ye=le(de([F,W])),te={address:a.address.substring(2).toLowerCase(),id:tf(E),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:j(b).substring(2)},ciphertext:j(W).substring(2),kdf:"scrypt",kdfparams:{salt:j(f).substring(2),n:k,dklen:32,p:I,r:v},mac:ye.substring(2)}};if(s){let ae=Qn(16),Re=new ca.default.Counter(ae),re=new ca.default.ModeOfOperation.ctr(U,Re),_e=B(re.encrypt(s)),M=new Date,u=M.getUTCFullYear()+"-"+yr(M.getUTCMonth()+1,2)+"-"+yr(M.getUTCDate(),2)+"T"+yr(M.getUTCHours(),2)+"-"+yr(M.getUTCMinutes(),2)+"-"+yr(M.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:j(ae).substring(2),mnemonicCiphertext:j(_e).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(te)})}function pf(a,e,t){if(Ro(a)){t&&t(0);let n=el(a,e);return t&&t(1),Promise.resolve(n)}return Po(a)?lf(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function yf(a,e){if(Ro(a))return el(a,e);if(Po(a))return df(a,e);throw new Error("invalid JSON wallet")}var ff="wallet/5.7.0";var cf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},fr=new A(ff);function A5(a){return a!=null&&Z(a.privateKey,32)&&a.address!=null}function M5(a){let e=a.mnemonic;return e&&e.phrase}var Cn=class extends Bt{constructor(e,t){if(super(),A5(e)){let n=new cn(e.privateKey);if(R(this,"_signingKey",()=>n),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&fr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),M5(e)){let i=e.mnemonic;R(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ya,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&fr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else R(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&fr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),R(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);R(this,"_signingKey",()=>n)}R(this,"_mnemonic",()=>null),R(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&fr.throwArgumentError("invalid provider","provider",t),R(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(pe(t.from)!==this.address&&fr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(le($r(t)));return $r(t,n)})}signMessage(e){return cf(this,void 0,void 0,function*(){return Nr(this._signingKey().signDigest(Qi(e)))})}_signTypedData(e,t,n){return cf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&fr.throwError("cannot resolve ENS names without a provider",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Nr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),rl(this,e,t,n)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Ee(le(de([t,e.extraEntropy])),0,16)));let n=hi(t,e.locale);return Cn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return pf(e,t,n).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(yf(e,t))}static fromMnemonic(e,t,n){return t||(t=ya),new Cn(It.fromMnemonic(e,null,n).derivePath(t))}};function mf(a,e){return pi(Qi(a),e)}function hf(a,e,t,n){return pi(bt.hash(a,e,t),n)}var Da={};Li(Da,{AlchemyProvider:()=>gr,AlchemyWebSocketProvider:()=>ys,AnkrProvider:()=>fs,BaseProvider:()=>Yn,CloudflareProvider:()=>cs,EtherscanProvider:()=>ms,FallbackProvider:()=>xs,Formatter:()=>J,InfuraProvider:()=>vr,InfuraWebSocketProvider:()=>gs,IpcProvider:()=>bl,JsonRpcBatchProvider:()=>Jo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>xr,NodesmithProvider:()=>Ts,PocketProvider:()=>vs,Provider:()=>$t,Resolver:()=>hr,StaticJsonRpcProvider:()=>ps,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>ws,WebSocketProvider:()=>xa,getDefaultProvider:()=>$o,getNetwork:()=>ns,isCommunityResourcable:()=>ul,isCommunityResource:()=>rs,showThrottleMessage:()=>Xn});var xf="networks/5.7.1";var bf=new A(xf);function E5(a){return a&&typeof a.renetwork=="function"}function ma(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ma(t)},e}function Oo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return Oo(a,n)},t}var gf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ma("homestead")},Tf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ma("ropsten")},vf={chainId:63,name:"classicMordor",_defaultProvider:Oo("https://www.ethercluster.com/mordor","classicMordor")},Do={unspecified:{chainId:0,name:"unspecified"},homestead:gf,mainnet:gf,morden:{chainId:2,name:"morden"},ropsten:Tf,testnet:Tf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ma("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ma("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ma("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ma("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Oo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:vf,classicTestnet:vf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Oo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ma("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ma("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ns(a){if(a==null)return null;if(typeof a=="number"){for(let n in Do){let i=Do[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Do[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Do[a.name];if(!e)return typeof a.chainId!="number"&&bf.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&bf.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(E5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var wf="web/5.7.1";var I5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function _f(a,e){return I5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:B(new Uint8Array(i))}})}var C5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new A(wf);function kf(a){return new Promise(e=>{setTimeout(e,a)})}function Pa(a,e){if(a==null)return null;if(typeof a=="string")return a;if(ta(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return j(a)}return a}function S5(a){return ge(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function sl(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,b=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(b=a.timeout),a.headers)for(let N in a.headers)o[N.toLowerCase()]={key:N,value:String(a.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",A.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let N=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+$i(ge(N))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=ve(a.fetchOptions))}let E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),k=l?l.match(E):null;if(k)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":k[1]||"text/plain"},body:k[2]?Ji(k[3]):S5(k[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){Sn.throwError("processing response error",A.errors.SERVER_ERROR,{body:Pa(k[1],k[2]),error:N,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(N=>{let F=o[N];v[F.key]=F.value}),p.headers=v;let I=function(){let N=null;return{promise:new Promise(function(G,q){b&&(N=setTimeout(()=>{N!=null&&(N=null,q(Sn.makeError("timeout",A.errors.TIMEOUT,{requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:l})))},b))}),cancel:function(){N!=null&&(clearTimeout(N),N=null)}}}(),D=function(){return C5(this,void 0,void 0,function*(){for(let N=0;N=300)&&(I.cancel(),Sn.throwError("bad response",A.errors.SERVER_ERROR,{status:F.statusCode,headers:F.headers,body:Pa(U,F.headers?F.headers["content-type"]:null),requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let G=yield t(U,F);return I.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",A.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ge(e);let r=typeof a=="string"?{url:a}:ve(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=ve(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return sl(a,i,n)}function Pn(a,e){return e||(e={}),e=ve(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(f){s()&&n(f)})}p()})}var yl=_n(If());var ke="providers/5.7.2";var is=new A(ke),J=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:J.allowNull(this.accessList.bind(this),null),blockHash:J.allowNull(s,null),blockNumber:J.allowNull(l,null),transactionIndex:J.allowNull(l,null),confirmations:J.allowNull(l,null),from:t,gasPrice:J.allowNull(n),maxPriorityFeePerGas:J.allowNull(n),maxFeePerGas:J.allowNull(n),gasLimit:n,to:J.allowNull(t,null),value:n,nonce:l,data:r,r:J.allowNull(this.uint256),s:J.allowNull(this.uint256),v:J.allowNull(l),creates:J.allowNull(t,null),raw:J.allowNull(r)},e.transactionRequest={from:J.allowNull(t),nonce:J.allowNull(l),gasLimit:J.allowNull(n),gasPrice:J.allowNull(n),maxPriorityFeePerGas:J.allowNull(n),maxFeePerGas:J.allowNull(n),to:J.allowNull(t),value:J.allowNull(n),data:J.allowNull(f),type:J.allowNull(l),accessList:J.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:J.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:J.allowNull(this.address,null),from:J.allowNull(this.address,null),contractAddress:J.allowNull(t,null),transactionIndex:l,root:J.allowNull(o),gasUsed:n,logsBloom:J.allowNull(r),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:J.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:J.allowNull(n),status:J.allowNull(l),type:p},e.block={hash:J.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:J.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:J.allowNull(t),extraData:r,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(n)},e.blockWithTransactions=ve(e.block),e.blockWithTransactions.transactions=J.allowNull(J.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:J.allowNull(i,void 0),toBlock:J.allowNull(i,void 0),blockHash:J.allowNull(s,void 0),address:J.allowNull(t,void 0),topics:J.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:J.allowNull(l),blockHash:J.allowNull(s),transactionIndex:l,removed:J.allowNull(this.boolean.bind(this)),address:t,data:J.allowFalsish(r,"0x"),topics:J.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:P.from(e).toNumber()}type(e){return e==="0x"||e==null?0:P.from(e).toNumber()}bigNumber(e){return P.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),Z(e))?e.toLowerCase():is.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Ee(e,12));return t===Zs?null:t}contractAddress(e){return oi(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Z(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Pt(n)!==32?is.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=P.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!Z(e))throw new Error("invalid uint256");return fe(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=J.check(t,e);return i._difficulty=n==null?null:P.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return J.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&P.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=J.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Z(n)&&(n=P.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),Z(n)&&(n=P.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return wo(e)}receiptLog(e){return J.check(this.formats.receiptLog,e)}receipt(e){let t=J.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=P.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&is.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):is.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&is.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return J.check(this.formats.filter,e)}filterLog(e){return J.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function ul(a){return a&&typeof a.isCommunityResource=="function"}function rs(a){return ul(a)&&a.isCommunityResource()}var Cf=!1;function Xn(){Cf||(Cf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var se=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ce=new A(ke),L5=10;function Sf(a){return a==null?"null":(Pt(a)!==32&&ce.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Rf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Sf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Sf(e)}).join("&")}function U5(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function mr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Pt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Rf(a);if(po.isForkEvent(a))throw ce.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Rf(a.topics||[])}throw new Error("invalid event - "+a)}function ss(){return new Date().getTime()}function Pf(a){return new Promise(e=>{setTimeout(e,a)})}var V5=["block","network","pending","poll"],fl=class{constructor(e,t,n){R(this,"tag",e),R(this,"listener",t),R(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=U5(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||V5.indexOf(this.tag)>=0}},j5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function dl(a){return fe(P.from(a).toHexString(),32)}function Nf(a){return la.encode(de([a,Ee(Xt(Xt(a)),0,4)]))}var Bf=new RegExp("^(ipfs)://(.*)$","i"),Df=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Bf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Uo(a,e){try{return Jt(os(a,e))}catch{}return null}function os(a,e){if(a==="0x")return null;let t=P.from(Ee(a,e,e+32)).toNumber(),n=P.from(Ee(a,t,t+32)).toNumber();return Ee(a,t+32,t+32+n)}function ll(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):ce.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Of(a){let e=B(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function H5(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function Ff(a){let e=[],t=0;for(let n=0;nP.from(e).eq(1)).catch(e=>{if(e.code===A.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return se(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ma(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",Ff([zr(this.name),n.data])]));try{let r=yield this.provider.call(n);return B(r).length%32===4&&ce.throwError("resolver threw error",A.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=os(r,0)),r}catch(r){if(r.code===A.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return se(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?os(n,0):null})}_getAddress(e,t){let n=j5[String(e)];if(n==null&&ce.throwError(`unsupported coin type: ${e}`,A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=B(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Nf(de([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Nf(de([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=yl.default.toWords(i.slice(2));return o.unshift(s),yl.default.encode(n.prefix,o)}}return null}getAddress(e){return se(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Wi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===A.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",dl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&ce.throwError("invalid or unsupported coin data",A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return se(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return ce.throwError("invalid or unsupported content hash data",A.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return se(this,void 0,void 0,function*(){let t=ge(e);t=de([dl(64),dl(t.length),t]),t.length%32!==0&&(t=de([t,fe("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",j(t));return n==null||n==="0x"?null:Jt(n)})}},pl=null,q5=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),R(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(R(this,"_network",t),this.emit("network",t,null)):ce.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return se(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ce.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:R(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===A.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return pl==null&&(pl=new J),pl}static getNetwork(e){return ns(e??"homestead")}ccipReadFetch(e,t,n){return se(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),b=yield Rn({url:p,errorPassThrough:!0},f,(k,v)=>(k.status=v.statusCode,k));if(b.data)return b.data;let E=b.message||"unknown error";if(b.status>=400&&b.status<500)return ce.throwError(`response not found during CCIP fetch: ${E}`,A.errors.SERVER_ERROR,{url:l,errorMessage:E});s.push(E)}return ce.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,A.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return se(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ss()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ss(),n=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ss();return i=P.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return se(this,void 0,void 0,function*(){let e=q5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",ce.makeError("network block skew detected",A.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return se(this,void 0,void 0,function*(){return ce.throwError("provider does not support network detection",A.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return se(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Pf(0),this._network;let n=ce.makeError("underlying network changed",A.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ss();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return se(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return se(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(E=>{E()}),!1)},b=E=>{E.confirmations{this.removeListener(e,b)}),i){let E=i.startBlock,k=null,v=I=>se(this,void 0,void 0,function*(){p||(yield Pf(1e3),this.getTransactionCount(i.from).then(D=>se(this,void 0,void 0,function*(){if(!p){if(D<=i.nonce)E=I;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(k==null&&(k=E-3,k{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let E=setTimeout(()=>{f()||o(ce.makeError("timeout exceeded",A.errors.TIMEOUT,{timeout:n}))},n);E.unref&&E.unref(),l.push(()=>{clearTimeout(E)})}})})}getBlockNumber(){return se(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return se(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return P.from(e)}catch(t){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return P.from(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return P.from(i).toNumber()}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return se(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return j(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return se(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return j(r)}catch(s){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&ce.throwError("Transaction hash mismatch from Provider.sendTransaction.",A.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>se(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&ce.throwError("transaction failed",A.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return se(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>j(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return se(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?P.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?j(r):null))}),this.formatter.transactionRequest(yield Ie(n))})}_getFilter(e){return se(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,n){return se(this,void 0,void 0,function*(){n>=L5&&ce.throwError("CCIP read exceeded maximum redirections",A.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Ee(r,4),o=Ee(s,0,32);P.from(o).eq(i)||ce.throwError("CCIP Read sender did not match",A.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=P.from(Ee(s,32,64)).toNumber(),f=P.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let N=0;Nse(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>se(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>se(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return se(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return se(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return se(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ce.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return se(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new hr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return se(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||ce.throwError("network does not support ENS",A.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ma(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return se(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Z(e))throw n}typeof e!="string"&&ce.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return se(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Uo(yield this.call({to:n,data:"0x691f3431"+Ma(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return se(this,void 0,void 0,function*(){let t=null;if(Z(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new hr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o}try{let o=Uo(yield this.call({to:s,data:"0x691f3431"+Ma(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return ce.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new fl(mr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=mr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=mr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=mr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=mr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=mr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var ha=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new A(ke),G5=["call","estimateGas"];function ds(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=Z(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=ds(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return ds(JSON.parse(a),e)}catch{}return null}function Uf(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=ds(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",A.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=ds(e.body,!1);r==null&&(r=ds(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===A.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",A.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),G5.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function Lf(a){return new Promise(function(e){setTimeout(e,a)})}function z5(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function us(a){return a&&a.toLowerCase()}var cl={},xr=class extends Bt{constructor(e,t,n){if(super(),e!==cl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),n==null&&(n=0),typeof n=="string"?(R(this,"_address",this.provider.formatter.address(n)),R(this,"_index",null)):typeof n=="number"?(R(this,"_index",n),R(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",A.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new ml(cl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,A.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=ve(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=ve(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ha(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",A.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Uf("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ha(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ha(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[j(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),j(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return ha(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ha(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},ml=class extends xr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},W5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?R(this,"connection",Object.freeze({url:e})):R(this,"connection",Object.freeze(ve(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ha(this,void 0,void 0,function*(){yield Lf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(P.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",A.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",A.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new xr(cl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),z5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[us(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[us(t.address),t.blockTag]];case"getCode":return["eth_getCode",[us(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[us(t.address),fe(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=us(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ha(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&P.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=ve(t),t.transaction=ve(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Uf(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return Lf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=ve(W5);if(t)for(let r in t)t[r]&&(n[r]=!0);ji(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(P.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=j(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var br=null;try{if(br=WebSocket,br==null)throw new Error("inject please")}catch{let e=new A(ke);br=function(){e.throwError("WebSockets not supported in this environment",A.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var hl=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Vo=new A(ke),K5=1,xa=class extends Yt{constructor(e,t){t==="any"&&Vo.throwError("WebSocketProvider does not support 'any' network yet",A.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?R(this,"_websocket",new br(this.connection.url)):R(this,"_websocket",e),R(this,"_requests",{}),R(this,"_subs",{}),R(this,"_subIds",{}),R(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),R(p,"code",s.error.code||null),R(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Vo.throwError("cannot reset events block on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Vo.throwError("cannot set polling interval on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return hl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Vo.throwError("cannot set polling on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=K5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return hl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=P.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return hl(this,void 0,void 0,function*(){this.websocket.readyState===br.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var J5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ls=new A(ke),ps=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return J5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ls.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends ps{constructor(e,t){ls.checkAbstract(new.target,Ct),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{R(this,i,t[i])})}_startPending(){ls.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ls.throwError("API provider does not support signing",A.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ls.throwError("not implemented; sub-classes must override getUrl",A.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Vf=new A(ke),jo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ys=class extends xa{constructor(e,t){let n=new gr(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),R(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===jo}},gr=class extends Ct{static getWebSocketProvider(e,t){return new ys(e,t)}static getApiKey(e){return e==null?jo:(e&&typeof e!="string"&&Vf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Vf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===jo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===jo}};var $5=new A(ke),Ho="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Q5(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return $5.throwArgumentError("unsupported network","name",a)}var fs=class extends Ct{isCommunityResource(){return this.apiKey===Ho}static getApiKey(e){return e??Ho}static getUrl(e,t){t==null&&(t=Ho);let n={allowGzip:!0,url:"https://"+Q5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ho&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var X5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},jf=new A(ke),cs=class extends Ct{static getApiKey(e){return e!=null&&jf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:jf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return X5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var qo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Na=new A(ke);function Hf(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Fn(j(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=j(n),e[t]=n)}return e}function Y5(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function qf(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function Gf(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function xl(a,e,t){if(a==="call"&&e.code===A.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),Z(r))return r;Na.throwError("missing revert data in call exception",A.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===A.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Na.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Na.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Na.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Na.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var ms=class extends Yn{constructor(e,t){super(e),R(this,"baseUrl",this.getBaseUrl()),R(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Na.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return qo(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?qf:Y5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,b)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||qf);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return qo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return qo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>xl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=Hf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return xl("call",r,t.transaction)}}case"estimateGas":{let i=Hf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return xl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=Gf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Gf(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Na.throwError("unsupported topic count",A.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Na.throwError("unsupported topic format",A.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Wo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(b){s(b)}}function l(f){try{p(n.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xi=new A(ke);function Go(){return new Date().getTime()}function zf(a){let e=null;for(let t=0;te?null:(n+i)/2}function Tr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(P.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>Tr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=Tr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Z5=1;function Kf(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var ex=[A.errors.CALL_EXCEPTION,A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED,A.errors.UNPREDICTABLE_GAS_LIMIT],tx=["address","args","errorArgs","errorSignature","method","transaction"];function zo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function nx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function ax(a,e,t){let n=Tr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Wf(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return Wf(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=ve(i),i.confirmations=-1,Tr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=ve(i),i.transactions=i.transactions.map(r=>(r=ve(r),r.confirmations=-1,r)),Tr(i))}:n=function(i){return i==null?null:Tr(i)};break;default:throw new Error("unknown method: "+e)}return nx(n,a.quorum)}function hs(a,e){return Wo(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function ix(a,e,t,n){return Wo(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Z(n.blockTag)&&(i=yield hs(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Z(n.blockTag)&&(i=yield hs(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Z(n.blockTag)&&(i=yield hs(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Z(n.blockTag)&&(i=yield hs(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&Z(r.fromBlock)||r.toBlock&&Z(r.toBlock))&&(i=yield hs(a,e)),i.getLogs(r)}}return xi.throwError("unknown method error",A.errors.UNKNOWN_ERROR,{method:t,params:n})})}var xs=class extends Yn{constructor(e,t){e.length===0&&xi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=rs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=ve(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=rs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&xi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&xi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=zf(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),R(this,"providerConfigs",Object.freeze(n)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Wo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return zf(e)})}perform(e,t){return Wo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Go(),p=i.filter(k=>k.runner&&l-k.startk+v.weight,0);for(;p{k.staller=null}),k.runner=ix(k,r,e,t).then(I=>{k.done=!0,k.result=I,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(k,Go()),request:{method:e,params:ct(t)},provider:this})},I=>{k.done=!0,k.error=I,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(k,Go()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:zo(k,null),request:{method:e,params:ct(t)},provider:this}),p+=k.weight}let f=[];i.forEach(k=>{k.done||!k.runner||(f.push(k.runner),k.staller&&f.push(k.staller.getPromise()))}),f.length&&(yield Promise.race(f));let b=i.filter(k=>k.done&&k.error==null);if(b.length>=this.quorum){let k=n(b);if(k!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),k;o||(yield Kf(100).getPromise()),o=!1}let E=i.reduce((k,v)=>{if(!v.done||v.error==null)return k;let I=v.error.code;return ex.indexOf(I)>=0&&(k[I]||(k[I]={error:v.error,weight:0}),k[I].weight+=v.weight),k},{});if(Object.keys(E).forEach(k=>{let v=E[k];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let I=v.error,D={};tx.forEach(N=>{I[N]!=null&&(D[N]=I[N])}),xi.throwError(I.reason||I.message,k,D)}),i.filter(k=>!k.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),xi.throwError("failed to meet quorum",A.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>zo(l)),provider:this})})}};var bl=null;var Ko=new A(ke),bs="84842078b09946638c03157f83405213",gs=class extends xa{constructor(e,t){let n=new vr(e,t),i=n.connection;i.password&&Ko.throwError("INFURA WebSocket project secrets unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),R(this,"apiKey",n.projectId),R(this,"projectId",n.projectId),R(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===bs}},vr=class extends Ct{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){let t={apiKey:bs,projectId:bs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Ko.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Ko.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Ko.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===bs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===bs}};var Jo=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let b=l[f];if(b.error){let E=new Error(b.error.message);E.code=b.error.code,E.data=b.error.data,p.reject(E)}else p.resolve(b.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var gl=new A(ke),rx="ETHERS_JS_SHARED",Ts=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&gl.throwArgumentError("invalid apiKey","apiKey",e),e||rx}static getUrl(e,t){gl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:gl.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var Jf=new A(ke),$f="62e1ad51b37b8e00394bda3b",vs=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=$f:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Jf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:Jf.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===$f}};var Qf=new A(ke),sx=1;function Xf(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:sx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function ox(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var ws=class extends Yt{constructor(e,t){e==null&&Qf.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=ox(e)):e.sendAsync?i=Xf(e,e.sendAsync.bind(e)):e.send?i=Xf(e,e.send.bind(e)):Qf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),R(this,"jsonRpcFetchFunc",i),R(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Yf=new A(ke);function $o(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new xa(a);default:Yf.throwArgumentError("unsupported URL scheme","network",a)}}let t=ns(a);return(!t||!t._defaultProvider)&&Yf.throwError("unsupported getDefaultProvider network",A.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:xs,AlchemyProvider:gr,AnkrProvider:fs,CloudflareProvider:cs,EtherscanProvider:ms,InfuraProvider:vr,JsonRpcProvider:Yt,NodesmithProvider:Ts,PocketProvider:vs,Web3Provider:ws,IpcProvider:null},e)}var Y={};Li(Y,{AbiCoder:()=>Ki,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>xe,Fragment:()=>qt,FunctionFragment:()=>Dt,HDNode:()=>It,Indexed:()=>ra,Interface:()=>Ea,LogDescription:()=>Xi,Logger:()=>A,ParamType:()=>lt,RLP:()=>zs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yi,TransactionTypes:()=>vo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>io,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>sl,_toEscapedUtf8String:()=>pd,accessListify:()=>sn,arrayify:()=>B,base58:()=>la,base64:()=>xd,checkProperties:()=>ji,checkResultErrors:()=>qi,commify:()=>sc,computeAddress:()=>mn,computeHmac:()=>pa,computePublicKey:()=>Jr,concat:()=>de,deepCopy:()=>ct,defaultAbiCoder:()=>qr,defaultPath:()=>ya,defineReadOnly:()=>R,dnsEncode:()=>zr,entropyToMnemonic:()=>hi,fetchJson:()=>Rn,formatBytes32String:()=>yd,formatEther:()=>oc,formatUnits:()=>Tl,getAccountPath:()=>X0,getAddress:()=>pe,getContractAddress:()=>oi,getCreate2Address:()=>py,getIcapAddress:()=>ly,getJsonWalletAddress:()=>tl,getStatic:()=>mt,hashMessage:()=>Qi,hexConcat:()=>kt,hexDataLength:()=>Pt,hexDataSlice:()=>Ee,hexStripZeros:()=>ed,hexValue:()=>Fn,hexZeroPad:()=>fe,hexlify:()=>j,id:()=>nn,isAddress:()=>dy,isBytes:()=>on,isBytesLike:()=>ta,isHexString:()=>Z,isValidMnemonic:()=>Q0,isValidName:()=>gd,joinSignature:()=>Nr,keccak256:()=>le,mnemonicToEntropy:()=>pr,mnemonicToSeed:()=>Jd,namehash:()=>Ma,nameprep:()=>hd,parseBytes32String:()=>fd,parseEther:()=>uc,parseTransaction:()=>wo,parseUnits:()=>vl,poll:()=>Pn,randomBytes:()=>Qn,recoverAddress:()=>pi,recoverPublicKey:()=>To,resolveProperties:()=>Ie,ripemd160:()=>Xr,serializeTransaction:()=>$r,sha256:()=>Xt,sha512:()=>Gd,shallowCopy:()=>ve,shuffled:()=>es,solidityKeccak256:()=>tc,solidityPack:()=>Qo,soliditySha256:()=>nc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ge,toUtf8CodePoints:()=>Aa,toUtf8String:()=>Jt,verifyMessage:()=>mf,verifyTypedData:()=>hf,zeroPad:()=>ai});var Zf="solidity/5.7.0";var ux=new RegExp("^bytes([0-9]+)$"),dx=new RegExp("^(u?int)([0-9]*)$"),lx=new RegExp("^(.*)\\[([0-9]*)\\]$"),px="0000000000000000000000000000000000000000000000000000000000000000",wr=new A(Zf);function ec(a,e,t){switch(a){case"address":return t?ai(e,32):B(e);case"string":return ge(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ai(e,32):B(e)}let n=a.match(dx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&wr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=P.from(e).toTwos(i),ai(e,i/8)}if(n=a.match(ux),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&wr.throwArgumentError("invalid bytes type","type",a),B(e).byteLength!==i&&wr.throwArgumentError(`invalid value for ${a}`,"value",e),t?B((e+px).substring(0,66)):e}if(n=a.match(lx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&wr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(ec(i,o,!0))}),de(s)}return wr.throwArgumentError("invalid type","type",a)}function Qo(a,e){a.length!=e.length&&wr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(ec(n,e[i]))}),j(de(t))}function tc(a,e){return le(Qo(a,e))}function nc(a,e){return Xt(Qo(a,e))}var ac="units/5.7.0";var ic=new A(ac),rc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function sc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&ic.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Tl(a,e){if(typeof e=="string"){let t=rc.indexOf(e);t!==-1&&(e=3*t)}return Vi(a,e??18)}function vl(a,e){if(typeof a!="string"&&ic.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=rc.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function oc(a){return Tl(a,18)}function uc(a){return vl(a,18)}var Xo="ethers/5.7.2";var dc=new A(Xo);try{let a=window;a._ethers==null&&(a._ethers=wl)}catch{}var ba;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(ba||(ba={}));var _l;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(_l||(_l={}));var _s;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(_s||(_s={}));var kl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(kl||(kl={}));var ks;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(ks||(ks={}));var Al;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Al||(Al={}));var Ml;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Ml||(Ml={}));var El;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(El||(El={}));var we;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(we||(we={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Cl="0x12345678",Il;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Il||(Il={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Te;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(Te||(Te={}));var Sl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],bi=class{static createInterface(){return new Y.Interface(Sl)}static connect(e,t){return new ie(e,Sl,t)}};me(bi,"abi",Sl);var Rl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],gi=class{static createInterface(){return new Y.Interface(Rl)}static connect(e,t){return new ie(e,Rl,t)}};me(gi,"abi",Rl);var lc=(a,e)=>{throw new Error(`${e}: ${a}`)},Pl=a=>a!=null;var{keccak256:fx,toUtf8Bytes:cx}=Y,{MaxUint256:mx}=ht;var Nl=a=>Y.formatEther(a);var Dl=a=>{let e=a.reduce((t,n)=>t|1<{let e=P.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Pl)},Ti=async(a,e,t,n)=>{if(P.from(t).eq(P.from(n)))return mx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return P.from(o)},Oa=a=>fx(cx(a));var _r=async(a,e)=>(await gi.connect(a,e).version()).toNumber(),Ol=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Pl);var{hexDataSlice:Bl}=Y,{MaxUint256:hx}=ht,pc=a=>{let e=Bl(a,0,3),t=P.from(Bl(a,4,35)),n=P.from(Bl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},yc=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[P.from(t),hx,r];let o=P.from(we.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await Ti(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},xx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>yc(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?Zn(a,e,t,n[0],i):xx(a,e,t,n,i):yc(a,e,t,n,i);var{MaxUint256:fc}=ht,{AddressZero:bx}=ht;async function gx(a,e){let t;try{return t=await a.getCapabilityRoles(Y.hexZeroPad(e,4)),Yo(t)}catch{return[]}}async function As(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:b}=pc(s),E=bi.connect(r,n.signer||n.provider),k=await gx(E,p);if(k.includes(vt.Root)||k.length===0){if(!P.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${we.RootDomain}`);o=fc}else{let{skillId:F}=await e.getDomain(f),U=await a.getChildSkillId(F,b);if(U.eq(l))o=fc;else{let{children:G}=await a.getSkill(l),q=G.findIndex(W=>W.eq(U));if(q<0)throw new Error(`Could not find ${U} as a child of ${l}`);o=P.from(q)}}let{key:v,value:I,branchMask:D,siblings:N}=await t.getReputationWithProofs(l,bx);return{actionCid:o,key:v,value:I,branchMask:D,siblings:N}}var{AddressZero:Tx}=ht,ea=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||ba.Gnosis;this.endpointUrl=n?.customEndpointUrl||_s[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(P.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=P.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=P.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ea.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,b=await this.colony.getDomain(f);return{domainId:f,skillId:b.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:b})=>b===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?P.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${n}/${i}`;return ea.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${n}/${i}/${Tx}/noProof`,s=await ea.fetchReputation(r);return{...s,reputationAmount:P.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(P.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var cc=10,pk=_t(cc),mc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},hc=cc-1;var xc=6,ck=_t(xc),bc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},gc=xc-1;var Tc=7,xk=_t(Tc),vc={1:[],2:[],3:[],4:[],5:[],6:[]},wc=Tc-1;var _c=7,Tk=_t(_c),kc={1:[],2:[],3:[],4:[],5:[],6:[]},Ac=_c-1;var Mc=4,_k=_t(Mc),Ec={1:[],2:[],3:[]},Ic=Mc-1;var Cc=5,Mk=_t(Cc),Sc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Rc=Cc-1;var Pc=2,Ck=_t(Pc),Nc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Dc=Pc-1;var Oc=4,Pk=_t(Oc),Bc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Fc=Oc-1;var Lc=7,Ok=_t(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[]},Vc=Lc-1;var jc=11,Lk=_t(jc),Fl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Ll=jc-1;var Hc=6,jk=_t(Hc),qc={1:[],2:[],3:[],4:[],5:[]},Gc=Hc-1;var Ba=(a,e,t)=>{switch(a){case Te.CoinMachine:{let n=mc[e];return!!n&&!n.includes(t)}case Te.EvaluatedExpenditure:{let n=bc[e];return!!n&&!n.includes(t)}case Te.FundingQueue:{let n=vc[e];return!!n&&!n.includes(t)}case Te.IVotingReputation:{let n=Fl[e];return!!n&&!n.includes(t)}case Te.OneTxPayment:{let n=kc[e];return!!n&&!n.includes(t)}case Te.ReputationBootstrapper:{let n=Ec[e];return!!n&&!n.includes(t)}case Te.StagedExpenditure:{let n=Nc[e];return!!n&&!n.includes(t)}case Te.StakedExpenditure:{let n=Sc[e];return!!n&&!n.includes(t)}case Te.StreamingPayments:{let n=Bc[e];return!!n&&!n.includes(t)}case Te.TokenSupplier:{let n=Uc[e];return!!n&&!n.includes(t)}case Te.VotingReputation:{let n=Fl[e];return!!n&&!n.includes(t)}case Te.Whitelist:{let n=qc[e];return!!n&&!n.includes(t)}default:return lc(a,"Could not find extension with name")}};var vx={[Te.CoinMachine]:hc,[Te.EvaluatedExpenditure]:gc,[Te.FundingQueue]:wc,[Te.IVotingReputation]:Ll,[Te.OneTxPayment]:Ac,[Te.ReputationBootstrapper]:Ic,[Te.StagedExpenditure]:Dc,[Te.StakedExpenditure]:Rc,[Te.StreamingPayments]:Fc,[Te.TokenSupplier]:Vc,[Te.VotingReputation]:Ll,[Te.Whitelist]:Gc};var lh=_n(zc(),1);var Db=_n(dh(),1);var pt;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(pt||(pt={}));var ip;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(ip||(ip={}));var hM=(0,lh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),rp={[pt.Annotation]:"Annotation(address,bytes32,string)",[pt.Colony]:"ColonyMetadata(address,string)",[pt.Decision]:"Annotation(address,bytes32,string)",[pt.Domain]:"DomainMetadata(address,uint256,string)",[pt.Misc]:"",[pt.DEFAULT]:""};var bM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var sp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new Y.Interface(sp)}static connect(e,t){return new ie(e,sp,t)}};me(Tn,"abi",sp);var op=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new Y.Interface(op)}static connect(e,t){return new ie(e,op,t)}};me(vn,"abi",op);var up=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Mi=class{static createInterface(){return new Y.Interface(up)}static connect(e,t){return new ie(e,up,t)}};me(Mi,"abi",up);var Pu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],yh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",i1=a=>a.length>1,Nn=class extends fi{constructor(...e){i1(e)?super(...e):super(Pu,yh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Y.Interface(Pu)}static connect(e,t){return new ie(e,Pu,t)}};me(Nn,"bytecode",yh),me(Nn,"abi",Pu);var dp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new Y.Interface(dp)}static connect(e,t){return new ie(e,dp,t)}};me(Ei,"abi",dp);var Ir;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Ir||(Ir={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:ch}=ht;async function o1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var u1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Nn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await o1(t)}catch{n=!1}try{await t.getMetatransactionNonce(ch)}catch{i=!1}try{await t.nonces(ch)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Ei.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Ir.TokenClient,t},lp=u1;var{AddressZero:pp}=ht,l1=Tn.connect(pp,new Da.BaseProvider(3656691)).interface,p1=Mi.connect(pp,new Da.BaseProvider(3656691)).interface,y1=vn.connect(pp,new Da.BaseProvider(3656691)).interface;var yp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ns=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new ie(e,yp,t)}};Ns.abi=yp;var fp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ds=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new ie(e,fp,t)}};Ds.abi=fp;var cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Cr=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new ie(e,cp,t)}};Cr.abi=cp;var Ii=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,rp[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ol(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:c1,solidityKeccak256:m1,splitSignature:h1}=Y,Sr=class extends Ii{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===ba.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=m1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=c1(l),f=await n.signMessage(p),{r:b,s:E,v:k}=h1(f),v={target:t,payload:e,userAddress:s,r:b,s:E,v:k};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ee=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Nu=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=we.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ci=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new ie(e,mp,t)}};Ci.abi=mp;var hp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Si=class{static createInterface(){return new Y.Interface(hp)}static connect(e,t){return new ie(e,hp,t)}};Si.abi=hp;var xp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new Y.Interface(xp)}static connect(e,t){return new ie(e,xp,t)}};Ri.abi=xp;var bp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new Y.Interface(bp)}static connect(e,t){return new ie(e,bp,t)}};Pi.abi=bp;var gp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new ie(e,gp,t)}};Ni.abi=gp;var Tp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new Y.Interface(Tp)}static connect(e,t){return new ie(e,Tp,t)}};Di.abi=Tp;var{AddressZero:_1}=ht,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===_1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let n=await _r(t,e.colonyNetwork.signerOrProvider);if(!Ba(Dn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Dn(e,r,n)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||we.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((k,v)=>r[k].localeCompare(r[v]));let f=p.map(k=>r[k]),b=p.map(k=>l[k]),E=p.map(k=>o[k]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[k,v]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[I,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[k,v,I,D,f,E,b,s,we.SkillIgnore]},async k=>({...ee("OneTxPaymentMade",k)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Te.OneTxPayment),t],async n=>({...ee("ExtensionUpgraded",n)}))}},Ua=Dn;Ua.supportedVersions=[{version:3,factory:Pi},{version:4,factory:Ni},{version:5,factory:Di}],Ua.extensionType=Te.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ee("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ee("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ee("Approval",n)}))}};var Os=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Nn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ee("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ee("LogSetOwner",n)}))}};var Bs=class extends On{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ee("Approval",i)}))}};var mh=async(a,e)=>{let t=await lp(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Os(a,t);case wn.Erc20:return new On(a,t);case wn.Erc2612:return new Bs(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new Y.Interface(vp)}static connect(e,t){return new ie(e,vp,t)}};Oi.abi=vp;var wp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new Y.Interface(wp)}static connect(e,t){return new ie(e,wp,t)}};Bi.abi=wp;var _p=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new Y.Interface(_p)}static connect(e,t){return new ie(e,_p,t)}};Fi.abi=_p;var{AddressZero:kp}=ht;var Du=P.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===kp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let n=await _r(t,e.colonyNetwork.signerOrProvider);if(!Ba(Bn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Bn(e,r,n)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=P.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return Y.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ee("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await As(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,kp,Cl);return[e,t,kp,Cl,n,i,r,s]},async t=>({...ee("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(pt.Decision,t),[e,n]},async n=>({...ee("Annotation",n)}),{metadataType:pt.Decision})}approveStake(e,t=we.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Nu("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let E=await this.getMinStake(o,t);if(P.from(n).lt(E))throw new Error(`The staked amount is too small. Please stake at least ${Nl(E)}`);let{domainId:k,rootHash:v}=await this.getMotion(e),[I,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),k,vt.Arbitration,this.address),{skillId:N}=await this.colony.getTeam(k),{key:F,value:U,branchMask:G,siblings:q}=await this.colony.reputation.getReputationWithProofs(N,r,v);return[e,I,D,P.from(t),n,F,U,G,q]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ee("MotionStaked",r),...ee("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:b,siblings:E}=await this.colony.reputation.getReputationWithProofs(o,l,s),k=await this.createMotionSalt(e),v=Y.solidityKeccak256(["bytes","uint256"],[k,t]);return[e,v,p,f,b,E]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ee("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,f,p);if(!b)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:E,value:k,branchMask:v,siblings:I}=p;return[e,f,P.from(b),E,k,v,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ee("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:b,branchMask:E,siblings:k}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,b,E,k]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ee("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ee("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Te.VotingReputation),t],async n=>({...ee("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Va=Bn;Va.supportedVersions=[{version:7,factory:Oi},{version:8,factory:Bi},{version:9,factory:Fi}],Va.extensionType=Te.VotingReputation;var E1={["motion"]:Va,["oneTx"]:Ua},Pr=class{static async connect(e,t){let n=await _r(t,e.signerOrProvider),i=Pr.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await mh(e,s),l=new Pr(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Pr.supportedVersions[Pr.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ea(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Rr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Rr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ua.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(pt.Colony,e),[t]},async t=>({...ee("ColonyMetadata",t)}),{metadataType:pt.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(pt.Domain,e),[we.RootDomain,t]},{roles:vt.Architecture,domain:we.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:pt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[we.RootDomain],{roles:vt.Architecture,domain:we.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(pt.Domain,e),[we.RootDomain,t]},{roles:vt.Architecture,domain:we.RootDomain},async t=>({...ee("DomainMetadata",t)}),{metadataType:pt.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ee("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ee("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=we.RootDomain,s=n||we.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${P.from(t).toString()} does not exist`);let[p,f]=await Zn(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),E=await Ti(b,this.colony,r,s),k=await Ti(b,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:I}=await this.colony.getDomain(t);return[p,f,r,E,k,v,I,e,o]},async l=>({...ee("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=we.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=we.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ee("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(pt.Annotation,t),[e,n]},async n=>({...ee("Annotation",n)}),{metadataType:pt.Annotation})}installExtension(e){let t=E1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ba(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Nu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=we.RootDomain){let n=await this.colony.getUserRoles(e,t);return Yo(n)}setRoles(e,t,n=we.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Dl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=we.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Dl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ee("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ee("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ee("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ee("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ee("ColonyUpgraded",n)}))}awardReputation(e,t,n=we.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ee("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=we.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,P.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ee("ArbitraryReputationUpdate",i)}))}},Fs=Pr;Fs.supportedVersions=[{version:11,factory:Ci},{version:12,factory:Si},{version:13,factory:Ri}];var{splitSignature:iP}=Y;var{namehash:AP}=Y,{AddressZero:MP}=ht;var C1=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x64",chainName:"Gnosis Chain via Colony",nativeCurrency:{name:"xDAI",symbol:"XDAI",decimals:18},rpcUrls:[ks.Gnosis],blockExplorerUrls:["https://blockscout.com/xdai/mainnet"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",C1);})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-basic.js b/local-basic.js index 81745aff2..6ca172f44 100644 --- a/local-basic.js +++ b/local-basic.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var Fh=Object.create;var Gs=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var jh=Object.getPrototypeOf,Vh=Object.prototype.hasOwnProperty;var Hh=(i,e,t)=>e in i?Gs(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hr=(i,e)=>{for(var t in e)Gs(i,t,{get:e[t],enumerable:!0})},qh=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Uh(e))!Vh.call(i,r)&&r!==t&&Gs(i,r,{get:()=>e[r],enumerable:!(n=Lh(e,r))||n.enumerable});return i};var An=(i,e,t)=>(t=i!=null?Fh(jh(i)):{},qh(e||!i||!i.__esModule?Gs(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(Hh(i,typeof e!="symbol"?e+"":e,t),t);var Hp=ie(()=>{});var al=ie((qp,rl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Hp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[k]|=h<>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);else if(x==="le")for(w=0,k=0;w>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)A=o(u,y,w)<=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8}this._strip()};function d(C,u,y,x){for(var w=0,k=0,h=Math.min(C.length,y),A=u;A=49?k=g-49+10:g>=17?k=g-17+10:k=g,t(g>=0&&k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,k=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),k!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(k!==0&&(x=k.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),k=x||Math.max(1,w);t(w<=k,"byte array longer than desired length"),t(k>0,"Requested array length <= 0");var h=v(u,k),A=y==="le"?"LE":"BE";return this["_toArrayLike"+A](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,k=0,h=0;k>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x=0&&(u[x--]=A>>8&255),x>=0&&(u[x--]=A>>16&255),h===6?(x>=0&&(u[x--]=A>>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var k=0,h=0;h>>26;for(;k!==0&&h>>26;if(this.length=x.length,k!==0)this.words[this.length]=k,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,k;x>0?(w=this,k=u):(w=u,k=this);for(var h=0,A=0;A>26,this.words[A]=y&67108863;for(;h!==0&&A>26,this.words[A]=y&67108863;if(h===0&&A>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,k=u.words[P]|0,h=w*k+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,k=y.words,h=x.words,A=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,pt=w[3]|0,Z=pt&8191,de=pt>>>13,Hi=w[4]|0,Pe=Hi&8191,Ne=Hi>>>13,qi=w[5]|0,De=qi&8191,Oe=qi>>>13,Gi=w[6]|0,Be=Gi&8191,Fe=Gi>>>13,zi=w[7]|0,Le=zi&8191,Ue=zi>>>13,Wi=w[8]|0,je=Wi&8191,Ve=Wi>>>13,Ki=w[9]|0,He=Ki&8191,qe=Ki>>>13,Ji=k[0]|0,Ge=Ji&8191,ze=Ji>>>13,$i=k[1]|0,We=$i&8191,Ke=$i>>>13,Qi=k[2]|0,Je=Qi&8191,$e=Qi>>>13,Xi=k[3]|0,Qe=Xi&8191,Xe=Xi>>>13,Yi=k[4]|0,Ye=Yi&8191,Ze=Yi>>>13,Zi=k[5]|0,et=Zi&8191,tt=Zi>>>13,er=k[6]|0,nt=er&8191,it=er>>>13,tr=k[7]|0,rt=tr&8191,at=tr>>>13,nr=k[8]|0,st=nr&8191,ot=nr>>>13,ir=k[9]|0,ut=ir&8191,lt=ir>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,Ge),l=Math.imul(f,ze),l=l+Math.imul(P,Ge)|0,m=Math.imul(P,ze);var vi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(vi>>>26)|0,vi&=67108863,g=Math.imul(j,Ge),l=Math.imul(j,ze),l=l+Math.imul(K,Ge)|0,m=Math.imul(K,ze),g=g+Math.imul(f,We)|0,l=l+Math.imul(f,Ke)|0,l=l+Math.imul(P,We)|0,m=m+Math.imul(P,Ke)|0;var wi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,g=Math.imul(X,Ge),l=Math.imul(X,ze),l=l+Math.imul(Q,Ge)|0,m=Math.imul(Q,ze),g=g+Math.imul(j,We)|0,l=l+Math.imul(j,Ke)|0,l=l+Math.imul(K,We)|0,m=m+Math.imul(K,Ke)|0,g=g+Math.imul(f,Je)|0,l=l+Math.imul(f,$e)|0,l=l+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var _i=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(Z,Ge),l=Math.imul(Z,ze),l=l+Math.imul(de,Ge)|0,m=Math.imul(de,ze),g=g+Math.imul(X,We)|0,l=l+Math.imul(X,Ke)|0,l=l+Math.imul(Q,We)|0,m=m+Math.imul(Q,Ke)|0,g=g+Math.imul(j,Je)|0,l=l+Math.imul(j,$e)|0,l=l+Math.imul(K,Je)|0,m=m+Math.imul(K,$e)|0,g=g+Math.imul(f,Qe)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Qe)|0,m=m+Math.imul(P,Xe)|0;var Ai=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,g=Math.imul(Pe,Ge),l=Math.imul(Pe,ze),l=l+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul(Z,We)|0,l=l+Math.imul(Z,Ke)|0,l=l+Math.imul(de,We)|0,m=m+Math.imul(de,Ke)|0,g=g+Math.imul(X,Je)|0,l=l+Math.imul(X,$e)|0,l=l+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(j,Qe)|0,l=l+Math.imul(j,Xe)|0,l=l+Math.imul(K,Qe)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Ze)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Ze)|0;var ki=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,g=Math.imul(De,Ge),l=Math.imul(De,ze),l=l+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,We)|0,l=l+Math.imul(Pe,Ke)|0,l=l+Math.imul(Ne,We)|0,m=m+Math.imul(Ne,Ke)|0,g=g+Math.imul(Z,Je)|0,l=l+Math.imul(Z,$e)|0,l=l+Math.imul(de,Je)|0,m=m+Math.imul(de,$e)|0,g=g+Math.imul(X,Qe)|0,l=l+Math.imul(X,Xe)|0,l=l+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(j,Ye)|0,l=l+Math.imul(j,Ze)|0,l=l+Math.imul(K,Ye)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(f,et)|0,l=l+Math.imul(f,tt)|0,l=l+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Gu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(Be,Ge),l=Math.imul(Be,ze),l=l+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,We)|0,l=l+Math.imul(De,Ke)|0,l=l+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Ke)|0,g=g+Math.imul(Pe,Je)|0,l=l+Math.imul(Pe,$e)|0,l=l+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul(Z,Qe)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Qe)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(X,Ye)|0,l=l+Math.imul(X,Ze)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(j,et)|0,l=l+Math.imul(j,tt)|0,l=l+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(f,nt)|0,l=l+Math.imul(f,it)|0,l=l+Math.imul(P,nt)|0,m=m+Math.imul(P,it)|0;var zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Le,Ge),l=Math.imul(Le,ze),l=l+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,We)|0,l=l+Math.imul(Be,Ke)|0,l=l+Math.imul(Fe,We)|0,m=m+Math.imul(Fe,Ke)|0,g=g+Math.imul(De,Je)|0,l=l+Math.imul(De,$e)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,l=l+Math.imul(Pe,Xe)|0,l=l+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Ze)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Ze)|0,g=g+Math.imul(X,et)|0,l=l+Math.imul(X,tt)|0,l=l+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(j,nt)|0,l=l+Math.imul(j,it)|0,l=l+Math.imul(K,nt)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(f,rt)|0,l=l+Math.imul(f,at)|0,l=l+Math.imul(P,rt)|0,m=m+Math.imul(P,at)|0;var Wu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(je,Ge),l=Math.imul(je,ze),l=l+Math.imul(Ve,Ge)|0,m=Math.imul(Ve,ze),g=g+Math.imul(Le,We)|0,l=l+Math.imul(Le,Ke)|0,l=l+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Ke)|0,g=g+Math.imul(Be,Je)|0,l=l+Math.imul(Be,$e)|0,l=l+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,l=l+Math.imul(De,Xe)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,l=l+Math.imul(Pe,Ze)|0,l=l+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul(Z,et)|0,l=l+Math.imul(Z,tt)|0,l=l+Math.imul(de,et)|0,m=m+Math.imul(de,tt)|0,g=g+Math.imul(X,nt)|0,l=l+Math.imul(X,it)|0,l=l+Math.imul(Q,nt)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(j,rt)|0,l=l+Math.imul(j,at)|0,l=l+Math.imul(K,rt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(f,st)|0,l=l+Math.imul(f,ot)|0,l=l+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var Ku=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(He,Ge),l=Math.imul(He,ze),l=l+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(je,We)|0,l=l+Math.imul(je,Ke)|0,l=l+Math.imul(Ve,We)|0,m=m+Math.imul(Ve,Ke)|0,g=g+Math.imul(Le,Je)|0,l=l+Math.imul(Le,$e)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,l=l+Math.imul(Be,Xe)|0,l=l+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,l=l+Math.imul(De,Ze)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,l=l+Math.imul(Pe,tt)|0,l=l+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul(Z,nt)|0,l=l+Math.imul(Z,it)|0,l=l+Math.imul(de,nt)|0,m=m+Math.imul(de,it)|0,g=g+Math.imul(X,rt)|0,l=l+Math.imul(X,at)|0,l=l+Math.imul(Q,rt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(j,st)|0,l=l+Math.imul(j,ot)|0,l=l+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(f,ut)|0,l=l+Math.imul(f,lt)|0,l=l+Math.imul(P,ut)|0,m=m+Math.imul(P,lt)|0;var Ju=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(He,We),l=Math.imul(He,Ke),l=l+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(je,Je)|0,l=l+Math.imul(je,$e)|0,l=l+Math.imul(Ve,Je)|0,m=m+Math.imul(Ve,$e)|0,g=g+Math.imul(Le,Qe)|0,l=l+Math.imul(Le,Xe)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,l=l+Math.imul(Be,Ze)|0,l=l+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,l=l+Math.imul(De,tt)|0,l=l+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,l=l+Math.imul(Pe,it)|0,l=l+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,it)|0,g=g+Math.imul(Z,rt)|0,l=l+Math.imul(Z,at)|0,l=l+Math.imul(de,rt)|0,m=m+Math.imul(de,at)|0,g=g+Math.imul(X,st)|0,l=l+Math.imul(X,ot)|0,l=l+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(j,ut)|0,l=l+Math.imul(j,lt)|0,l=l+Math.imul(K,ut)|0,m=m+Math.imul(K,lt)|0;var $u=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(He,Je),l=Math.imul(He,$e),l=l+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(je,Qe)|0,l=l+Math.imul(je,Xe)|0,l=l+Math.imul(Ve,Qe)|0,m=m+Math.imul(Ve,Xe)|0,g=g+Math.imul(Le,Ye)|0,l=l+Math.imul(Le,Ze)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,l=l+Math.imul(Be,tt)|0,l=l+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,l=l+Math.imul(De,it)|0,l=l+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,it)|0,g=g+Math.imul(Pe,rt)|0,l=l+Math.imul(Pe,at)|0,l=l+Math.imul(Ne,rt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul(Z,st)|0,l=l+Math.imul(Z,ot)|0,l=l+Math.imul(de,st)|0,m=m+Math.imul(de,ot)|0,g=g+Math.imul(X,ut)|0,l=l+Math.imul(X,lt)|0,l=l+Math.imul(Q,ut)|0,m=m+Math.imul(Q,lt)|0;var Qu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(He,Qe),l=Math.imul(He,Xe),l=l+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(je,Ye)|0,l=l+Math.imul(je,Ze)|0,l=l+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Ze)|0,g=g+Math.imul(Le,et)|0,l=l+Math.imul(Le,tt)|0,l=l+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,l=l+Math.imul(Be,it)|0,l=l+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,it)|0,g=g+Math.imul(De,rt)|0,l=l+Math.imul(De,at)|0,l=l+Math.imul(Oe,rt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,st)|0,l=l+Math.imul(Pe,ot)|0,l=l+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul(Z,ut)|0,l=l+Math.imul(Z,lt)|0,l=l+Math.imul(de,ut)|0,m=m+Math.imul(de,lt)|0;var Xu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(He,Ye),l=Math.imul(He,Ze),l=l+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(je,et)|0,l=l+Math.imul(je,tt)|0,l=l+Math.imul(Ve,et)|0,m=m+Math.imul(Ve,tt)|0,g=g+Math.imul(Le,nt)|0,l=l+Math.imul(Le,it)|0,l=l+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,it)|0,g=g+Math.imul(Be,rt)|0,l=l+Math.imul(Be,at)|0,l=l+Math.imul(Fe,rt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,st)|0,l=l+Math.imul(De,ot)|0,l=l+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,l=l+Math.imul(Pe,lt)|0,l=l+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,lt)|0;var Yu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(He,et),l=Math.imul(He,tt),l=l+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(je,nt)|0,l=l+Math.imul(je,it)|0,l=l+Math.imul(Ve,nt)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Le,rt)|0,l=l+Math.imul(Le,at)|0,l=l+Math.imul(Ue,rt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,st)|0,l=l+Math.imul(Be,ot)|0,l=l+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,l=l+Math.imul(De,lt)|0,l=l+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,lt)|0;var Zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(He,nt),l=Math.imul(He,it),l=l+Math.imul(qe,nt)|0,m=Math.imul(qe,it),g=g+Math.imul(je,rt)|0,l=l+Math.imul(je,at)|0,l=l+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,at)|0,g=g+Math.imul(Le,st)|0,l=l+Math.imul(Le,ot)|0,l=l+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,l=l+Math.imul(Be,lt)|0,l=l+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,lt)|0;var el=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(He,rt),l=Math.imul(He,at),l=l+Math.imul(qe,rt)|0,m=Math.imul(qe,at),g=g+Math.imul(je,st)|0,l=l+Math.imul(je,ot)|0,l=l+Math.imul(Ve,st)|0,m=m+Math.imul(Ve,ot)|0,g=g+Math.imul(Le,ut)|0,l=l+Math.imul(Le,lt)|0,l=l+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,lt)|0;var tl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(He,st),l=Math.imul(He,ot),l=l+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(je,ut)|0,l=l+Math.imul(je,lt)|0,l=l+Math.imul(Ve,ut)|0,m=m+Math.imul(Ve,lt)|0;var nl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(He,ut),l=Math.imul(He,lt),l=l+Math.imul(qe,ut)|0,m=Math.imul(qe,lt);var il=(A+g|0)+((l&8191)<<13)|0;return A=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,h[0]=vi,h[1]=wi,h[2]=_i,h[3]=Ai,h[4]=ki,h[5]=Gu,h[6]=zu,h[7]=Wu,h[8]=Ku,h[9]=Ju,h[10]=$u,h[11]=Qu,h[12]=Xu,h[13]=Yu,h[14]=Zu,h[15]=el,h[16]=tl,h[17]=nl,h[18]=il,A!==0&&(h[19]=A,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,k=0;k>>26)|0,w+=h>>>26,h&=67108863}y.words[k]=A,x=h,h=w}return x!==0?y.words[k]=x:y.length--,y._strip()}function H(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=H(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,k,h){for(var A=0;A>>1)k++;return 1<>>13,x[2*h+1]=k&8191,k=k>>>13;for(h=2*y;h>=26,x+=k/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,k;if(y!==0){var h=0;for(k=0;k>>26-y}h&&(this.words[k]=h,this.length++)}if(x!==0){for(k=this.length-1;k>=0;k--)this.words[k+x]=this.words[k];for(k=0;k=0);var w;y?w=(y-y%26)/26:w=0;var k=u%26,h=Math.min((u-k)/26,this.length),A=67108863^67108863>>>k<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-k|G>>>k,m=G&A}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[k+x]=h&67108863}for(;k>26,this.words[k+x]=h&67108863;if(A===0)return this._strip();for(t(A===-1),A=0,k=0;k>26,this.words[k]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),k=u,h=k.words[k.length-1]|0,A=this._countBits(h);x=26-A,x!==0&&(k=k.ushln(x),w.iushln(x),h=k.words[k.length-1]|0);var g=w.length-k.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[k.length+f]|0)*67108864+(w.words[k.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(k,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(k,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,k,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.iadd(u)),{div:w,mod:k}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.isub(u)),{div:h.div,mod:k}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),k=u.andln(1),h=x.cmp(w);return h<0||k===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,k=this.length-1;k>=0;k--)w=(x*w+(this.words[k]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var k=(this.words[w]|0)+x*67108864;this.words[w]=k/u|0,x=k%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=new r(0),A=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(l),k.isub(m)),w.iushrn(1),k.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||A.isOdd())&&(h.iadd(l),A.isub(m)),h.iushrn(1),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),k.isub(A)):(x.isub(y),h.isub(w),A.isub(k))}return{a:h,b:A,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,g=1;(y.words[0]&g)===0&&A<26;++A,g<<=1);if(A>0)for(y.iushrn(A);A-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)k.isOdd()&&k.iadd(h),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(k)):(x.isub(y),k.isub(w))}var G;return y.cmpn(1)===0?G=w:G=k,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var k=y.cmp(x);if(k<0){var h=y;y=x,x=h}else if(k===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,A&=67108863,this.words[h]=A}return k!==0&&(this.words[h]=k,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,k=u.words[x]|0;if(w!==k){wk&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new q(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),k=0;k>>22,h=A}h>>>=22,u.words[k-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=k,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),k=0;!w.isZero()&&w.andln(1)===0;)k++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),A=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(A)!==0;)l.redIAdd(A);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=k;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;k--){for(var m=y.words[k],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&A===0){g=0;continue}A<<=1,A|=f,g++,!(g!==x&&(k!==0||G!==0))&&(h=this.mul(h,w[A]),g=0,A=0)}l=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){q.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof rl>"u"||rl,qp)});var f0=ie((wg,Qs)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,K){return new l(f,P,K).update(j)[D]()}},$=function(f,P,D){return function(j,K,ee,X){return u["cshake"+f].update(j,K,ee,X)[D]()}},le=function(f,P,D){return function(j,K,ee,X){return u["kmac"+f].update(j,K,ee,X)[D]()}},T=function(f,P,D,j){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,K=this.byteCount,ee=f.length,X=this.blockCount,Q=0,pt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=j[X],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++j;return P?K.push(j):K.unshift(j),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,K=f.length;if(P)j=K;else for(var ee=0;ee=57344?j+=3:(X=65536+((X&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return j&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],j>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var pt=new Uint32Array(Q);ee>8&255,X[Q+2]=pt>>16&255,X[Q+3]=pt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,pt=P[K],X[Q]=pt&255,j>1&&(X[Q+1]=pt>>8&255),j>2&&(X[Q+2]=pt>>16&255)),X};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,K,ee,X,Q,pt,Z,de,Hi,Pe,Ne,qi,De,Oe,Gi,Be,Fe,zi,Le,Ue,Wi,je,Ve,Ki,He,qe,Ji,Ge,ze,$i,We,Ke,Qi,Je,$e,Xi,Qe,Xe,Yi,Ye,Ze,Zi,et,tt,er,nt,it,tr,rt,at,nr,st,ot,ir,ut,lt,vi,wi,_i,Ai,ki;for(j=0;j<48;j+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],X=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],pt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Hi=f[7]^f[17]^f[27]^f[37]^f[47],Pe=f[8]^f[18]^f[28]^f[38]^f[48],Ne=f[9]^f[19]^f[29]^f[39]^f[49],P=Pe^(X<<1|Q>>>31),D=Ne^(Q<<1|X>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(pt<<1|Z>>>31),D=ee^(Z<<1|pt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=X^(de<<1|Hi>>>31),D=Q^(Hi<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=pt^(Pe<<1|Ne>>>31),D=Z^(Ne<<1|Pe>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Hi^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,qi=f[0],De=f[1],tt=f[11]<<4|f[10]>>>28,er=f[10]<<4|f[11]>>>28,qe=f[20]<<3|f[21]>>>29,Ji=f[21]<<3|f[20]>>>29,wi=f[31]<<9|f[30]>>>23,_i=f[30]<<9|f[31]>>>23,Ye=f[40]<<18|f[41]>>>14,Ze=f[41]<<18|f[40]>>>14,Ke=f[2]<<1|f[3]>>>31,Qi=f[3]<<1|f[2]>>>31,Oe=f[13]<<12|f[12]>>>20,Gi=f[12]<<12|f[13]>>>20,nt=f[22]<<10|f[23]>>>22,it=f[23]<<10|f[22]>>>22,Ge=f[33]<<13|f[32]>>>19,ze=f[32]<<13|f[33]>>>19,Ai=f[42]<<2|f[43]>>>30,ki=f[43]<<2|f[42]>>>30,st=f[5]<<30|f[4]>>>2,ot=f[4]<<30|f[5]>>>2,Je=f[14]<<6|f[15]>>>26,$e=f[15]<<6|f[14]>>>26,Be=f[25]<<11|f[24]>>>21,Fe=f[24]<<11|f[25]>>>21,tr=f[34]<<15|f[35]>>>17,rt=f[35]<<15|f[34]>>>17,$i=f[45]<<29|f[44]>>>3,We=f[44]<<29|f[45]>>>3,je=f[6]<<28|f[7]>>>4,Ve=f[7]<<28|f[6]>>>4,ir=f[17]<<23|f[16]>>>9,ut=f[16]<<23|f[17]>>>9,Xi=f[26]<<25|f[27]>>>7,Qe=f[27]<<25|f[26]>>>7,zi=f[36]<<21|f[37]>>>11,Le=f[37]<<21|f[36]>>>11,at=f[47]<<24|f[46]>>>8,nr=f[46]<<24|f[47]>>>8,Zi=f[8]<<27|f[9]>>>5,et=f[9]<<27|f[8]>>>5,Ki=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,lt=f[29]<<7|f[28]>>>25,vi=f[28]<<7|f[29]>>>25,Xe=f[38]<<8|f[39]>>>24,Yi=f[39]<<8|f[38]>>>24,Ue=f[48]<<14|f[49]>>>18,Wi=f[49]<<14|f[48]>>>18,f[0]=qi^~Oe&Be,f[1]=De^~Gi&Fe,f[10]=je^~Ki&qe,f[11]=Ve^~He&Ji,f[20]=Ke^~Je&Xi,f[21]=Qi^~$e&Qe,f[30]=Zi^~tt&nt,f[31]=et^~er&it,f[40]=st^~ir<,f[41]=ot^~ut&vi,f[2]=Oe^~Be&zi,f[3]=Gi^~Fe&Le,f[12]=Ki^~qe&Ge,f[13]=He^~Ji&ze,f[22]=Je^~Xi&Xe,f[23]=$e^~Qe&Yi,f[32]=tt^~nt&tr,f[33]=er^~it&rt,f[42]=ir^~lt&wi,f[43]=ut^~vi&_i,f[4]=Be^~zi&Ue,f[5]=Fe^~Le&Wi,f[14]=qe^~Ge&$i,f[15]=Ji^~ze&We,f[24]=Xi^~Xe&Ye,f[25]=Qe^~Yi&Ze,f[34]=nt^~tr&at,f[35]=it^~rt&nr,f[44]=lt^~wi&Ai,f[45]=vi^~_i&ki,f[6]=zi^~Ue&qi,f[7]=Le^~Wi&De,f[16]=Ge^~$i&je,f[17]=ze^~We&Ve,f[26]=Xe^~Ye&Ke,f[27]=Yi^~Ze&Qi,f[36]=tr^~at&Zi,f[37]=rt^~nr&et,f[46]=wi^~Ai&st,f[47]=_i^~ki&ot,f[8]=Ue^~qi&Oe,f[9]=Wi^~De&Gi,f[18]=$i^~je&Ki,f[19]=We^~Ve&He,f[28]=Ye^~Ke&Je,f[29]=Ze^~Qi&$e,f[38]=at^~Zi&tt,f[39]=nr^~et&er,f[48]=Ai^~st&ir,f[49]=ki^~ot&ut,f[0]^=S[j],f[1]^=S[j+1]};if(s)Qs.exports=u;else{for(x=0;x{ly.exports=uy;function uy(i,e){if(!i)throw new Error(e||"Assertion failed")}uy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var dy=ie((f3,Pl)=>{typeof Object.create=="function"?Pl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Mn=ie(Re=>{"use strict";var J6=ia(),$6=dy();Re.inherits=$6;function Q6(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function X6(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):Q6(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Re.htonl=py;function Z6(i,e){for(var t="",n=0;n>>0}return a}Re.join32=e2;function t2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Re.split32=t2;function n2(i,e){return i>>>e|i<<32-e}Re.rotr32=n2;function i2(i,e){return i<>>32-e}Re.rotl32=i2;function r2(i,e){return i+e>>>0}Re.sum32=r2;function a2(i,e,t){return i+e+t>>>0}Re.sum32_3=a2;function s2(i,e,t,n){return i+e+t+n>>>0}Re.sum32_4=s2;function o2(i,e,t,n,r){return i+e+t+n+r>>>0}Re.sum32_5=o2;function u2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Re.sum64=u2;function l2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Re.sum64_hi=l2;function d2(i,e,t,n){var r=e+n;return r>>>0}Re.sum64_lo=d2;function p2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Re.sum64_4_hi=p2;function y2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Re.sum64_4_lo=y2;function c2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Re.sum64_5_hi=c2;function f2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Re.sum64_5_lo=f2;function m2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Re.rotr64_hi=m2;function h2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.rotr64_lo=h2;function b2(i,e,t){return i>>>t}Re.shr64_hi=b2;function x2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.shr64_lo=x2});var ra=ie(my=>{"use strict";var fy=Mn(),g2=ia();function xo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}my.BlockHash=xo;xo.prototype.update=function(e,t){if(e=fy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=fy.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var T2=Mn(),Hn=T2.rotr32;function v2(i,e,t,n){if(i===0)return hy(e,t,n);if(i===1||i===3)return xy(e,t,n);if(i===2)return by(e,t,n)}li.ft_1=v2;function hy(i,e,t){return i&e^~i&t}li.ch32=hy;function by(i,e,t){return i&e^i&t^e&t}li.maj32=by;function xy(i,e,t){return i^e^t}li.p32=xy;function w2(i){return Hn(i,2)^Hn(i,13)^Hn(i,22)}li.s0_256=w2;function _2(i){return Hn(i,6)^Hn(i,11)^Hn(i,25)}li.s1_256=_2;function A2(i){return Hn(i,7)^Hn(i,18)^i>>>3}li.g0_256=A2;function k2(i){return Hn(i,17)^Hn(i,19)^i>>>10}li.g1_256=k2});var vy=ie((x3,Ty)=>{"use strict";var aa=Mn(),M2=ra(),E2=Nl(),Dl=aa.rotl32,Qa=aa.sum32,C2=aa.sum32_5,I2=E2.ft_1,gy=M2.BlockHash,S2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;gy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}aa.inherits(qn,gy);Ty.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var sa=Mn(),R2=ra(),oa=Nl(),P2=ia(),En=sa.sum32,N2=sa.sum32_4,D2=sa.sum32_5,O2=oa.ch32,B2=oa.maj32,F2=oa.s0_256,L2=oa.s1_256,U2=oa.g0_256,j2=oa.g1_256,wy=R2.BlockHash,V2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;wy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=V2,this.W=new Array(64)}sa.inherits(Gn,wy);_y.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var Bl=Mn(),Ay=Ol();function di(){if(!(this instanceof di))return new di;Ay.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Bl.inherits(di,Ay);ky.exports=di;di.blockSize=512;di.outSize=224;di.hmacStrength=192;di.padLength=64;di.prototype._digest=function(e){return e==="hex"?Bl.toHex32(this.h.slice(0,7),"big"):Bl.split32(this.h.slice(0,7),"big")}});var Ul=ie((v3,Sy)=>{"use strict";var Qt=Mn(),H2=ra(),q2=ia(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,Ey=Qt.shr64_hi,Cy=Qt.shr64_lo,Si=Qt.sum64,Fl=Qt.sum64_hi,Ll=Qt.sum64_lo,G2=Qt.sum64_4_hi,z2=Qt.sum64_4_lo,W2=Qt.sum64_5_hi,K2=Qt.sum64_5_lo,Iy=H2.BlockHash,J2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Cn(){if(!(this instanceof Cn))return new Cn;Iy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=J2,this.W=new Array(160)}Qt.inherits(Cn,Iy);Sy.exports=Cn;Cn.blockSize=1024;Cn.outSize=512;Cn.hmacStrength=192;Cn.padLength=128;Cn.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var jl=Mn(),Ry=Ul();function pi(){if(!(this instanceof pi))return new pi;Ry.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}jl.inherits(pi,Ry);Py.exports=pi;pi.blockSize=1024;pi.outSize=384;pi.hmacStrength=192;pi.padLength=128;pi.prototype._digest=function(e){return e==="hex"?jl.toHex32(this.h.slice(0,12),"big"):jl.split32(this.h.slice(0,12),"big")}});var Dy=ie(ua=>{"use strict";ua.sha1=vy();ua.sha224=My();ua.sha256=Ol();ua.sha384=Ny();ua.sha512=Ul()});var jy=ie(Uy=>{"use strict";var dr=Mn(),ob=ra(),go=dr.rotl32,Oy=dr.sum32,Xa=dr.sum32_3,By=dr.sum32_4,Ly=ob.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;Ly.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}dr.inherits(Kn,Ly);Uy.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Oy(go(By(n,Fy(_,r,a,s),e[db[_]+t],ub(_)),yb[_]),o);n=o,o=s,s=go(a,10),a=r,r=v,v=Oy(go(By(d,Fy(79-_,p,c,b),e[pb[_]+t],lb(_)),cb[_]),I),d=I,I=b,b=go(c,10),c=p,p=v}v=Xa(this.h[1],a,b),this.h[1]=Xa(this.h[2],s,I),this.h[2]=Xa(this.h[3],o,d),this.h[3]=Xa(this.h[4],n,p),this.h[4]=Xa(this.h[0],r,c),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?dr.toHex32(this.h,"little"):dr.split32(this.h,"little")};function Fy(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function ub(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function lb(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var db=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],pb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],yb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],cb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Hy=ie((k3,Vy)=>{"use strict";var fb=Mn(),mb=ia();function la(i,e,t){if(!(this instanceof la))return new la(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(fb.toArray(e,t))}Vy.exports=la;la.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),mb(e.length<=this.blockSize);for(var t=e.length;t{var Rt=qy;Rt.utils=Mn();Rt.common=ra();Rt.sha=Dy();Rt.ripemd=jy();Rt.hmac=Hy();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var sd=ie((ad,bc)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var A=0;A255)return!1;return!0}function n(h,A){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return A&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,A,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),A.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:A}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+A[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var A=[],g=0;g>2,this._Ke[G][A%4]=m[A],this._Kd[h-G][A%4]=m[A];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var A=1;A>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var A=l/2+1;A>2,K=P%4,this._Ke[j][K]=m[A],this._Kd[h-j][K]=m[A++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var A=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[A][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var A=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^H[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[A][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var A=r(h.length),g=r(16),l=0;l=0;--A)this._counter[A]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,A){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",A instanceof u||(A=new u(A)),this._counter=A,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var A=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-A,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let k=S,h=L,A=O,g=U,l=H,m=E,G=J,f=$,P,D,j,K,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((k>>>2|k<<32-2)^(k>>>13|k<<32-13)^(k>>>22|k<<32-22))+(k&h^k&A^h&A)|0,f=G,G=m,m=l,l=g+K|0,g=A,A=h,h=k,k=K+ee|0;S=S+k|0,L=L+h|0,O=O+A|0,U=U+g|0,H=H+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&A(g)};if(!H)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof pd<"u"?gc.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(pd)});var Gc=ie((f4,qc)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hd={};for(os=0;os>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Vc(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=xa(e)^n>>5}for(e=xa(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=Vc(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=xa(n)^s,r+=qo.charAt(s)}for(a=0;a<6;++a)n=xa(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=qo.charAt(o)}return r}function Hc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=Vc(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function Zb(){var i=Hc.apply(null,arguments);if(typeof i=="object")return i}function e5(i){var e=Hc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof zd=="object"&&typeof Wd<"u"?Wd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(zd,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var Kd=ie(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Ss=ie((Ek,lm)=>{lm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $d=ie(Li=>{var ke=Ss(),Jd=()=>[{type:ke.RANGE,from:48,to:57}],dm=()=>[{type:ke.CHAR,value:95},{type:ke.RANGE,from:97,to:122},{type:ke.RANGE,from:65,to:90}].concat(Jd()),pm=()=>[{type:ke.CHAR,value:9},{type:ke.CHAR,value:10},{type:ke.CHAR,value:11},{type:ke.CHAR,value:12},{type:ke.CHAR,value:13},{type:ke.CHAR,value:32},{type:ke.CHAR,value:160},{type:ke.CHAR,value:5760},{type:ke.RANGE,from:8192,to:8202},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233},{type:ke.CHAR,value:8239},{type:ke.CHAR,value:8287},{type:ke.CHAR,value:12288},{type:ke.CHAR,value:65279}],q5=()=>[{type:ke.CHAR,value:10},{type:ke.CHAR,value:13},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233}];Li.words=()=>({type:ke.SET,set:dm(),not:!1});Li.notWords=()=>({type:ke.SET,set:dm(),not:!0});Li.ints=()=>({type:ke.SET,set:Jd(),not:!1});Li.notInts=()=>({type:ke.SET,set:Jd(),not:!0});Li.whitespace=()=>({type:ke.SET,set:pm(),not:!1});Li.notWhitespace=()=>({type:ke.SET,set:pm(),not:!0});Li.anyChar=()=>({type:ke.SET,set:q5(),not:!0})});var cm=ie(Rs=>{var ym=Ss(),Ia=$d(),G5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",z5={0:0,t:9,n:10,v:11,f:12,r:13};Rs.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?G5.indexOf(d):z5[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Rs.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Ia.words());else if(r[2])t.push(Ia.ints());else if(r[3])t.push(Ia.whitespace());else if(r[4])t.push(Ia.notWords());else if(r[5])t.push(Ia.notInts());else if(r[6])t.push(Ia.notWhitespace());else if(r[7])t.push({type:ym.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:ym.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Rs.error(e,"Unterminated character class")};Rs.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var fm=ie(Ps=>{var uu=Ss();Ps.wordBoundary=()=>({type:uu.POSITION,value:"b"});Ps.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Ps.begin=()=>({type:uu.POSITION,value:"^"});Ps.end=()=>({type:uu.POSITION,value:"$"})});var mm=ie((Rk,Qd)=>{var Sa=cm(),xn=Ss(),wr=$d(),lu=fm();Qd.exports=i=>{var e=0,t,n,r={type:xn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Sa.error(i,`Nothing to repeat at column ${O-1}`)},p=Sa.strToChars(i);for(t=p.length;e{"use strict";var gn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new gn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};hm.exports=Ui});var gm=ie((Nk,xm)=>{var du=mm(),Ns=bm(),_r=du.types;xm.exports=class Ds{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=du(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ds.prototype.max!=null?Ds.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case _r.ROOT:case _r.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var W5=Ar&&Ar.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.RandomGenerator=void 0;var K5=W5(gm()),J5;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new K5.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(J5=Ar.RandomGenerator||(Ar.RandomGenerator={}))});var Os=ie(Ra=>{"use strict";var $5=Ra&&Ra.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.TypeGuardError=void 0;var Q5=function(i){$5(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Ra.TypeGuardError=Q5});var vm=ie(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var X5=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};pu.$any=X5});var wm=ie(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var Y5=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$guard=void 0;var Z5=Os(),e1=function(i){return function(e,t){if(e===!0)throw new Z5.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};cu.$guard=e1});var Am=ie(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_between=void 0;var t1=function(i,e,t){return e<=i&&i<=t};fu.$is_between=t1});var km=ie(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var n1=Kd(),i1=function(i,e,t,n){var r,a=(r=n1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};mu.$is_custom=i1});var Mm=ie(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var r1=function(i){return a1.test(i)};hu.$is_date=r1;var a1=/^(\d{4})-(\d{2})-(\d{2})$/});var Em=ie(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_datetime=void 0;var s1=function(i){return!isNaN(new Date(i).getTime())};bu.$is_datetime=s1});var Cm=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_email=void 0;var o1=function(i){return u1.test(i)};xu.$is_email=o1;var u1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Im=ie(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var l1=function(i){return d1.test(i)};gu.$is_ipv4=l1;var d1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Sm=ie(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var p1=function(i){return y1.test(i)};Tu.$is_ipv6=p1;var y1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Rm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var c1=function(i){return f1.test(i)};vu.$is_url=c1;var f1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Pm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var m1=function(i){return h1.test(i)};wu.$is_uuid=m1;var h1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Nm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var b1=function(i){return x1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};_u.$join=b1;var x1=function(i){return g1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},g1=function(i){return T1.has(i)},T1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Dm=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$number=void 0;var v1=Os(),w1=function(i){if(isFinite(i)===!1)throw new v1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Au.$number=w1});var Om=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$report=void 0;var _1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};ku.$report=_1});var Bm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var A1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Mu.$rest=A1});var Fm=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var k1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Eu.$string=k1});var Lm=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$tail=void 0;var M1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Cu.$tail=M1});var Hm=ie(kr=>{"use strict";var jt=kr&&kr.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:U1.$number,string:H1.$string,tail:q1.$tail,rest:V1.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:E1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Um.RandomGenerator,pick:Um.RandomGenerator.pick}};var e=function(t){return function(n){throw new jm.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(G1=kr.Namespace||(kr.Namespace={}))});var qm=ie(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.MapUtil=void 0;var z1;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(z1=Bs.MapUtil||(Bs.MapUtil={}))});var zm=ie(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Km=ie(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var $m=ie(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var Xm=ie(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0})});var Zm=ie(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ie(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var lp=ie(z=>{"use strict";var W1=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Mr=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&W1(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pa=Kd(),Me=Hm(),K1=qm();Mr(zm(),z);Mr(Km(),z);Mr($m(),z);Mr(Xm(),z);Mr(Zm(),z);Mr(th(),z);Mr(Os(),z);function Xd(){ae("assert")}z.assert=Xd;Object.assign(Xd,Me.Namespace.assert("assert"));function Yd(){ae("assertType")}z.assertType=Yd;Object.assign(Yd,Me.Namespace.assert("assertType"));function Iu(){ae("is")}z.is=Iu;Object.assign(Iu,Me.Namespace.assert("is"));function Su(){ae("validate")}z.validate=Su;Object.assign(Su,Me.Namespace.validate());function Zd(){ae("assertEquals")}z.assertEquals=Zd;Object.assign(Zd,Me.Namespace.assert("assertEquals"));function ep(){ae("equals")}z.equals=ep;Object.assign(ep,Me.Namespace.is());function tp(){ae("validateEquals")}z.validateEquals=tp;Object.assign(tp,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Pa.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pa.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=K1.MapUtil.take(Pa.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function J1(){ae("application")}z.application=J1;function np(){ae("assertParse")}z.assertParse=np;Object.assign(np,Me.Namespace.assert("assertParse"));function ip(){ae("isParse")}z.isParse=ip;Object.assign(ip,Iu);function rp(){ae("validateParse")}z.validateParse=rp;Object.assign(rp,Su);function ap(){ae("stringify")}z.stringify=ap;Object.assign(ap,Me.Namespace.stringify("stringify"));function Ru(){ae("assertStringify")}z.assertStringify=Ru;Object.assign(Ru,Me.Namespace.assert("assertStringify"));Object.assign(Ru,Me.Namespace.stringify("assertStringify"));function Pu(){ae("isStringify")}z.isStringify=Pu;Object.assign(Pu,Me.Namespace.is());Object.assign(Pu,Me.Namespace.stringify("isStringify"));function Nu(){ae("validateStringify")}z.validateStringify=Nu;Object.assign(Nu,Me.Namespace.validate());Object.assign(Nu,Me.Namespace.stringify("validateStringify"));function $1(){ae("metadata")}z.metadata=$1;function sp(){ae("random")}z.random=sp;Object.assign(sp,Me.Namespace.random());function Q1(){ae("literals")}z.literals=Q1;function op(){ae("clone")}z.clone=op;Object.assign(op,Me.Namespace.clone("clone"));function Du(){ae("assertClone")}z.assertClone=Du;Object.assign(Du,Me.Namespace.assert("assertClone"));Object.assign(Du,Me.Namespace.clone("assertClone"));function Ou(){ae("isClone")}z.isClone=Ou;Object.assign(Ou,Me.Namespace.is());Object.assign(Ou,Me.Namespace.clone("isClone"));function Bu(){ae("validateClone")}z.validateClone=Bu;Object.assign(Bu,Me.Namespace.validate());Object.assign(Bu,Me.Namespace.clone("validateClone"));function up(){ae("prune")}z.prune=up;Object.assign(up,Me.Namespace.prune("prune"));function Fu(){ae("assertPrune")}z.assertPrune=Fu;Object.assign(Fu,Me.Namespace.assert("assertPrune"));Object.assign(Fu,Me.Namespace.prune("assertPrune"));function Lu(){ae("isPrune")}z.isPrune=Lu;Object.assign(Lu,Me.Namespace.is());Object.assign(Lu,Me.Namespace.prune("isPrune"));function Uu(){ae("validatePrune")}z.validatePrune=Uu;Object.assign(Uu,Me.Namespace.prune("validatePrune"));Object.assign(Uu,Me.Namespace.validate());function nh(){ae("createAssert")}z.createAssert=nh;Object.assign(nh,Xd);function ih(){ae("createAssertType")}z.createAssertType=ih;Object.assign(ih,Yd);function rh(){ae("createIs")}z.createIs=rh;Object.assign(rh,Iu);function ah(){ae("createValidate")}z.createValidate=ah;Object.assign(ah,Su);function sh(){ae("createAssertEquals")}z.createAssertEquals=sh;Object.assign(sh,Zd);function oh(){ae("createEquals")}z.createEquals=oh;Object.assign(oh,ep);function uh(){ae("createValidateEquals")}z.createValidateEquals=uh;Object.assign(uh,tp);function lh(){ae("createIsParse")}z.createIsParse=lh;Object.assign(lh,ip);function dh(){ae("createAssertParse")}z.createAssertParse=dh;Object.assign(dh,np);function ph(){ae("createValidateParse")}z.createValidateParse=ph;Object.assign(ph,rp);function yh(){ae("createStringify")}z.createStringify=yh;Object.assign(yh,ap);function ch(){ae("createAssertStringify")}z.createAssertStringify=ch;Object.assign(ch,Ru);function fh(){ae("createIsStringify")}z.createIsStringify=fh;Object.assign(fh,Pu);function mh(){ae("createValidateStringify")}z.createValidateStringify=mh;Object.assign(mh,Nu);function hh(){ae("createRandom")}z.createRandom=hh;Object.assign(hh,sp);function bh(){ae("createClone")}z.createClone=bh;Object.assign(bh,op);function xh(){ae("createAssertClone")}z.createAssertClone=xh;Object.assign(xh,Du);function gh(){ae("createIsClone")}z.createIsClone=gh;Object.assign(gh,Ou);function Th(){ae("createValidateClone")}z.createValidateClone=Th;Object.assign(Th,Bu);function vh(){ae("createPrune")}z.createPrune=vh;Object.assign(vh,up);function wh(){ae("createAssertPrune")}z.createAssertPrune=wh;Object.assign(wh,Fu);function _h(){ae("createIsPrune")}z.createIsPrune=_h;Object.assign(_h,Lu);function Ah(){ae("createValidatePrune")}z.createValidatePrune=Ah;Object.assign(Ah,Uu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Mh=ie(Tn=>{"use strict";var kh=Tn&&Tn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),X1=Tn&&Tn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),Y1=Tn&&Tn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&kh(e,i,t);return X1(e,i),e},Z1=Tn&&Tn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kh(e,i,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var ex=Y1(lp());Tn.default=ex;Z1(lp(),Tn)});var Rd={};Hr(Rd,{BaseContract:()=>pa,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>fr,FixedNumber:()=>yt,Signer:()=>St,VoidSigner:()=>ui,Wallet:()=>on,Wordlist:()=>bn,constants:()=>mt,errors:()=>Wt,getDefaultProvider:()=>tu,logger:()=>Mf,providers:()=>ei,utils:()=>te,version:()=>iu,wordlists:()=>hr});var t0=An(al());var Gp="logger/5.7.0";var zp=!1,Wp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},Kp=zs.default,sl=null;function Gh(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var Jp=Gh(),ol;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(ol||(ol={}));var Wt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var $p="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();zs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Kp>zs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(Wp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=$p[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Jp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Jp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return sl||(sl=new M(Gp)),sl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Wp=!!e,zp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Kp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=ol;var Qp="bytes/5.7.0";var vt=new M(Qp);function Yp(i){return!!i.toHexString}function qr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return qr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ii(i){return re(i)&&!(i.length%2)||un(i)}function Xp(i){return typeof i=="number"&&i==i&&i%1===0}function un(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!Xp(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),qr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Yp(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),qr(n)}function Zt(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),qr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var ul="0123456789abcdef";function W(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=ul[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Yp(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(un(i)){let t="0x";for(let n=0;n>4]+ul[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Nt(i){if(typeof i!="string")i=W(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ee(i,e,t){return typeof i!="string"?i=W(i):(!re(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(i){let e=ll(W(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function ll(i){typeof i!="string"&&(i=W(i)),re(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function Un(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ii(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=rr(V(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=me(e.r,32),e.s==null||!re(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=me(e.s,32);let t=V(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(re(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fa(i){return i=Un(i),W(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var La=t0.default.BN,ri=new M(Ws),dl={},Zp=9007199254740991;function n0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||un(i))}var e0=!1,F=class{constructor(e,t){e!==dl&&ri.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&ln("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&ln("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&ln("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ln("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ln("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ln("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{ln("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ri.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?e0||(e0=!0,ri.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ri.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ri.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(dl,Ua(e)):e.match(/^-?[0-9]+$/)?new F(dl,Ua(new La(e))):ri.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ln("underflow","BigNumber.from",e),(e>=Zp||e<=-Zp)&&ln("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(un(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return ri.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ua(i){if(typeof i!="string")return Ua(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ri.throwArgumentError("invalid hex","value",i),i=Ua(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Kt(i){return F.from(Ua(i))}function be(i){let e=F.from(i).toHexString();return e[0]==="-"?new La("-"+e.substring(3),16):new La(e.substring(2),16)}function ln(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ri.throwError(i,M.errors.NUMERIC_FAULT,n)}function pl(i){return new La(i,36).toString(16)}function yl(i){return new La(i,16).toString(36)}var Vt=new M(Ws),ja={},r0=F.from(0),a0=F.from(-1);function s0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,M.errors.NUMERIC_FAULT,r)}var Va="0";for(;Va.length<256;)Va+=Va;function cl(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Va.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function Gr(i,e){e==null&&(e=0);let t=cl(e);i=F.from(i);let n=i.lt(r0);n&&(i=i.mul(a0));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&s0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new ai(ja,t,n,r)}},yt=class{constructor(e,t,n,r){e!==ja&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return yt.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return yt.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return yt.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return yt.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(i0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(i0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=yt.from("1"+Va.substring(0,e),this.format),r=zh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return yt.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!n0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),yt.fromString(Gr(e,t),ai.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ai.from(t),r=dn(e,n.decimals);!n.signed&&r.lt(r0)&&s0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=me(a,n.width/8));let s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ai.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static from(e,t){if(typeof e=="string")return yt.fromString(e,t);if(un(e))return yt.fromBytes(e,t);try{return yt.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},i0=yt.from(1),zh=yt.from("0.5");var o0="properties/5.7.0";var Wh=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ks=new M(o0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function ft(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ce(i){return Wh(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function zr(i,e){(!i||typeof i!="object")&&Ks.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||Ks.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var Kh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function u0(i){if(i==null||Kh[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tct(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ct(n))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ct(i){return Jh(i)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var jn="abi/5.7.0";var ge=new M(jn),ar={},l0={calldata:!0,memory:!0,storage:!0},$h={calldata:!0,memory:!0};function Js(i,e){if(i==="bytes"||i==="string"){if(l0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&$h[e])return!0;return(l0[e]||e==="payable")&&ge.throwArgumentError("invalid modifier","name",e),!1}function Qh(i,e){let t=i;function n(o){ge.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?dt.fromString(e,t):dt.fromObject(e)}static fromObject(e){return dt.isParamType(e)?e:new dt(ar,{name:e.name||null,type:Wr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(dt.fromObject):null})}static fromString(e,t){function n(r){return dt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(Qh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Ha(i,e){return Zh(i).map(t=>dt.fromString(t,e))}var qt=class{constructor(e,t){e!==ar&&ge.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),$s(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&ge.throwArgumentError("invalid event object","value",e);let t={name:qa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dt.fromObject):[],type:"event"};return new Ht(ar,t)}static fromString(e){let t=e.match(Ga);t||ge.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:ge.warn("unknown modifier: "+r)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Ha(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function p0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&ge.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||ge.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function y0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function c0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ge.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e}var Dt=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&ge.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&ge.throwArgumentError("invalid constructor object","value",e);let t=c0(e);t.constant&&ge.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ar,n)}static fromString(e){let t={type:"constructor"};e=p0(e,t);let n=e.match(Ga);return(!n||n[1].trim()!=="constructor")&&ge.throwArgumentError("invalid constructor string","value",e),t.inputs=Ha(n[2].trim(),!1),y0(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&ge.throwArgumentError("invalid function object","value",e);let t=c0(e),n={type:e.type,name:qa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(dt.fromObject):[],outputs:e.outputs?e.outputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ar,n)}static fromString(e){let t={type:"function"};e=p0(e,t);let n=e.split(" returns ");n.length>2&&ge.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ga);if(r||ge.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&qa(t.name),t.inputs=Ha(r[2],!1),y0(r[3].trim(),t),n.length>1){let a=n[1].match(Ga);(a[1].trim()!=""||a[3].trim()!="")&&ge.throwArgumentError("unexpected tokens","value",e),t.outputs=Ha(a[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function d0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&ge.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qa(e.name),inputs:e.inputs?e.inputs.map(dt.fromObject):[]};return d0(new tn(ar,t))}static fromString(e){let t={type:"error"},n=e.match(Ga);return n||ge.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qa(t.name),t.inputs=Ha(n[2],!1),d0(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Wr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var Yh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qa(i){return(!i||!i.match(Yh))&&ge.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ga=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Zh(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&fl.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},or=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):or.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:fl.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new or(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var m0=An(f0());function ce(i){return"0x"+m0.default.keccak_256(V(i))}var Xs={};Hr(Xs,{decode:()=>za,encode:()=>si});var h0="rlp/5.7.0";var Vn=new M(h0);function b0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function x0(i,e,t){let n=0;for(let r=0;re+1+n&&Vn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function v0(i,e){if(i.length===0&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&Vn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=x0(i,e+1,t);return e+1+t+n>i.length&&Vn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),g0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),g0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=x0(i,e+1,t);e+1+t+n>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=W(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(i[e])}}function za(i){let e=V(i),t=v0(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",i),t.result}var w0="address/5.7.0";var Mi=new M(w0);function _0(i){re(i,20)||Mi.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var e6=9007199254740991;function t6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var ml={};for(let i=0;i<10;i++)ml[String(i)]=String(i);for(let i=0;i<26;i++)ml[String.fromCharCode(65+i)]=String(10+i);var A0=Math.floor(t6(e6));function k0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>ml[n]).join("");for(;e.length>=A0;){let n=e.substring(0,A0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Mi.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=_0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Mi.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==k0(i)&&Mi.throwArgumentError("bad icap checksum","address",i),e=pl(i.substring(4));e.length<40;)e="0"+e;e=_0("0x"+e)}else Mi.throwArgumentError("invalid address","address",i);return e}function M0(i){try{return fe(i),!0}catch{}return!1}function E0(i){let e=yl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+k0("XE00"+e)+e}function ur(i){let e=null;try{e=fe(i.from)}catch{Mi.throwArgumentError("missing from address","transaction",i)}let t=Zt(V(F.from(i.nonce).toHexString()));return fe(Ee(ce(si([e,t])),12))}function C0(i,e,t){return Nt(e)!==32&&Mi.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Mi.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ee(ce(ye(["0xff",fe(i),e,t])),12))}var Ys=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var Zs=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Jr=new M(jn);function hl(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Jr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Jr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Jr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Jr.throwArgumentError("types/value length mismatch","tuple",t);let r=new sr(i.wordSize),a=new sr(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function bl(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var eo=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Jr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rao,EtherSymbol:()=>N0,HashZero:()=>Qr,MaxInt256:()=>P0,MaxUint256:()=>uo,MinInt256:()=>R0,NegativeOne:()=>so,One:()=>oo,Two:()=>I0,WeiPerEther:()=>S0,Zero:()=>$r});var ao="0x0000000000000000000000000000000000000000";var so=F.from(-1),$r=F.from(0),oo=F.from(1),I0=F.from(2),S0=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),R0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),P0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qr="0x0000000000000000000000000000000000000000000000000000000000000000";var N0="\u039E";var lo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=uo.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(n.lt($r)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var D0="strings/5.7.0";var O0=new M(D0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Bt||(Bt={}));function n6(i,e,t,n,r){return O0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function B0(i,e,t,n,r){if(i===Bt.BAD_PREFIX||i===Bt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Bt.OVERRUN?t.length-e-1:0}function i6(i,e,t,n,r){return i===Bt.OVERLONG?(n.push(r),0):(n.push(65533),B0(i,e,t,n,r))}var po=Object.freeze({error:n6,ignore:B0,replace:i6});function gl(i,e){e==null&&(e=po.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Bt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Bt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Bt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function Te(i,e=Gt.current){e!=Gt.current&&(O0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function xl(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function Tl(i,e){return'"'+gl(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?xl(t):(t-=65536,xl((t>>10&1023)+55296)+xl((t&1023)+56320))}).join("")+'"'}function yo(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return yo(gl(i,e))}function Ei(i,e=Gt.current){return gl(Te(i,e))}function vl(i){let e=Te(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Qr]).slice(0,32))}function wl(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function r6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function F0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Al(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var a6=F0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),o6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u6=_l("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l6=_l("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d6=_l("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",r6),p6=F0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function y6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function c6(i){return!!Al(i,a6)}function f6(i){let e=Al(i,o6);if(e)return[i+e.s];let t=u6[i];if(t)return t;let n=l6[i];if(n)return[i+n[0]];let r=d6[i];return r||null}function m6(i){return!!Al(i,p6)}function kl(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Ei(i);e=y6(e.map(n=>{if(s6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=f6(n);return r||[n]})),e=Ei(yo(e),Gt.NFKC),e.forEach(n=>{if(m6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(c6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=yo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var co=class extends Wa{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Te(t))}decode(e){return Jt(super.decode(e))}};var lr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return hl(e,this.coders,t)}decode(e){return e.coerce(this.name,bl(e,this.coders))}};var fo=new M(jn),h6=new RegExp(/^bytes([0-9]*)$/),b6=new RegExp(/^(u?int)([0-9]*)$/),Xr=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ys(e.name);case"bool":return new to(e.name);case"string":return new co(e.name);case"bytes":return new no(e.name);case"array":return new eo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new lr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new ro(e.name)}let t=e.type.match(b6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&fo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(n/8,t[1]==="int",e.name)}if(t=e.type.match(h6),t){let n=parseInt(t[1]);return(n===0||n>32)&&fo.throwArgumentError("invalid bytes length","param",e),new io(n,e.name)}return fo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new or(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new sr(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(dt.from(r)));return new lr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&fo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(dt.from(s))),r=new lr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(dt.from(s)));return new lr(r,"_").decode(this._getReader(V(t),n))}},Ka=new Xr;function nn(i){return ce(Te(i))}var mo="hash/5.7.0";var Ml={};Hr(Ml,{decode:()=>Yr,encode:()=>Zr});function Yr(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function x6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function T6(i){let e=0;return()=>i[e++]}function j0(i){return T6(g6(i))}function v6(i){return i&1?~i>>1:i>>1}function w6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function V0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(k6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(M6(t,i))}return x6(U0(e))}function A6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function H0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function k6(i,e){let t=1+e(),n=e(),r=A6(e),a=H0(r.length,1+i,e);return U0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function M6(i,e){let t=1+e();return H0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function q0(i){let e=Ja(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Ja(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function G0(){return j0(Yr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var ho=G0(),E6=new Set(Ja(ho)),C6=new Set(Ja(ho)),I6=V0(ho),S6=q0(ho),z0=45,W0=95;function K0(i){return Ei(i)}function R6(i){return i.filter(e=>e!=65039)}function J0(i){for(let e of i.split(".")){let t=K0(e);try{for(let n=t.lastIndexOf(W0)-1;n>=0;n--)if(t[n]!==W0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===z0&&t[3]===z0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function $0(i){return J0(P6(i,R6))}function P6(i,e){let t=K0(i).reverse(),n=[];for(;t.length;){let r=D6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(E6.has(a)){n.push(a);continue}if(C6.has(a))continue;let s=I6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return J0(N6(String.fromCodePoint(...n)))}function N6(i){return i.normalize("NFC")}function D6(i,e){var t;let n=S6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var O6=new M(mo),X0=new Uint8Array(32);X0.fill(0);function Q0(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function El(i){let e=Te($0(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(Q0(e.slice(n))),t}function Cl(i){try{return El(i).length!==0}catch{}return!1}function Ci(i){typeof i!="string"&&O6.throwArgumentError("invalid ENS name; not a string","name",i);let e=X0,t=El(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function $a(i){return W(ye(El(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Y0=`Ethereum Signed Message: -`;function ea(i){return typeof i=="string"&&(i=Te(i)),ce(ye([Te(Y0),Te(String(i.length)),i]))}var B6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ht=new M(mo),ny=new Uint8Array(32);ny.fill(0);var F6=F.from(-1),iy=F.from(0),ry=F.from(1),L6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function U6(i){let e=V(i),t=e.length%32;return t?_t([e,ny.slice(t)]):W(e)}var j6=me(ry.toHexString(),32),V6=me(iy.toHexString(),32),Z0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Il=["name","version","chainId","verifyingContract","salt"];function ey(i){return function(e){return typeof e!="string"&&ht.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var H6={name:ey("name"),version:ey("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function Sl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",i);let r=L6.mask(t?n-1:n),a=t?r.add(ry).mul(F6):iy;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&ht.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&ht.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&ht.throwArgumentError(`invalid length for ${i}`,"value",n),U6(n)}}}switch(i){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?j6:V6};case"bytes":return function(e){return ce(e)};case"string":return function(e){return nn(e)}}return null}function ty(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&ht.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Sl(c)&&(n[c]||ht.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?ht.throwArgumentError("missing primary type","types",e):a.length>1&&ht.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=ty(o,e[o])+d.map(p=>ty(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=Sl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),_t(s)}}return ht.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||ht.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Sl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):ht.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=Z0[n];r||ht.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Il.indexOf(n.name)-Il.indexOf(r.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return ce(bt.encode(e,t,n))}static resolveNames(e,t,n,r){return B6(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let r={},a=[];Il.forEach(d=>{let p=e[d];p!=null&&(r[d]=H6[d](p),a.push({name:d,type:Z0[d]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&ht.throwArgumentError("invalid string","value",p),p}return ht.throwArgumentError("unsupported type","type",d)})}}};var xt=new M(jn);var ta=class extends en{},na=class extends en{},Rl=class extends en{},oi=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},q6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ay(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Ii=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ft(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){xt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){xt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&&xt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Ka}static getAddress(e){return fe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];xt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching function","name",n):r.length>1&&xt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];xt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching event","name",n):r.length>1&&xt.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Ht.fromString(e).format()];return t||xt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=ft(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}xt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching error","name",n):r.length>1&&xt.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ft(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ft(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=q6[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return xt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&xt.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?ce(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&xt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&xt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&&xt.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(dt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new oi({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oi({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw ay(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw ay(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new na({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ta({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Rl({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var sy="abstract-provider/5.7.0";var G6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},z6=new M(sy),bo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){z6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return G6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var oy="abstract-signer/5.7.0";var kn=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},pn=new M(oy),W6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],K6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){pn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)W6.indexOf(n)===-1&&pn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>kn(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&pn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&pn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&pn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):pn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(K6.indexOf(r.code)>=0)throw r;return pn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&pn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ce(t)})}_checkProvider(e){this.provider||pn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ui=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{pn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ui(this.address,e)}};var pe=An(al()),Jn=An(Vl());function da(i,e,t){return t={path:e,exports:{},require:function(n,r){return hb(n,r??t.path)}},i(t,t.exports),t.exports}function hb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zl=zy;function zy(i,e){if(!i)throw new Error(e||"Assertion failed")}zy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=da(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),wo=rn.getNAF,bb=rn.getJSF,_o=rn.assert;function Pi(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pr=Pi;Pi.prototype.point=function(){throw new Error("Not implemented")};Pi.prototype.validate=function(){throw new Error("Not implemented")};Pi.prototype._fixedNafMul=function(e,t){_o(e.precomputed);var n=e._getDoubles(),r=wo(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];_o(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Pi.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=wo(n[v],s[v],this._bitLength),d[S]=wo(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=bb(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};cn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(i,e,t,n){pr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wl(Pt,pr.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=da(function(i,e){"use strict";var t=e;t.base=pr,t.short=gb,t.mont=null,t.edwards=null}),vo=da(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new To.short(o):o.type==="edwards"?this.curve=new To.edwards(o):this.curve=new To.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ri(i){if(!(this instanceof Ri))return new Ri(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(i.entropy,i.entropyEnc||"hex"),t=In.toArray(i.nonce,i.nonceEnc||"hex"),n=In.toArray(i.pers,i.persEnc||"hex");zl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Wy=Ri;Ri.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ri.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=In.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var Tb=rn.assert;function Ao(i,e){if(i instanceof Ao)return i;this._importDER(i,e)||(Tb(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var ko=Ao;function vb(){this.place=0}function Hl(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Gy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Ao.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Gy(t),n=Gy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];ql(r,t.length),r=r.concat(t),r.push(2),ql(r,n.length);var a=r.concat(n),s=[48];return ql(s,a.length),s=s.concat(a),rn.encode(s,e)};var wb=function(){throw new Error("unsupported")},Ky=rn.assert;function yn(i){if(!(this instanceof yn))return new yn(i);typeof i=="string"&&(Ky(Object.prototype.hasOwnProperty.call(vo,i),"Unknown curve "+i),i=vo[i]),i instanceof vo.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var _b=yn;yn.prototype.keyPair=function(e){return new Kl(this,e)};yn.prototype.keyFromPrivate=function(e,t){return Kl.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return Kl.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Wy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||wb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};yn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};yn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new Wy({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new ko({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new ko(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};yn.prototype.recoverPubKey=function(i,e,t,n){Ky((3&t)===t,"The recovery param is more than two bits"),e=new ko(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};yn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new ko(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var Ab=da(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=To,t.curves=vo,t.ec=_b,t.eddsa=null}),Jy=Ab.ec;var $y="signing-key/5.7.0";var $l=new M($y),Jl=null;function $n(){return Jl||(Jl=new Jy("secp256k1")),Jl}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&$l.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(V(this.publicKey)),n=$n().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&$l.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return Un({recoveryParam:r.recoveryParam,r:me("0x"+r.r.toString(16),32),s:me("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=$n().keyFromPublic(V(Ya(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(i,e){let t=Un(e),n={r:V(t.r),s:V(t.s)};return"0x"+$n().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function Ya(i,e){let t=V(i);if(t.length===32){let n=new mn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return $l.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Qy="transactions/5.7.0";var Ut=new M(Qy),Eo;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xl(i){return i==="0x"?null:fe(i)}function Lt(i){return i==="0x"?$r:F.from(i)}var kb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Mb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(i){let e=Ya(i);return fe(Ee(ce(Ee(e,1)),12))}function yr(i,e){return hn(Mo(V(i),e))}function an(i,e){let t=Zt(F.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function Ql(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Ql(t[0],t[1])):Ql(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return Ql(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Xy(i){return sn(i).map(e=>[e.address,e.storageKeys])}function Yy(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Xy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",si(t)])}function Zy(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Xy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",si(t)])}function Eb(i,e){zr(i,Mb);let t=[];kb.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ii(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return si(t);let r=Un(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(Zt(V(r.r))),t.push(Zt(V(r.s))),si(t)}function Za(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),Eb(i,e);switch(i.type){case 1:return Zy(i,e);case 2:return Yy(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function ec(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=me(e[1],32),i.s=me(e[2],32);try{let n=ce(t(i));i.from=yr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function Cb(i){let e=za(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Xl(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=ce(i),ec(r,e.slice(9),Yy)),r}function Ib(i){let e=za(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Xl(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=ce(i),ec(t,e.slice(8),Zy)),t}function Sb(i){let e=za(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Xl(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(si(r));try{t.from=yr(a,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function Co(i){let e=V(i);if(e[0]>127)return Sb(e);switch(e[0]){case 1:return Ib(e);case 2:return Cb(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var tc="contracts/5.7.0";var Ni=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ie=new M(tc),Rb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Io(i,e){return Ni(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Ie.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(i,e,t){return Ni(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>es(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield Io(i,e):t.type==="tuple"?yield es(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(i,n,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(i,e,t){return Ni(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ce({override:Io(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Ni(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=Io(i.provider,n.from));let r=yield Ce({args:es(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ce(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Ie.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function Pb(i,e){return function(...t){return Po(i,e,t)}}function Nb(i,e){let t=i.signer||i.provider;return function(...n){return Ni(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Po(i,e,n);return yield t.estimateGas(r)})}}function ic(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ct(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function rc(i,e,t){let n=i.signer||i.provider;return function(...r){return Ni(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Po(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function Db(i,e){return function(...t){return Ni(this,void 0,void 0,function*(){i.signer||Ie.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Po(i,e,t),r=yield i.signer.sendTransaction(n);return ic(i,r),r})}}function nc(i,e,t){return e.constant?rc(i,e,t):Db(i,e)}function ac(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var cr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Yl=class extends cr{constructor(){super("error",null)}},So=class extends cr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ie.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(ac(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Kr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Ro=class extends cr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},pa=class{constructor(e,t,n){B(this,"interface",ft(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Ie.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Io(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,nc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,nc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,rc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Pb(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Nb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return ur(e)}static getInterface(e){return Ii.isInterface(e)?e:new Ii(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ui(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oi.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Yl);if(e==="event")return this._normalizeRunningEvent(new cr("event",null));if(e==="*")return this._normalizeRunningEvent(new Ro(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new So(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new So(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new cr(ac(t),t))}return this._normalizeRunningEvent(new Ro(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ct(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pa{},fr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:un(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Ie.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",ft(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!Rb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ni(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=ft(this.constructor,"getContractAddress")(a),o=ft(this.constructor,"getContract")(s,this.interface,this.signer);return ic(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ur(e)}static getContract(e,t,n){return new oe(e,t,n)}};var No=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(ci(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var Fh=Object.create;var Gs=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var Vh=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty;var Hh=(a,e,t)=>e in a?Gs(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Hi=(a,e)=>{for(var t in e)Gs(a,t,{get:e[t],enumerable:!0})},qh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Uh(e))!jh.call(a,i)&&i!==t&&Gs(a,i,{get:()=>e[i],enumerable:!(n=Lh(e,i))||n.enumerable});return a};var kn=(a,e,t)=>(t=a!=null?Fh(Vh(a)):{},qh(e||!a||!a.__esModule?Gs(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(Hh(a,typeof e!="symbol"?e+"":e,t),t);var Hp=ae(()=>{});var rd=ae((qp,id)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Hp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,le=yt>>>13,Ha=w[4]|0,Ne=Ha&8191,De=Ha>>>13,qa=w[5]|0,Oe=qa&8191,Be=qa>>>13,Ga=w[6]|0,Fe=Ga&8191,Le=Ga>>>13,za=w[7]|0,Ue=za&8191,Ve=za>>>13,Wa=w[8]|0,je=Wa&8191,He=Wa>>>13,Ka=w[9]|0,qe=Ka&8191,Ge=Ka>>>13,Ja=A[0]|0,ze=Ja&8191,We=Ja>>>13,$a=A[1]|0,Ke=$a&8191,Je=$a>>>13,Qa=A[2]|0,$e=Qa&8191,Qe=Qa>>>13,Xa=A[3]|0,Xe=Xa&8191,Ye=Xa>>>13,Ya=A[4]|0,Ze=Ya&8191,et=Ya>>>13,Za=A[5]|0,tt=Za&8191,nt=Za>>>13,ei=A[6]|0,at=ei&8191,it=ei>>>13,ti=A[7]|0,rt=ti&8191,st=ti>>>13,ni=A[8]|0,ot=ni&8191,ut=ni>>>13,ai=A[9]|0,dt=ai&8191,lt=ai>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var va=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Aa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Gu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var ad=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=Gu,h[6]=zu,h[7]=Wu,h[8]=Ku,h[9]=Ju,h[10]=$u,h[11]=Qu,h[12]=Xu,h[13]=Yu,h[14]=Zu,h[15]=ed,h[16]=td,h[17]=nd,h[18]=ad,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function E(I,u){this.x=I,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof id>"u"||id,qp)});var cy=ae((jg,Qs)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var E=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,yt=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var yt=new Uint32Array(Q);ee>8&255,X[Q+2]=yt>>16&255,X[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],X[Q]=yt&255,V>1&&(X[Q+1]=yt>>8&255),V>2&&(X[Q+2]=yt>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Wa,je,He,Ka,qe,Ge,Ja,ze,We,$a,Ke,Je,Qa,$e,Qe,Xa,Xe,Ye,Ya,Ze,et,Za,tt,nt,ei,at,it,ti,rt,st,ni,ot,ut,ai,dt,lt,va,wa,_a,ka,Aa;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],Ha=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|Ha>>>31),D=Q^(Ha<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=Ha^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,qa=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ei=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,Ja=c[21]<<3|c[20]>>>29,wa=c[31]<<9|c[30]>>>23,_a=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Qa=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,Ga=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,ka=c[42]<<2|c[43]>>>30,Aa=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ti=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,$a=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ai=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Xa=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,za=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ni=c[46]<<24|c[47]>>>8,Za=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,Ka=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,va=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,Ya=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Wa=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Ka&Ge,c[11]=He^~qe&Ja,c[20]=Je^~$e&Xa,c[21]=Qa^~Qe&Xe,c[30]=Za^~nt&at,c[31]=tt^~ei&it,c[40]=ot^~ai<,c[41]=ut^~dt&va,c[2]=Be^~Fe&za,c[3]=Ga^~Le&Ue,c[12]=Ka^~Ge&ze,c[13]=qe^~Ja&We,c[22]=$e^~Xa&Ye,c[23]=Qe^~Xe&Ya,c[32]=nt^~at&ti,c[33]=ei^~it&rt,c[42]=ai^~lt&wa,c[43]=dt^~va&_a,c[4]=Fe^~za&Ve,c[5]=Le^~Ue&Wa,c[14]=Ge^~ze&$a,c[15]=Ja^~We&Ke,c[24]=Xa^~Ye&Ze,c[25]=Xe^~Ya&et,c[34]=at^~ti&st,c[35]=it^~rt&ni,c[44]=lt^~wa&ka,c[45]=va^~_a&Aa,c[6]=za^~Ve&qa,c[7]=Ue^~Wa&Oe,c[16]=ze^~$a&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=Ya^~et&Qa,c[36]=ti^~st&Za,c[37]=rt^~ni&tt,c[46]=wa^~ka&ot,c[47]=_a^~Aa&ut,c[8]=Ve^~qa&Be,c[9]=Wa^~Oe&Ga,c[18]=$a^~je&Ka,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Qa&Qe,c[38]=st^~Za&nt,c[39]=ni^~tt&ei,c[48]=ka^~ot&ai,c[49]=Aa^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)Qs.exports=u;else{for(b=0;b{d0.exports=u0;function u0(a,e){if(!a)throw new Error(e||"Assertion failed")}u0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var l0=ae((N3,Pd)=>{typeof Object.create=="function"?Pd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pd.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Mn=ae(Pe=>{"use strict";var J6=ar(),$6=l0();Pe.inherits=$6;function Q6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function X6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):Q6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=p0;function Z6(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=e2;function t2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=t2;function n2(a,e){return a>>>e|a<<32-e}Pe.rotr32=n2;function a2(a,e){return a<>>32-e}Pe.rotl32=a2;function i2(a,e){return a+e>>>0}Pe.sum32=i2;function r2(a,e,t){return a+e+t>>>0}Pe.sum32_3=r2;function s2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=s2;function o2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=o2;function u2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=u2;function d2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=d2;function l2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=l2;function p2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=p2;function y2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=y2;function f2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=f2;function c2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=c2;function m2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=m2;function h2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=h2;function x2(a,e,t){return a>>>t}Pe.shr64_hi=x2;function b2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=b2});var ir=ae(m0=>{"use strict";var c0=Mn(),g2=ar();function bo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}m0.BlockHash=bo;bo.prototype.update=function(e,t){if(e=c0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=c0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var T2=Mn(),Hn=T2.rotr32;function v2(a,e,t,n){if(a===0)return h0(e,t,n);if(a===1||a===3)return b0(e,t,n);if(a===2)return x0(e,t,n)}da.ft_1=v2;function h0(a,e,t){return a&e^~a&t}da.ch32=h0;function x0(a,e,t){return a&e^a&t^e&t}da.maj32=x0;function b0(a,e,t){return a^e^t}da.p32=b0;function w2(a){return Hn(a,2)^Hn(a,13)^Hn(a,22)}da.s0_256=w2;function _2(a){return Hn(a,6)^Hn(a,11)^Hn(a,25)}da.s1_256=_2;function k2(a){return Hn(a,7)^Hn(a,18)^a>>>3}da.g0_256=k2;function A2(a){return Hn(a,17)^Hn(a,19)^a>>>10}da.g1_256=A2});var v0=ae((F3,T0)=>{"use strict";var rr=Mn(),M2=ir(),E2=Nd(),Dd=rr.rotl32,Qr=rr.sum32,I2=rr.sum32_5,C2=E2.ft_1,g0=M2.BlockHash,S2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;g0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}rr.inherits(qn,g0);T0.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var sr=Mn(),R2=ir(),or=Nd(),P2=ar(),En=sr.sum32,N2=sr.sum32_4,D2=sr.sum32_5,O2=or.ch32,B2=or.maj32,F2=or.s0_256,L2=or.s1_256,U2=or.g0_256,V2=or.g1_256,w0=R2.BlockHash,j2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;w0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=j2,this.W=new Array(64)}sr.inherits(Gn,w0);_0.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Bd=Mn(),k0=Od();function la(){if(!(this instanceof la))return new la;k0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Bd.inherits(la,k0);A0.exports=la;la.blockSize=512;la.outSize=224;la.hmacStrength=192;la.padLength=64;la.prototype._digest=function(e){return e==="hex"?Bd.toHex32(this.h.slice(0,7),"big"):Bd.split32(this.h.slice(0,7),"big")}});var Ud=ae((V3,S0)=>{"use strict";var Qt=Mn(),H2=ir(),q2=ar(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,E0=Qt.shr64_hi,I0=Qt.shr64_lo,Sa=Qt.sum64,Fd=Qt.sum64_hi,Ld=Qt.sum64_lo,G2=Qt.sum64_4_hi,z2=Qt.sum64_4_lo,W2=Qt.sum64_5_hi,K2=Qt.sum64_5_lo,C0=H2.BlockHash,J2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function In(){if(!(this instanceof In))return new In;C0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=J2,this.W=new Array(160)}Qt.inherits(In,C0);S0.exports=In;In.blockSize=1024;In.outSize=512;In.hmacStrength=192;In.padLength=128;In.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Vd=Mn(),R0=Ud();function pa(){if(!(this instanceof pa))return new pa;R0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Vd.inherits(pa,R0);P0.exports=pa;pa.blockSize=1024;pa.outSize=384;pa.hmacStrength=192;pa.padLength=128;pa.prototype._digest=function(e){return e==="hex"?Vd.toHex32(this.h.slice(0,12),"big"):Vd.split32(this.h.slice(0,12),"big")}});var D0=ae(ur=>{"use strict";ur.sha1=v0();ur.sha224=M0();ur.sha256=Od();ur.sha384=N0();ur.sha512=Ud()});var V0=ae(U0=>{"use strict";var li=Mn(),o5=ir(),go=li.rotl32,O0=li.sum32,Xr=li.sum32_3,B0=li.sum32_4,L0=o5.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;L0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Kn,L0);U0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=O0(go(B0(n,F0(_,i,r,s),e[l5[_]+t],u5(_)),y5[_]),o);n=o,o=s,s=go(r,10),r=i,i=v,v=O0(go(B0(l,F0(79-_,p,f,x),e[p5[_]+t],d5(_)),f5[_]),C),l=C,C=x,x=go(f,10),f=p,p=v}v=Xr(this.h[1],r,x),this.h[1]=Xr(this.h[2],s,C),this.h[2]=Xr(this.h[3],o,l),this.h[3]=Xr(this.h[4],n,p),this.h[4]=Xr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function F0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function u5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function d5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var l5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var H0=ae((G3,j0)=>{"use strict";var c5=Mn(),m5=ar();function dr(a,e,t){if(!(this instanceof dr))return new dr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(c5.toArray(e,t))}j0.exports=dr;dr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),m5(e.length<=this.blockSize);for(var t=e.length;t{var Rt=q0;Rt.utils=Mn();Rt.common=ir();Rt.sha=D0();Rt.ripemd=V0();Rt.hmac=H0();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var sl=ae((rl,bf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=E,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,E=E+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof pl<"u"?Tf.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(pl)});var zf=ae((N4,Gf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hl={};for(os=0;os>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Hf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=br(e)^n>>5}for(e=br(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=Hf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=br(n)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)n=br(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=qo.charAt(o)}return i}function qf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=Hf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function Z5(){var a=qf.apply(null,arguments);if(typeof a=="object")return a}function ex(a){var e=qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(zl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Kl=ae(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Ss=ae((WA,dm)=>{dm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(La=>{var Me=Ss(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],lm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),pm=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],qx=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];La.words=()=>({type:Me.SET,set:lm(),not:!1});La.notWords=()=>({type:Me.SET,set:lm(),not:!0});La.ints=()=>({type:Me.SET,set:Jl(),not:!1});La.notInts=()=>({type:Me.SET,set:Jl(),not:!0});La.whitespace=()=>({type:Me.SET,set:pm(),not:!1});La.notWhitespace=()=>({type:Me.SET,set:pm(),not:!0});La.anyChar=()=>({type:Me.SET,set:qx(),not:!0})});var fm=ae(Rs=>{var ym=Ss(),Cr=$l(),Gx="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",zx={0:0,t:9,n:10,v:11,f:12,r:13};Rs.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?Gx.indexOf(l):zx[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Rs.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Cr.words());else if(i[2])t.push(Cr.ints());else if(i[3])t.push(Cr.whitespace());else if(i[4])t.push(Cr.notWords());else if(i[5])t.push(Cr.notInts());else if(i[6])t.push(Cr.notWhitespace());else if(i[7])t.push({type:ym.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:ym.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Rs.error(e,"Unterminated character class")};Rs.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var cm=ae(Ps=>{var uu=Ss();Ps.wordBoundary=()=>({type:uu.POSITION,value:"b"});Ps.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Ps.begin=()=>({type:uu.POSITION,value:"^"});Ps.end=()=>({type:uu.POSITION,value:"$"})});var mm=ae((QA,Ql)=>{var Sr=fm(),bn=Ss(),wi=$l(),du=cm();Ql.exports=a=>{var e=0,t,n,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Sr.error(a,`Nothing to repeat at column ${O-1}`)},p=Sr.strToChars(a);for(t=p.length;e{"use strict";var gn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new gn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};hm.exports=Ua});var gm=ae((YA,bm)=>{var lu=mm(),Ns=xm(),_i=lu.types;bm.exports=class Ds{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=lu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ds.prototype.max!=null?Ds.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case _i.ROOT:case _i.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var Wx=ki&&ki.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ki,"__esModule",{value:!0});ki.RandomGenerator=void 0;var Kx=Wx(gm()),Jx;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new Kx.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(Jx=ki.RandomGenerator||(ki.RandomGenerator={}))});var Os=ae(Rr=>{"use strict";var $x=Rr&&Rr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TypeGuardError=void 0;var Qx=function(a){$x(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Rr.TypeGuardError=Qx});var vm=ae(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var Xx=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};pu.$any=Xx});var wm=ae(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var Yx=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$guard=void 0;var Zx=Os(),eb=function(a){return function(e,t){if(e===!0)throw new Zx.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};fu.$guard=eb});var km=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_between=void 0;var tb=function(a,e,t){return e<=a&&a<=t};cu.$is_between=tb});var Am=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var nb=Kl(),ab=function(a,e,t,n){var i,r=(i=nb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};mu.$is_custom=ab});var Mm=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var ib=function(a){return rb.test(a)};hu.$is_date=ib;var rb=/^(\d{4})-(\d{2})-(\d{2})$/});var Em=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_datetime=void 0;var sb=function(a){return!isNaN(new Date(a).getTime())};xu.$is_datetime=sb});var Im=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_email=void 0;var ob=function(a){return ub.test(a)};bu.$is_email=ob;var ub=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Cm=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var db=function(a){return lb.test(a)};gu.$is_ipv4=db;var lb=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Sm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var pb=function(a){return yb.test(a)};Tu.$is_ipv6=pb;var yb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Rm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var fb=function(a){return cb.test(a)};vu.$is_url=fb;var cb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Pm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var mb=function(a){return hb.test(a)};wu.$is_uuid=mb;var hb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Nm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var xb=function(a){return bb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};_u.$join=xb;var bb=function(a){return gb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},gb=function(a){return Tb.has(a)},Tb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Dm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$number=void 0;var vb=Os(),wb=function(a){if(isFinite(a)===!1)throw new vb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};ku.$number=wb});var Om=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$report=void 0;var _b=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Au.$report=_b});var Bm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var kb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Mu.$rest=kb});var Fm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var Ab=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Eu.$string=Ab});var Lm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$tail=void 0;var Mb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Iu.$tail=Mb});var Hm=ae(Ai=>{"use strict";var Vt=Ai&&Ai.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Ub.$number,string:Hb.$string,tail:qb.$tail,rest:jb.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Eb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Um.RandomGenerator,pick:Um.RandomGenerator.pick}};var e=function(t){return function(n){throw new Vm.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(Gb=Ai.Namespace||(Ai.Namespace={}))});var qm=ae(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.MapUtil=void 0;var zb;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(zb=Bs.MapUtil||(Bs.MapUtil={}))});var zm=ae(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Km=ae(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var $m=ae(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var Xm=ae(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0})});var Zm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ae(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var dp=ae(z=>{"use strict";var Wb=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Mi=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Wb(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pr=Kl(),Ee=Hm(),Kb=qm();Mi(zm(),z);Mi(Km(),z);Mi($m(),z);Mi(Xm(),z);Mi(Zm(),z);Mi(th(),z);Mi(Os(),z);function Xl(){re("assert")}z.assert=Xl;Object.assign(Xl,Ee.Namespace.assert("assert"));function Yl(){re("assertType")}z.assertType=Yl;Object.assign(Yl,Ee.Namespace.assert("assertType"));function Cu(){re("is")}z.is=Cu;Object.assign(Cu,Ee.Namespace.assert("is"));function Su(){re("validate")}z.validate=Su;Object.assign(Su,Ee.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Ee.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Ee.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Ee.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Pr.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pr.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=Kb.MapUtil.take(Pr.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function Jb(){re("application")}z.application=Jb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Cu);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Su);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Ru(){re("assertStringify")}z.assertStringify=Ru;Object.assign(Ru,Ee.Namespace.assert("assertStringify"));Object.assign(Ru,Ee.Namespace.stringify("assertStringify"));function Pu(){re("isStringify")}z.isStringify=Pu;Object.assign(Pu,Ee.Namespace.is());Object.assign(Pu,Ee.Namespace.stringify("isStringify"));function Nu(){re("validateStringify")}z.validateStringify=Nu;Object.assign(Nu,Ee.Namespace.validate());Object.assign(Nu,Ee.Namespace.stringify("validateStringify"));function $b(){re("metadata")}z.metadata=$b;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function Qb(){re("literals")}z.literals=Qb;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Du(){re("assertClone")}z.assertClone=Du;Object.assign(Du,Ee.Namespace.assert("assertClone"));Object.assign(Du,Ee.Namespace.clone("assertClone"));function Ou(){re("isClone")}z.isClone=Ou;Object.assign(Ou,Ee.Namespace.is());Object.assign(Ou,Ee.Namespace.clone("isClone"));function Bu(){re("validateClone")}z.validateClone=Bu;Object.assign(Bu,Ee.Namespace.validate());Object.assign(Bu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Fu(){re("assertPrune")}z.assertPrune=Fu;Object.assign(Fu,Ee.Namespace.assert("assertPrune"));Object.assign(Fu,Ee.Namespace.prune("assertPrune"));function Lu(){re("isPrune")}z.isPrune=Lu;Object.assign(Lu,Ee.Namespace.is());Object.assign(Lu,Ee.Namespace.prune("isPrune"));function Uu(){re("validatePrune")}z.validatePrune=Uu;Object.assign(Uu,Ee.Namespace.prune("validatePrune"));Object.assign(Uu,Ee.Namespace.validate());function nh(){re("createAssert")}z.createAssert=nh;Object.assign(nh,Xl);function ah(){re("createAssertType")}z.createAssertType=ah;Object.assign(ah,Yl);function ih(){re("createIs")}z.createIs=ih;Object.assign(ih,Cu);function rh(){re("createValidate")}z.createValidate=rh;Object.assign(rh,Su);function sh(){re("createAssertEquals")}z.createAssertEquals=sh;Object.assign(sh,Zl);function oh(){re("createEquals")}z.createEquals=oh;Object.assign(oh,ep);function uh(){re("createValidateEquals")}z.createValidateEquals=uh;Object.assign(uh,tp);function dh(){re("createIsParse")}z.createIsParse=dh;Object.assign(dh,ap);function lh(){re("createAssertParse")}z.createAssertParse=lh;Object.assign(lh,np);function ph(){re("createValidateParse")}z.createValidateParse=ph;Object.assign(ph,ip);function yh(){re("createStringify")}z.createStringify=yh;Object.assign(yh,rp);function fh(){re("createAssertStringify")}z.createAssertStringify=fh;Object.assign(fh,Ru);function ch(){re("createIsStringify")}z.createIsStringify=ch;Object.assign(ch,Pu);function mh(){re("createValidateStringify")}z.createValidateStringify=mh;Object.assign(mh,Nu);function hh(){re("createRandom")}z.createRandom=hh;Object.assign(hh,sp);function xh(){re("createClone")}z.createClone=xh;Object.assign(xh,op);function bh(){re("createAssertClone")}z.createAssertClone=bh;Object.assign(bh,Du);function gh(){re("createIsClone")}z.createIsClone=gh;Object.assign(gh,Ou);function Th(){re("createValidateClone")}z.createValidateClone=Th;Object.assign(Th,Bu);function vh(){re("createPrune")}z.createPrune=vh;Object.assign(vh,up);function wh(){re("createAssertPrune")}z.createAssertPrune=wh;Object.assign(wh,Fu);function _h(){re("createIsPrune")}z.createIsPrune=_h;Object.assign(_h,Lu);function kh(){re("createValidatePrune")}z.createValidatePrune=kh;Object.assign(kh,Uu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Mh=ae(Tn=>{"use strict";var Ah=Tn&&Tn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Xb=Tn&&Tn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),Yb=Tn&&Tn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&Ah(e,a,t);return Xb(e,a),e},Zb=Tn&&Tn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ah(e,a,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var e1=Yb(dp());Tn.default=e1;Zb(dp(),Tn)});var Rl={};Hi(Rl,{BaseContract:()=>pr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>on,Wordlist:()=>xn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>tu,logger:()=>Mc,providers:()=>ea,utils:()=>te,version:()=>au,wordlists:()=>hi});var ty=kn(rd());var Gp="logger/5.7.0";var zp=!1,Wp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},Kp=zs.default,sd=null;function Gh(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Jp=Gh(),od;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(od||(od={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var $p="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();zs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Kp>zs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(Wp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=$p[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Jp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Jp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return sd||(sd=new M(Gp)),sd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Wp=!!e,zp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Kp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=od;var Qp="bytes/5.7.0";var wt=new M(Qp);function Yp(a){return!!a.toHexString}function qi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return qi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function aa(a){return ie(a)&&!(a.length%2)||un(a)}function Xp(a){return typeof a=="number"&&a==a&&a%1===0}function un(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Xp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),qi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Yp(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),qi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),qi(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var ud="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=ud[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Yp(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(un(a)){let t="0x";for(let n=0;n>4]+ud[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Nt(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(a){let e=dd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function dd(a){typeof a!="string"&&(a=W(a)),ie(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Un(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ii(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fr(a){return a=Un(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var Lr=ty.default.BN,ia=new M(Ws),ld={},Zp=9007199254740991;function ny(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||un(a))}var ey=!1,F=class{constructor(e,t){e!==ld&&ia.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&dn("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&dn("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&dn("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&dn("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&dn("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&dn("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{dn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ia.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?ey||(ey=!0,ia.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ia.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ia.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(ld,Ur(e)):e.match(/^-?[0-9]+$/)?new F(ld,Ur(new Lr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=Zp||e<=-Zp)&&dn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(un(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ur(a){if(typeof a!="string")return Ur(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&ia.throwArgumentError("invalid hex","value",a),a=Ur(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Ur(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Lr("-"+e.substring(3),16):new Lr(e.substring(2),16)}function dn(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),ia.throwError(a,M.errors.NUMERIC_FAULT,n)}function pd(a){return new Lr(a,36).toString(16)}function yd(a){return new Lr(a,16).toString(36)}var jt=new M(Ws),Vr={},iy=F.from(0),ry=F.from(-1);function sy(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,M.errors.NUMERIC_FAULT,i)}var jr="0";for(;jr.length<256;)jr+=jr;function fd(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+jr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Gi(a,e){e==null&&(e=0);let t=fd(e);a=F.from(a);let n=a.lt(iy);n&&(a=a.mul(ry));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&sy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Vr,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Vr&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ay.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ay.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+jr.substring(0,e),this.format),i=zh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ny(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString(Gi(e,t),ra.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ra.from(t),i=ln(e,n.decimals);!n.signed&&i.lt(iy)&&sy("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ra.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(un(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ay=ft.from(1),zh=ft.from("0.5");var oy="properties/5.7.0";var Wh=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ks=new M(oy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function mt(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return Wh(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function zi(a,e){(!a||typeof a!="object")&&Ks.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Ks.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var Kh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function uy(a){if(a==null||Kh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tct(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,ct(n))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function ct(a){return Jh(a)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var Te=new M(Vn),ri={},dy={calldata:!0,memory:!0,storage:!0},$h={calldata:!0,memory:!0};function Js(a,e){if(a==="bytes"||a==="string"){if(dy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&$h[e])return!0;return(dy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function Qh(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(ri,{name:e.name||null,type:Wi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Qh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Hr(a,e){return Zh(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),$s(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:qr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(ri,t)}static fromString(e){let t=e.match(Gr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Hr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function py(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function yy(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function fy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Dt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=fy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ri,n)}static fromString(e){let t={type:"constructor"};e=py(e,t);let n=e.match(Gr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Hr(n[2].trim(),!1),yy(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=fy(e),n={type:e.type,name:qr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ri,n)}static fromString(e){let t={type:"function"};e=py(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(Gr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&qr(t.name),t.inputs=Hr(i[2],!1),yy(i[3].trim(),t),n.length>1){let r=n[1].match(Gr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Hr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function ly(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return ly(new tn(ri,t))}static fromString(e){let t={type:"error"},n=e.match(Gr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qr(t.name),t.inputs=Hr(n[2],!1),ly(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Wi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Yh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qr(a){return(!a||!a.match(Yh))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Gr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Zh(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&cd.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},oi=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):oi.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:cd.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new oi(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var my=kn(cy());function fe(a){return"0x"+my.default.keccak_256(j(a))}var Xs={};Hi(Xs,{decode:()=>zr,encode:()=>sa});var hy="rlp/5.7.0";var jn=new M(hy);function xy(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function by(a,e,t){let n=0;for(let i=0;ie+1+n&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function vy(a,e){if(a.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=by(a,e+1,t);return e+1+t+n>a.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),gy(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),gy(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=by(a,e+1,t);e+1+t+n>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function zr(a){let e=j(a),t=vy(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",a),t.result}var wy="address/5.7.0";var Ma=new M(wy);function _y(a){ie(a,20)||Ma.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var e6=9007199254740991;function t6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var md={};for(let a=0;a<10;a++)md[String(a)]=String(a);for(let a=0;a<26;a++)md[String.fromCharCode(65+a)]=String(10+a);var ky=Math.floor(t6(e6));function Ay(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>md[n]).join("");for(;e.length>=ky;){let n=e.substring(0,ky);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Ma.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=_y(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ma.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==Ay(a)&&Ma.throwArgumentError("bad icap checksum","address",a),e=pd(a.substring(4));e.length<40;)e="0"+e;e=_y("0x"+e)}else Ma.throwArgumentError("invalid address","address",a);return e}function My(a){try{return ce(a),!0}catch{}return!1}function Ey(a){let e=yd(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Ay("XE00"+e)+e}function ui(a){let e=null;try{e=ce(a.from)}catch{Ma.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(sa([e,t])),12))}function Iy(a,e,t){return Nt(e)!==32&&Ma.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ma.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var Ys=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Ji=new M(Vn);function hd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Ji.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ji.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Ji.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Ji.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(a.wordSize),r=new si(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function xd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var eo=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Ji.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;iro,EtherSymbol:()=>Ny,HashZero:()=>Qi,MaxInt256:()=>Py,MaxUint256:()=>uo,MinInt256:()=>Ry,NegativeOne:()=>so,One:()=>oo,Two:()=>Cy,WeiPerEther:()=>Sy,Zero:()=>$i});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),$i=F.from(0),oo=F.from(1),Cy=F.from(2),Sy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ry=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Py=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qi="0x0000000000000000000000000000000000000000000000000000000000000000";var Ny="\u039E";var lo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(n.lt($i)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Dy="strings/5.7.0";var Oy=new M(Dy),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Bt||(Bt={}));function n6(a,e,t,n,i){return Oy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function By(a,e,t,n,i){if(a===Bt.BAD_PREFIX||a===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Bt.OVERRUN?t.length-e-1:0}function a6(a,e,t,n,i){return a===Bt.OVERLONG?(n.push(i),0):(n.push(65533),By(a,e,t,n,i))}var po=Object.freeze({error:n6,ignore:By,replace:a6});function gd(a,e){e==null&&(e=po.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Bt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Bt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Bt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(Oy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function bd(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function Td(a,e){return'"'+gd(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?bd(t):(t-=65536,bd((t>>10&1023)+55296)+bd((t&1023)+56320))}).join("")+'"'}function yo(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return yo(gd(a,e))}function Ea(a,e=Gt.current){return gd(ve(a,e))}function vd(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Qi]).slice(0,32))}function wd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function i6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function Fy(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function kd(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var r6=Fy("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),o6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u6=_d("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d6=_d("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l6=_d("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",i6),p6=Fy("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function y6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function f6(a){return!!kd(a,r6)}function c6(a){let e=kd(a,o6);if(e)return[a+e.s];let t=u6[a];if(t)return t;let n=d6[a];if(n)return[a+n[0]];let i=l6[a];return i||null}function m6(a){return!!kd(a,p6)}function Ad(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ea(a);e=y6(e.map(n=>{if(s6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=c6(n);return i||[n]})),e=Ea(yo(e),Gt.NFKC),e.forEach(n=>{if(m6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(f6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=yo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var fo=class extends Wr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var di=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return hd(e,this.coders,t)}decode(e){return e.coerce(this.name,xd(e,this.coders))}};var co=new M(Vn),h6=new RegExp(/^bytes([0-9]*)$/),x6=new RegExp(/^(u?int)([0-9]*)$/),Xi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ys(e.name);case"bool":return new to(e.name);case"string":return new fo(e.name);case"bytes":return new no(e.name);case"array":return new eo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new di((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new io(e.name)}let t=e.type.match(x6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(n/8,t[1]==="int",e.name)}if(t=e.type.match(h6),t){let n=parseInt(t[1]);return(n===0||n>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(n,e.name)}return co.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new oi(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new si(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new di(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&co.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new di(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),n))}},Kr=new Xi;function nn(a){return fe(ve(a))}var mo="hash/5.7.0";var Md={};Hi(Md,{decode:()=>Yi,encode:()=>Zi});function Yi(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function b6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return E+256+(a[o++]<<8|a[o++]);case 1:return E+a[o++];default:return J-1}})}function T6(a){let e=0;return()=>a[e++]}function Vy(a){return T6(g6(a))}function v6(a){return a&1?~a>>1:a>>1}function w6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function jy(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(A6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(M6(t,a))}return b6(Uy(e))}function k6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Hy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function A6(a,e){let t=1+e(),n=e(),i=k6(e),r=Hy(i.length,1+a,e);return Uy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function M6(a,e){let t=1+e();return Hy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function qy(a){let e=Jr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Jr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Gy(){return Vy(Yi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var ho=Gy(),E6=new Set(Jr(ho)),I6=new Set(Jr(ho)),C6=jy(ho),S6=qy(ho),zy=45,Wy=95;function Ky(a){return Ea(a)}function R6(a){return a.filter(e=>e!=65039)}function Jy(a){for(let e of a.split(".")){let t=Ky(e);try{for(let n=t.lastIndexOf(Wy)-1;n>=0;n--)if(t[n]!==Wy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===zy&&t[3]===zy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function $y(a){return Jy(P6(a,R6))}function P6(a,e){let t=Ky(a).reverse(),n=[];for(;t.length;){let i=D6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(E6.has(r)){n.push(r);continue}if(I6.has(r))continue;let s=C6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Jy(N6(String.fromCodePoint(...n)))}function N6(a){return a.normalize("NFC")}function D6(a,e){var t;let n=S6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var O6=new M(mo),Xy=new Uint8Array(32);Xy.fill(0);function Qy(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Ed(a){let e=ve($y(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(Qy(e.slice(n))),t}function Id(a){try{return Ed(a).length!==0}catch{}return!1}function Ia(a){typeof a!="string"&&O6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Xy,t=Ed(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function $r(a){return W(ye(Ed(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Yy=`Ethereum Signed Message: +`;function er(a){return typeof a=="string"&&(a=ve(a)),fe(ye([ve(Yy),ve(String(a.length)),a]))}var B6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new M(mo),n0=new Uint8Array(32);n0.fill(0);var F6=F.from(-1),a0=F.from(0),i0=F.from(1),L6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function U6(a){let e=j(a),t=e.length%32;return t?kt([e,n0.slice(t)]):W(e)}var V6=me(i0.toHexString(),32),j6=me(a0.toHexString(),32),Zy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Cd=["name","version","chainId","verifyingContract","salt"];function e0(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var H6={name:e0("name"),version:e0("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Sd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=L6.mask(t?n-1:n),r=t?i.add(i0).mul(F6):a0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),U6(n)}}}switch(a){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?V6:j6};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function t0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Sd(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=t0(o,e[o])+l.map(p=>t0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Sd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Sd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=Zy[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Cd.indexOf(n.name)-Cd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return fe(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return B6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Cd.forEach(l=>{let p=e[l];p!=null&&(i[l]=H6[l](p),r.push({name:l,type:Zy[l]}))});let s=bt.from(t),o=_e(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Vn);var tr=class extends en{},nr=class extends en{},Rd=class extends en{},oa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},q6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function r0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ca=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=q6[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return gt.throwError("call revert exception"+r,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new oa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw r0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw r0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new nr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new tr({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Rd({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var s0="abstract-provider/5.7.0";var G6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},z6=new M(s0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){z6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return G6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var o0="abstract-signer/5.7.0";var An=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},pn=new M(o0),W6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],K6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){pn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)W6.indexOf(n)===-1&&pn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>An(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&pn.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&pn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&pn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):pn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(K6.indexOf(i.code)>=0)throw i;return pn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&pn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||pn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ua=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{pn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=kn(rd()),Jn=kn(jd());function lr(a,e,t){return t={path:e,exports:{},require:function(n,i){return h5(n,i??t.path)}},a(t,t.exports),t.exports}function h5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zd=z0;function z0(a,e){if(!a)throw new Error(e||"Assertion failed")}z0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=lr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),wo=an.getNAF,x5=an.getJSF,_o=an.assert;function Pa(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pi=Pa;Pa.prototype.point=function(){throw new Error("Not implemented")};Pa.prototype.validate=function(){throw new Error("Not implemented")};Pa.prototype._fixedNafMul=function(e,t){_o(e.precomputed);var n=e._getDoubles(),i=wo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];_o(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Pa.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(n[v],s[v],this._bitLength),l[S]=wo(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=x5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};fn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};cn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(a,e,t,n){pi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wd(Pt,pi.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=lr(function(a,e){"use strict";var t=e;t.base=pi,t.short=g5,t.mont=null,t.edwards=null}),vo=lr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new To.short(o):o.type==="edwards"?this.curve=new To.edwards(o):this.curve=new To.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ra(a){if(!(this instanceof Ra))return new Ra(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(a.entropy,a.entropyEnc||"hex"),t=Cn.toArray(a.nonce,a.nonceEnc||"hex"),n=Cn.toArray(a.pers,a.persEnc||"hex");zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var W0=Ra;Ra.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ra.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Cn.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var T5=an.assert;function ko(a,e){if(a instanceof ko)return a;this._importDER(a,e)||(T5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var Ao=ko;function v5(){this.place=0}function Hd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function G0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}ko.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=G0(t),n=G0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];qd(i,t.length),i=i.concat(t),i.push(2),qd(i,n.length);var r=i.concat(n),s=[48];return qd(s,r.length),s=s.concat(r),an.encode(s,e)};var w5=function(){throw new Error("unsupported")},K0=an.assert;function yn(a){if(!(this instanceof yn))return new yn(a);typeof a=="string"&&(K0(Object.prototype.hasOwnProperty.call(vo,a),"Unknown curve "+a),a=vo[a]),a instanceof vo.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var _5=yn;yn.prototype.keyPair=function(e){return new Kd(this,e)};yn.prototype.keyFromPrivate=function(e,t){return Kd.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return Kd.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new W0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||w5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};yn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};yn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new W0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Ao({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new Ao(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(a,e,t,n){K0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};yn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new Ao(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var k5=lr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=To,t.curves=vo,t.ec=_5,t.eddsa=null}),J0=k5.ec;var $0="signing-key/5.7.0";var $d=new M($0),Jd=null;function $n(){return Jd||(Jd=new J0("secp256k1")),Jd}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&$d.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(j(this.publicKey)),n=$n().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&$d.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Un({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(a,e){let t=Un(e),n={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function Yr(a,e){let t=j(a);if(t.length===32){let n=new mn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return $d.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Q0="transactions/5.7.0";var Ut=new M(Q0),Eo;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xd(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?$i:F.from(a)}var A5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],M5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(a){let e=Yr(a);return ce(Ie(fe(Ie(e,1)),12))}function yi(a,e){return hn(Mo(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function Qd(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Qd(t[0],t[1])):Qd(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return Qd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function X0(a){return sn(a).map(e=>[e.address,e.storageKeys])}function Y0(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",X0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",sa(t)])}function Z0(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",X0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",sa(t)])}function E5(a,e){zi(a,M5);let t=[];A5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!aa(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Zr(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),E5(a,e);switch(a.type){case 1:return Z0(a,e);case 2:return Y0(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function ef(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=fe(t(a));a.from=yi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function I5(a){let e=zr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Xd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),ef(i,e.slice(9),Y0)),i}function C5(a){let e=zr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Xd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),ef(t,e.slice(8),Z0)),t}function S5(a){let e=zr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Xd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function Io(a){let e=j(a);if(e[0]>127)return S5(e);switch(e[0]){case 1:return C5(e);case 2:return I5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var tf="contracts/5.7.0";var Na=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new M(tf),R5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Co(a,e){return Na(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(a,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>es(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Co(a,e):t.type==="tuple"?yield es(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(a,e,t){return Na(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:Co(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Na(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Co(a.provider,n.from));let i=yield Ce({args:es(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function P5(a,e){return function(...t){return Po(a,e,t)}}function N5(a,e){let t=a.signer||a.provider;return function(...n){return Na(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Po(a,e,n);return yield t.estimateGas(i)})}}function af(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function rf(a,e,t){let n=a.signer||a.provider;return function(...i){return Na(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Po(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===M.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function D5(a,e){return function(...t){return Na(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Po(a,e,t),i=yield a.signer.sendTransaction(n);return af(a,i),i})}}function nf(a,e,t){return e.constant?rf(a,e,t):D5(a,e)}function sf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var fi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Yd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(sf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Ki(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Ro=class extends fi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},pr=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Co(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,nf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,nf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,rf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,P5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,N5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return ui(e)}static getInterface(e){return Ca.isInterface(e)?e:new Ca(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ua(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Yd);if(e==="event")return this._normalizeRunningEvent(new fi("event",null));if(e==="*")return this._normalizeRunningEvent(new Ro(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new So(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new So(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fi(sf(t),t))}return this._normalizeRunningEvent(new Ro(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=ct(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pr{},ci=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:un(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!R5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Na(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return af(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ui(e)}static getContract(e,t,n){return new oe(e,t,n)}};var No=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(fa(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return pc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(ca,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fa));let n=new Uint8Array(37);if(e&fa){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(ci(Qn.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Do(F.from(a).add(this.privateKey).mod(Lb)):d=new mn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(ca,o,d,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=fa)throw new Error("invalid path index - "+a);n=n._derive(fa+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=fa)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(ci(Qn.sha512,Ub,n));return new Ct(ca,Do(r.slice(0,32)),null,"0x00000000",Do(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=nd(n),e=br(ma(e,n),n),Ct._fromSeed(id(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=yi.decode(e);(t.length!==82||pc(t.slice(0,78))!==e)&&is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(ca,null,W(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(ca,W(o.slice(1)),null,r,s,a,n,null)}return is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function id(i,e){e||(e="");let t=Te("mnemonic"+e,Gt.NFKD);return mr(Te(i,Gt.NFKD),t,2048,64,"sha512")}function ma(i,e){e=nd(e),is.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=yc(s);if((V(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,a/8))}function br(i,e){if(e=nd(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&jb(8-n)),n+=3);let r=i.length/4,a=V(Xt(i))[0]&yc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function cc(i,e){try{return ma(i,e),!0}catch{}return!1}function fc(i){return(typeof i!="number"||i<0||i>=fa||i%1)&&is.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var mc="random/5.7.0";var rd=new M(mc);function Vb(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hc=Vb(),Oo=hc.crypto||hc.msCrypto;(!Oo||!Oo.getRandomValues)&&(rd.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(i){return rd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(i){(i<=0||i>1024||i%1||i!=i)&&rd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return Oo.getRandomValues(e),V(e)}function rs(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var od=An(sd());var Bo="json-wallets/5.7.0";function mi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function ha(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new hi.default.Counter(b),J=new hi.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:xc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=Xn(16),N=new hi.default.Counter(R),q=new hi.default.ModeOfOperation.ctr(H,N),se=V(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+ha(C.getUTCMonth()+1,2)+"-"+ha(C.getUTCDate(),2)+"T"+ha(C.getUTCHours(),2)+"-"+ha(C.getUTCMinutes(),2)+"-"+ha(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Ec(i,e,t){if(Fo(i)){t&&t(0);let n=ld(i,e);return t&&t(1),Promise.resolve(n)}return Lo(i)?Mc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cc(i,e){if(Fo(i))return ld(i,e);if(Lo(i))return kc(i,e);throw new Error("invalid JSON wallet")}var Ic="wallet/5.7.0";var Sc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ba=new M(Ic);function Wb(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function Kb(i){let e=i.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),Wb(e)){let n=new mn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",hn(this.publicKey)),this.address!==fe(e.address)&&ba.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Kb(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||fi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);hn(s.privateKey)!==this.address&&ba.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&ba.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new mn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&ba.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&ba.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(Za(t)));return Za(t,n)})}signMessage(e){return Sc(this,void 0,void 0,function*(){return Fa(this._signingKey().signDigest(ea(e)))})}_signTypedData(e,t,n){return Sc(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,a=>(this.provider==null&&ba.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Fa(this._signingKey().signDigest(bt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),fd(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=V(Ee(ce(ye([t,e.extraEntropy])),0,16)));let n=br(t,e.locale);return on.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ec(e,t,n).then(r=>new on(r))}static fromEncryptedJsonSync(e,t){return new on(Cc(e,t))}static fromMnemonic(e,t,n){return t||(t=fi),new on(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Rc(i,e){return yr(ea(i),e)}function Pc(i,e,t,n){return yr(bt.hash(i,e,t),n)}var ei={};Hr(ei,{AlchemyProvider:()=>_a,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>bs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>ka,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>Ed,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>va,NodesmithProvider:()=>As,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>Ta,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Ms,WebSocketProvider:()=>gi,getDefaultProvider:()=>tu,getNetwork:()=>ss,isCommunityResourcable:()=>bd,isCommunityResource:()=>ls,showThrottleMessage:()=>Yn});var Nc="networks/5.7.1";var Dc=new M(Nc);function Jb(i){return i&&typeof i.renetwork=="function"}function bi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return bi(t)},e}function Vo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return Vo(i,n)},t}var Oc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:bi("homestead")},Bc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:bi("ropsten")},Fc={chainId:63,name:"classicMordor",_defaultProvider:Vo("https://www.ethercluster.com/mordor","classicMordor")},jo={unspecified:{chainId:0,name:"unspecified"},homestead:Oc,mainnet:Oc,morden:{chainId:2,name:"morden"},ropsten:Bc,testnet:Bc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:bi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:bi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:bi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:bi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Vo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Fc,classicTestnet:Fc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Vo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:bi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:bi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(i){if(i==null)return null;if(typeof i=="number"){for(let n in jo){let r=jo[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=jo[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=jo[i.name];if(!e)return typeof i.chainId!="number"&&Dc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&Dc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(Jb(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lc="web/5.7.1";var $b=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function Uc(i,e){return $b(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var Qb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Sn=new M(Lc);function jc(i){return new Promise(e=>{setTimeout(e,i)})}function Di(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ii(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return W(i)}return i}function Xb(i){return Te(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function md(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Sn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+Zr(Te(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yr(_[3]):Xb(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Di(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Qb(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Di(H,U.headers?U.headers["content-type"]:null),requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=Te(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return md(i,r,n)}function Pn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var vd=An(Gc());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(d,null),transactionIndex:Y.allowNull(d,null),confirmations:Y.allowNull(d,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:d,data:a,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(d),creates:Y.allowNull(t,null),raw:Y.allowNull(a)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(d),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(c),type:Y.allowNull(d),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:Y.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:d,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(a),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:Y.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(d),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:a,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(r,void 0),toBlock:Y.allowNull(r,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(d),blockHash:Y.allowNull(s),transactionIndex:d,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(a,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ee(e,12));return t===ao?null:t}contractAddress(e){return ur(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=Y.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Co(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function bd(i){return i&&typeof i.isCommunityResource=="function"}function ls(i){return bd(i)&&i.isCommunityResource()}var zc=!1;function Yn(){zc||(zc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},he=new M(Ae),a5=10;function Wc(i){return i==null?"null":(Nt(i)!==32&&he.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function Kc(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[Wc(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Wc(e)}).join("&")}function s5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function ga(i){if(typeof i=="string"){if(i=i.toLowerCase(),Nt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+Kc(i);if(bo.isForkEvent(i))throw he.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+Kc(i.topics||[])}throw new Error("invalid event - "+i)}function ds(){return new Date().getTime()}function Jc(i){return new Promise(e=>{setTimeout(e,i)})}var o5=["block","network","pending","poll"],wd=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=s5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||o5.indexOf(this.tag)>=0}},u5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function xd(i){return me(F.from(i).toHexString(),32)}function $c(i){return yi.encode(ye([i,Ee(Xt(Xt(i)),0,4)]))}var Yc=new RegExp("^(ipfs)://(.*)$","i"),Qc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(i,e){try{return Jt(ps(i,e))}catch{}return null}function ps(i,e){if(i==="0x")return null;let t=F.from(Ee(i,e,e+32)).toNumber(),n=F.from(Ee(i,t,t+32)).toNumber();return Ee(i,t+32,t+32+n)}function gd(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):he.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function Xc(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function l5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function Zc(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Ci(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",Zc([$a(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=ps(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=u5[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return $c(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return $c(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=vd.default.toWords(r.slice(2));return o.unshift(s),vd.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Qr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",xd(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=Te(e);t=ye([xd(64),xd(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Td=null,d5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ft(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Td==null&&(Td=new Y),Td}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Rn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(ds()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=ds(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=ds();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=d5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jc(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jc(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return W(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=a5&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Nt(a)%32===4)try{let s=Ee(a,4),o=Ee(s,0,32);F.from(o).eq(r)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ee(s,32,64)).toNumber(),c=F.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new Ta(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ci(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=zo(yield this.call({to:n,data:"0x691f3431"+Ci(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new Ta(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ci(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new wd(ga(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=ga(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=ga(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=ga(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=ga(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=ga(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var xi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new M(Ae),p5=["call","estimateGas"];function cs(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=cs(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return cs(JSON.parse(i),e)}catch{}return null}function tf(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=cs(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=cs(e.body,!1);a==null&&(a=cs(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),p5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function ef(i){return new Promise(function(e){setTimeout(e,i)})}function y5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function ys(i){return i&&i.toLowerCase()}var _d={},va=class extends St{constructor(e,t,n){if(super(),e!==_d)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ad(_d,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),tf("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>xi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return xi(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(bt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return xi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Ad=class extends va{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},c5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=ft(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xi(this,void 0,void 0,function*(){yield ef(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ft(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new va(_d,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Rn(this.connection,JSON.stringify(n),y5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return tf(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return ef(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(c5);if(t)for(let a in t)t[a]&&(n[a]=!0);zr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Ln(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var wa=null;try{if(wa=WebSocket,wa==null)throw new Error("inject please")}catch{let e=new M(Ae);wa=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var kd=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Wo=new M(Ae),f5=1,gi=class extends Yt{constructor(e,t){t==="any"&&Wo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wa(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Wo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Wo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return kd(this,void 0,void 0,function*(){return null})}set polling(e){!e||Wo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=f5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return kd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return kd(this,void 0,void 0,function*(){this.websocket.readyState===wa.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var m5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},fs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return m5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ms{constructor(e,t){fs.checkAbstract(new.target,It),e=ft(new.target,"getNetwork")(e),t=ft(new.target,"getApiKey")(t);let n=ft(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nf=new M(Ae),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends gi{constructor(e,t){let n=new _a(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Ko}},_a=class extends It{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?Ko:(e&&typeof e!="string"&&nf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:nf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===Ko&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var h5=new M(Ae),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function b5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return h5.throwArgumentError("unsupported network","name",i)}var bs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let n={allowGzip:!0,url:"https://"+b5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var x5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},rf=new M(Ae),xs=class extends It{static getApiKey(e){return e!=null&&rf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:rf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return x5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var $o=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Oi=new M(Ae);function af(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(W(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function g5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function sf(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function of(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Md(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;Oi.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oi.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oi.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Oi.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return $o(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?sf:g5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Rn(o,d,s||sf);return this.emit("debug",{action:"response",request:r,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Md("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=af(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Md("call",a,t.transaction)}}case"estimateGas":{let r=af(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Md("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=of(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=of(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oi.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oi.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Yo=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},xr=new M(Ae);function Qo(){return new Date().getTime()}function uf(i){let e=null;for(let t=0;te?null:(n+r)/2}function Aa(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Aa(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Aa(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var T5=1;function df(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var v5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],w5=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function _5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function A5(i,e,t){let n=Aa;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=lf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return lf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Aa(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Aa(r))}:n=function(r){return r==null?null:Aa(r)};break;default:throw new Error("unknown method: "+e)}return _5(n,i.quorum)}function Ts(i,e){return Yo(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function k5(i,e,t,n){return Yo(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield Ts(i,e)),r.getLogs(a)}}return xr.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&xr.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=ls(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=ls(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&xr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&xr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=uf(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return uf(e)})}perform(e,t){return Yo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=Qo(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=k5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield df(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return v5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};w5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),xr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),xr.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>Xo(d)),provider:this})})}};var Ed=null;var Zo=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends gi{constructor(e,t){let n=new ka(e,t),r=n.connection;r.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},ka=class extends It{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===ws}};var eu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Cd=new M(Ae),M5="ETHERS_JS_SHARED",As=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cd.throwArgumentError("invalid apiKey","apiKey",e),e||M5}static getUrl(e,t){Cd.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Cd.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var pf=new M(Ae),yf="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=yf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:pf.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===yf}};var cf=new M(Ae),E5=1;function ff(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:E5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function C5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Ms=class extends Yt{constructor(e,t){e==null&&cf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=C5(e)):e.sendAsync?r=ff(e,e.sendAsync.bind(e)):e.send?r=ff(e,e.send.bind(e)):cf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var mf=new M(Ae);function tu(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new gi(i);default:mf.throwArgumentError("unsupported URL scheme","network",i)}}let t=ss(i);return(!t||!t._defaultProvider)&&mf.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_a,AnkrProvider:bs,CloudflareProvider:xs,EtherscanProvider:gs,InfuraProvider:ka,JsonRpcProvider:Yt,NodesmithProvider:As,PocketProvider:ks,Web3Provider:Ms,IpcProvider:null},e)}var te={};Hr(te,{AbiCoder:()=>Xr,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>xe,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oi,Interface:()=>Ii,LogDescription:()=>ta,Logger:()=>M,ParamType:()=>dt,RLP:()=>Xs,SigningKey:()=>mn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>na,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>md,_toEscapedUtf8String:()=>Tl,accessListify:()=>sn,arrayify:()=>V,base58:()=>yi,base64:()=>Ml,checkProperties:()=>zr,checkResultErrors:()=>Kr,commify:()=>_f,computeAddress:()=>hn,computeHmac:()=>ci,computePublicKey:()=>Ya,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Ka,defaultPath:()=>fi,defineReadOnly:()=>B,dnsEncode:()=>$a,entropyToMnemonic:()=>br,fetchJson:()=>Rn,formatBytes32String:()=>vl,formatEther:()=>Af,formatUnits:()=>Id,getAccountPath:()=>fc,getAddress:()=>fe,getContractAddress:()=>ur,getCreate2Address:()=>C0,getIcapAddress:()=>E0,getJsonWalletAddress:()=>dd,getStatic:()=>ft,hashMessage:()=>ea,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ee,hexStripZeros:()=>ll,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>M0,isBytes:()=>un,isBytesLike:()=>ii,isHexString:()=>re,isValidMnemonic:()=>cc,isValidName:()=>Cl,joinSignature:()=>Fa,keccak256:()=>ce,mnemonicToEntropy:()=>ma,mnemonicToSeed:()=>id,namehash:()=>Ci,nameprep:()=>kl,parseBytes32String:()=>wl,parseEther:()=>kf,parseTransaction:()=>Co,parseUnits:()=>Sd,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yr,recoverPublicKey:()=>Mo,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Za,sha256:()=>Xt,sha512:()=>Zl,shallowCopy:()=>we,shuffled:()=>rs,solidityKeccak256:()=>xf,solidityPack:()=>nu,soliditySha256:()=>gf,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>Te,toUtf8CodePoints:()=>Ei,toUtf8String:()=>Jt,verifyMessage:()=>Rc,verifyTypedData:()=>Pc,zeroPad:()=>rr});var hf="solidity/5.7.0";var I5=new RegExp("^bytes([0-9]+)$"),S5=new RegExp("^(u?int)([0-9]*)$"),R5=new RegExp("^(.*)\\[([0-9]*)\\]$"),P5="0000000000000000000000000000000000000000000000000000000000000000",Ma=new M(hf);function bf(i,e,t){switch(i){case"address":return t?rr(e,32):V(e);case"string":return Te(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?rr(e,32):V(e)}let n=i.match(S5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ma.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),rr(e,r/8)}if(n=i.match(I5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ma.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ma.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+P5).substring(0,66)):e}if(n=i.match(R5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ma.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(bf(r,o,!0))}),ye(s)}return Ma.throwArgumentError("invalid type","type",i)}function nu(i,e){i.length!=e.length&&Ma.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(bf(n,e[r]))}),W(ye(t))}function xf(i,e){return ce(nu(i,e))}function gf(i,e){return Xt(nu(i,e))}var Tf="units/5.7.0";var vf=new M(Tf),wf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function _f(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&vf.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Id(i,e){if(typeof e=="string"){let t=wf.indexOf(e);t!==-1&&(e=3*t)}return Gr(i,e??18)}function Sd(i,e){if(typeof i!="string"&&vf.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=wf.indexOf(e);t!==-1&&(e=3*t)}return dn(i,e??18)}function Af(i){return Id(i,18)}function kf(i){return Sd(i,18)}var iu="ethers/5.7.2";var Mf=new M(iu);try{let i=window;i._ethers==null&&(i._ethers=Rd)}catch{}var Nn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Nn||(Nn={}));var ru;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(ru||(ru={}));var Ea;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Ea||(Ea={}));var au;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(au||(au={}));var Pd;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(Pd||(Pd={}));var Es;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Es||(Es={}));var Cs;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Cs||(Cs={}));var Nd;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Nd||(Nd={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var Od="0x12345678",Dd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Dd||(Dd={}));var Tt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Tt||(Tt={}));var ve;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ve||(ve={}));var Bd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gr=class{static createInterface(){return new te.Interface(Bd)}static connect(e,t){return new oe(e,Bd,t)}};Mt(gr,"abi",Bd);var Fd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Tr=class{static createInterface(){return new te.Interface(Fd)}static connect(e,t){return new oe(e,Fd,t)}};Mt(Tr,"abi",Fd);var Ef=(i,e)=>{throw new Error(`${e}: ${i}`)},Ld=i=>i!=null;var{keccak256:D5,toUtf8Bytes:O5}=te,{MaxUint256:B5}=mt;var Ud=i=>te.formatEther(i);var jd=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(Tt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ld)},vr=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return B5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Bi=i=>D5(O5(i));var Ca=async(i,e)=>(await Tr.connect(i,e).version()).toNumber(),Vd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ld);var{hexDataSlice:Hd}=te,{MaxUint256:F5}=mt,Cf=i=>{let e=Hd(i,0,3),t=F.from(Hd(i,4,35)),n=F.from(Hd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},If=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),F5,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await vr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},L5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>If(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ti(i,e,t,n[0],r):L5(i,e,t,n,r):If(i,e,t,n,r);var{MaxUint256:Sf}=mt,{AddressZero:U5}=mt;async function j5(i,e){let t;try{return t=await i.getCapabilityRoles(te.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Is(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Cf(s),I=gr.connect(a,n.signer||n.provider),_=await j5(I,p);if(_.includes(Tt.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Sf}else{let{skillId:U}=await e.getDomain(c),H=await i.getChildSkillId(U,b);if(H.eq(d))o=Sf;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,U5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:V5}=mt,ni=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ea[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ni.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return ni.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${V5}/noProof`,s=await ni.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var Rf=10,mA=wt(Rf),Pf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nf=Rf-1;var Df=6,xA=wt(Df),Of={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Bf=Df-1;var Ff=7,vA=wt(Ff),Lf={1:[],2:[],3:[],4:[],5:[],6:[]},Uf=Ff-1;var jf=7,AA=wt(jf),Vf={1:[],2:[],3:[],4:[],5:[],6:[]},Hf=jf-1;var qf=4,EA=wt(qf),Gf={1:[],2:[],3:[]},zf=qf-1;var Wf=5,SA=wt(Wf),Kf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Jf=Wf-1;var $f=2,NA=wt($f),Qf={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Xf=$f-1;var Yf=4,BA=wt(Yf),Zf={1:[1,2,3],2:[1,2,3],3:[1,2,3]},em=Yf-1;var tm=7,UA=wt(tm),nm={1:[],2:[],3:[],4:[],5:[],6:[]},im=tm-1;var rm=11,HA=wt(rm),qd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gd=rm-1;var am=6,zA=wt(am),sm={1:[],2:[],3:[],4:[],5:[]},om=am-1;var Fi=(i,e,t)=>{switch(i){case ve.CoinMachine:{let n=Pf[e];return!!n&&!n.includes(t)}case ve.EvaluatedExpenditure:{let n=Of[e];return!!n&&!n.includes(t)}case ve.FundingQueue:{let n=Lf[e];return!!n&&!n.includes(t)}case ve.IVotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.OneTxPayment:{let n=Vf[e];return!!n&&!n.includes(t)}case ve.ReputationBootstrapper:{let n=Gf[e];return!!n&&!n.includes(t)}case ve.StagedExpenditure:{let n=Qf[e];return!!n&&!n.includes(t)}case ve.StakedExpenditure:{let n=Kf[e];return!!n&&!n.includes(t)}case ve.StreamingPayments:{let n=Zf[e];return!!n&&!n.includes(t)}case ve.TokenSupplier:{let n=nm[e];return!!n&&!n.includes(t)}case ve.VotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.Whitelist:{let n=sm[e];return!!n&&!n.includes(t)}default:return Ef(i,"Could not find extension with name")}};var H5={[ve.CoinMachine]:Nf,[ve.EvaluatedExpenditure]:Bf,[ve.FundingQueue]:Uf,[ve.IVotingReputation]:Gd,[ve.OneTxPayment]:Hf,[ve.ReputationBootstrapper]:zf,[ve.StagedExpenditure]:Xf,[ve.StakedExpenditure]:Jf,[ve.StreamingPayments]:em,[ve.TokenSupplier]:im,[ve.VotingReputation]:Gd,[ve.Whitelist]:om};var Ih=An(um(),1);var yp=An(Mh(),1);var Se;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Se||(Se={}));var pp=2,dp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(dp||(dp={}));var Eh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,tx=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),cp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Se.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Eh(t.errors);throw new Error(n)};var Ch=(i,e)=>{let t=i===Se.Colony?tx(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:pp});if(!n.success){let r=Eh(n.errors);throw new Error(r)}return n.data};var fp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=fp;var hp=(0,Ih.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Fs={[Se.Annotation]:"Annotation(address,bytes32,string)",[Se.Colony]:"ColonyMetadata(address,string)",[Se.Decision]:"Annotation(address,bytes32,string)",[Se.Domain]:"DomainMetadata(address,uint256,string)",[Se.Misc]:"",[Se.DEFAULT]:""},Na=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Fs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await hp(n)).json();return cp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await hp(n)).json(),s=Object.entries(Fs).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return cp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Ch(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var xM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};Mt(vn,"abi",bp);var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};Mt(wn,"abi",xp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Er=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};Mt(Er,"abi",gp);var ju=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Sh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",ax=i=>i.length>1,Dn=class extends fr{constructor(...e){ax(e)?super(...e):super(ju,Sh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(ju)}static connect(e,t){return new oe(e,ju,t)}};Mt(Dn,"bytecode",Sh),Mt(Dn,"abi",ju);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Cr=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};Mt(Cr,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ir=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};Mt(Ir,"abi",vp);var Sr;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Sr||(Sr={}));var _n;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(_n||(_n={}));var{AddressZero:Rh}=mt;async function ux(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var lx=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Dn.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await ux(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{r=!1}try{await t.nonces(Rh)}catch{a=!1}return n?r?t.tokenClientType=_n.Colony:(t=Cr.connect(i,e),t.tokenClientType=_n.ColonyLegacy):a?(t=wn.connect(i,e),t.tokenClientType=_n.Erc2612):(t=vn.connect(i,e),t.tokenClientType=_n.Erc20),t.clientType=Sr.TokenClient,t},wp=lx;var dx=(i,e)=>{let t=Ir.connect(i,e);return t.clientType=Sr.TokenLockingClient,t},_p=dx;var{AddressZero:Ap}=mt,px=vn.connect(Ap,new ei.BaseProvider(3656691)).interface,yx=Er.connect(Ap,new ei.BaseProvider(3656691)).interface,cx=wn.connect(Ap,new ei.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Ls.abi=kp;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Rr=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Rr.abi=Ep;var Ti=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Fs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:mx,solidityKeccak256:hx,splitSignature:bx}=te,Pr=class extends Ti{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Nn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=hx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=mx(d),c=await n.signMessage(p),{r:b,s:I,v:_}=bx(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Vu=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Nr=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Nr.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Dr=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Dr.abi=Ip;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Or.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Br=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Br.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fr=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fr.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Lr=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Lr.abi=Np;var{AddressZero:Ax}=mt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(On.extensionType),e.address);if(t===Ax)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=On.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,a,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding],this.oneTxPaymentContract.address),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},ji=On;ji.supportedVersions=[{version:3,factory:Br},{version:4,factory:Fr},{version:5,factory:Lr}],ji.extensionType=ve.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var js=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Vs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=wn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ne("Approval",r)}))}};var Ph=async(i,e)=>{let t=await wp(e,i.signerOrProvider);switch(t.tokenClientType){case _n.Colony:return new js(i,t);case _n.Erc20:return new Bn(i,t);case _n.Erc2612:return new Vs(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ur=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ur.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],jr=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};jr.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Vr.abi=Bp;var{AddressZero:Fp}=mt;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,a,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Is(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Od);return[e,t,Fp,Od,n,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Se.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Vu("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ud(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Tt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Vi=Fn;Vi.supportedVersions=[{version:7,factory:Ur},{version:8,factory:jr},{version:9,factory:Vr}],Vi.extensionType=ve.VotingReputation;var Cx={["motion"]:Vi,["oneTx"]:ji},Oa=class{static async connect(e,t){let n=await Ca(t,e.signerOrProvider),r=Oa.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await Ph(e,s),d=new Oa(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return Oa.supportedVersions[Oa.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ni(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Vi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ji.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Se.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Se.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Se.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Tt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ti(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Tt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await vr(b,this.colony,a,s),_=await vr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Se.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Annotation})}installExtension(e){let t=Cx[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Fi(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Bi(r),t.getLatestSupportedVersion()],async s=>({...Vu("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return su(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Tt.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},Ba=Oa;Ba.supportedVersions=[{version:11,factory:Nr},{version:12,factory:Dr},{version:13,factory:Or}];var{splitSignature:Ix}=te,qu=class extends Ti{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Ix(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Hs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Nh}=te,{AddressZero:Lp}=mt,qs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Na(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||au[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Ea[this.network]},this.networkContract=Rr.connect(t?.customNetworkAddress||ru[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Hs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new Ti({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Pr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Se.Colony,n),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Se.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return Ba.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.network],""):null}async getColonyAddress(e){let t=Nh(`${e}${Es[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.network],""):null}async getUserAddress(e){let t=Nh(`${e}${Cs[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...ne("TokenDeployed",r)}))}};var{formatEther:Sx,isAddress:Rx}=te,Px=new ei.JsonRpcProvider("http://127.0.0.1:8545"),Nx=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Px),Dx=async i=>{let e=Nx(),r=await(await new qs(e,{customNetworkAddress:i,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return Sx(r)},jp=document.querySelector("#address"),Oh=document.querySelector("#button"),Vp=document.querySelector("#error"),Bh=document.querySelector("#result");if(!jp||!Oh||!Vp||!Bh)throw new Error("Could not find all required HTML elements");var Dh=i=>{Vp.innerText=i},Ox=()=>{Vp.innerText=""},Up=i=>{Bh.innerText=i};Oh.addEventListener("click",async()=>{Ox();let i=jp.value;if(!Rx(i))return Dh("This is not a valid address");Up("Thinking..."),jp.value="";let e;try{e=await Dx(i),Up(`${e} CLNY in root domain of local MetaColony`)}catch(t){Dh(`Found an error: ${t.message}`),Up("")}return null});})(); +`)}static register(e,t){if(t||(t=e.locale),B5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var F5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ns=null;function lf(a){if(ns==null&&(ns=F5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ns=null,new Error("BIP39 Wordlist for en (English) FAILED")}var el=class extends xn{constructor(){super("en")}getWord(e){return lf(this),ns[e]}getWordIndex(e){return lf(this),ns.indexOf(e)}},tl=new el;xn.register(tl);var hi={en:tl};var pf="hdnode/5.7.0";var as=new M(pf),L5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),U5=ve("Bitcoin seed"),cr=2147483648;function ff(a){return(1<=256)throw new Error("Depth too large!");return yf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(fr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~cr));let n=new Uint8Array(37);if(e&cr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(L5)):l=new mn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(fr,o,l,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=cr)throw new Error("invalid path index - "+r);n=n._derive(cr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=cr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,U5,n));return new It(fr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=nl(n),e=xi(mr(e,n),n),It._fromSeed(al(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||yf(t.slice(0,78))!==e)&&as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(fr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(fr,W(o.slice(1)),null,i,s,r,n,null)}return as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function mr(a,e){e=nl(e),as.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=ff(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function xi(a,e){if(e=nl(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&V5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&ff(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function cf(a,e){try{return mr(a,e),!0}catch{}return!1}function mf(a){return(typeof a!="number"||a<0||a>=cr||a%1)&&as.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var hf="random/5.7.0";var il=new M(hf);function j5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var xf=j5(),Oo=xf.crypto||xf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(a){return il.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(a){(a<=0||a>1024||a%1||a!=a)&&il.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Oo.getRandomValues(e),j(e)}function is(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var ol=kn(sl());var Bo="json-wallets/5.7.0";function ma(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function hr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:gf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Xn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+hr(I.getUTCMonth()+1,2)+"-"+hr(I.getUTCDate(),2)+"T"+hr(I.getUTCHours(),2)+"-"+hr(I.getUTCMinutes(),2)+"-"+hr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function If(a,e,t){if(Fo(a)){t&&t(0);let n=dl(a,e);return t&&t(1),Promise.resolve(n)}return Lo(a)?Ef(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(a,e){if(Fo(a))return dl(a,e);if(Lo(a))return Mf(a,e);throw new Error("invalid JSON wallet")}var Sf="wallet/5.7.0";var Rf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xr=new M(Sf);function W5(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function K5(a){let e=a.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),W5(e)){let n=new mn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&xr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),K5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&xr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&xr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new mn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&xr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&xr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(Zr(t)));return Zr(t,n)})}signMessage(e){return Rf(this,void 0,void 0,function*(){return Fr(this._signingKey().signDigest(er(e)))})}_signTypedData(e,t,n){return Rf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&xr.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Fr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=xi(t,e.locale);return on.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return If(e,t,n).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Cf(e,t))}static fromMnemonic(e,t,n){return t||(t=ca),new on(It.fromMnemonic(e,null,n).derivePath(t))}};function Pf(a,e){return yi(er(a),e)}function Nf(a,e,t,n){return yi(bt.hash(a,e,t),n)}var ea={};Hi(ea,{AlchemyProvider:()=>_r,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>xs,BaseProvider:()=>Zn,CloudflareProvider:()=>bs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>Ar,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>El,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>vr,NodesmithProvider:()=>ks,PocketProvider:()=>As,Provider:()=>$t,Resolver:()=>Tr,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>Ms,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>ss,isCommunityResourcable:()=>xl,isCommunityResource:()=>ds,showThrottleMessage:()=>Yn});var Df="networks/5.7.1";var Of=new M(Df);function J5(a){return a&&typeof a.renetwork=="function"}function xa(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function jo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return jo(a,n)},t}var Bf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Ff={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Lf={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Bf,mainnet:Bf,morden:{chainId:2,name:"morden"},ropsten:Ff,testnet:Ff,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Lf,classicTestnet:Lf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(a){if(a==null)return null;if(typeof a=="number"){for(let n in Vo){let i=Vo[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Vo[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Vo[a.name];if(!e)return typeof a.chainId!="number"&&Of.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Of.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(J5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Uf="web/5.7.1";var $5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Vf(a,e){return $5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var Q5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new M(Uf);function jf(a){return new Promise(e=>{setTimeout(e,a)})}function Da(a,e){if(a==null)return null;if(typeof a=="string")return a;if(aa(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function X5(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+Zi(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):X5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Q5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return ml(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var vl=kn(zf());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===ro?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Io(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function xl(a){return a&&typeof a.isCommunityResource=="function"}function ds(a){return xl(a)&&a.isCommunityResource()}var Wf=!1;function Yn(){Wf||(Wf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new M(Ae),rx=10;function Kf(a){return a==null?"null":(Nt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Jf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Kf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Kf(e)}).join("&")}function sx(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function gr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Nt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Jf(a);if(xo.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Jf(a.topics||[])}throw new Error("invalid event - "+a)}function ls(){return new Date().getTime()}function $f(a){return new Promise(e=>{setTimeout(e,a)})}var ox=["block","network","pending","poll"],wl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=sx(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||ox.indexOf(this.tag)>=0}},ux={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bl(a){return me(F.from(a).toHexString(),32)}function Qf(a){return ya.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var Zf=new RegExp("^(ipfs)://(.*)$","i"),Xf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Zf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(a,e){try{return Jt(ps(a,e))}catch{}return null}function ps(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function gl(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Yf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function dx(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function ec(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",ec([$r(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ps(r,0)),r}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=ux[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Qf(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Qf(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=vl.default.toWords(i.slice(2));return o.unshift(s),vl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Qi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===M.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",bl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([bl(64),bl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Tl=null,lx=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Tl==null&&(Tl=new Y),Tl}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,M.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ls()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ls(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ls();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=lx++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield $f(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ls();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield $f(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=rx&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new Tr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ia(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=zo(yield this.call({to:n,data:"0x691f3431"+Ia(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Tr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ia(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new wl(gr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=gr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=gr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=gr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=gr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=gr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var ba=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new M(Ae),px=["call","estimateGas"];function fs(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=fs(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return fs(JSON.parse(a),e)}catch{}return null}function nc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=fs(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=fs(e.body,!1);r==null&&(r=fs(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),px.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function tc(a){return new Promise(function(e){setTimeout(e,a)})}function yx(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ys(a){return a&&a.toLowerCase()}var _l={},vr=class extends St{constructor(e,t,n){if(super(),e!==_l)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kl(_l,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ba(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),nc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},kl=class extends vr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},fx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield tc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new vr(_l,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),yx).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return nc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return tc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(fx);if(t)for(let r in t)t[r]&&(n[r]=!0);zi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var wr=null;try{if(wr=WebSocket,wr==null)throw new Error("inject please")}catch{let e=new M(Ae);wr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Wo=new M(Ae),cx=1,ga=class extends Yt{constructor(e,t){t==="any"&&Wo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Wo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Wo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Al(this,void 0,void 0,function*(){return null})}set polling(e){!e||Wo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=cx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Al(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Al(this,void 0,void 0,function*(){this.websocket.readyState===wr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var mx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},cs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return mx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||cs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends ms{constructor(e,t){cs.checkAbstract(new.target,Ct),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){cs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return cs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return cs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var ac=new M(Ae),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends ga{constructor(e,t){let n=new _r(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Ko}},_r=class extends Ct{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?Ko:(e&&typeof e!="string"&&ac.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Ko&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var hx=new M(Ae),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function xx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return hx.throwArgumentError("unsupported network","name",a)}var xs=class extends Ct{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let n={allowGzip:!0,url:"https://"+xx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var bx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ic=new M(Ae),bs=class extends Ct{static getApiKey(e){return e!=null&&ic.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:ic.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return bx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var $o=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Oa=new M(Ae);function rc(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function gx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function sc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function oc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Ml(a,e,t){if(a==="call"&&e.code===M.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return $o(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?sc:gx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||sc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Ml("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=rc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ml("call",r,t.transaction)}}case"estimateGas":{let i=rc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ml("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=oc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=oc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Yo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bi=new M(Ae);function Qo(){return new Date().getTime()}function uc(a){let e=null;for(let t=0;te?null:(n+i)/2}function kr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>kr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=kr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Tx=1;function lc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var vx=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],wx=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function _x(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function kx(a,e,t){let n=kr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=dc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return dc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,kr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),kr(i))}:n=function(i){return i==null?null:kr(i)};break;default:throw new Error("unknown method: "+e)}return _x(n,a.quorum)}function Ts(a,e){return Yo(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function Ax(a,e,t,n){return Yo(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Ts(a,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=ds(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ds(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=uc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return uc(e)})}perform(e,t){return Yo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Ax(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield lc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return vx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};wx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Xo(l)),provider:this})})}};var El=null;var Zo=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends ga{constructor(e,t){let n=new Ar(e,t),i=n.connection;i.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},Ar=class extends Ct{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ws}};var eu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Il=new M(Ae),Mx="ETHERS_JS_SHARED",ks=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&Il.throwArgumentError("invalid apiKey","apiKey",e),e||Mx}static getUrl(e,t){Il.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Il.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var pc=new M(Ae),yc="62e1ad51b37b8e00394bda3b",As=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=yc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:pc.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===yc}};var fc=new M(Ae),Ex=1;function cc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Ex++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Ix(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Ms=class extends Yt{constructor(e,t){e==null&&fc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Ix(e)):e.sendAsync?i=cc(e,e.sendAsync.bind(e)):e.send?i=cc(e,e.send.bind(e)):fc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var mc=new M(Ae);function tu(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new ga(a);default:mc.throwArgumentError("unsupported URL scheme","network",a)}}let t=ss(a);return(!t||!t._defaultProvider)&&mc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_r,AnkrProvider:xs,CloudflareProvider:bs,EtherscanProvider:gs,InfuraProvider:Ar,JsonRpcProvider:Yt,NodesmithProvider:ks,PocketProvider:As,Web3Provider:Ms,IpcProvider:null},e)}var te={};Hi(te,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>It,Indexed:()=>oa,Interface:()=>Ca,LogDescription:()=>tr,Logger:()=>M,ParamType:()=>pt,RLP:()=>Xs,SigningKey:()=>mn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>nr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Md,checkProperties:()=>zi,checkResultErrors:()=>Ki,commify:()=>_c,computeAddress:()=>hn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>$r,entropyToMnemonic:()=>xi,fetchJson:()=>Rn,formatBytes32String:()=>vd,formatEther:()=>kc,formatUnits:()=>Cl,getAccountPath:()=>mf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Iy,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>er,hexConcat:()=>kt,hexDataLength:()=>Nt,hexDataSlice:()=>Ie,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>My,isBytes:()=>un,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>cf,isValidName:()=>Id,joinSignature:()=>Fr,keccak256:()=>fe,mnemonicToEntropy:()=>mr,mnemonicToSeed:()=>al,namehash:()=>Ia,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>Ac,parseTransaction:()=>Io,parseUnits:()=>Sl,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Zr,sha256:()=>Xt,sha512:()=>Zd,shallowCopy:()=>_e,shuffled:()=>is,solidityKeccak256:()=>bc,solidityPack:()=>nu,soliditySha256:()=>gc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Pf,verifyTypedData:()=>Nf,zeroPad:()=>ii});var hc="solidity/5.7.0";var Cx=new RegExp("^bytes([0-9]+)$"),Sx=new RegExp("^(u?int)([0-9]*)$"),Rx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Px="0000000000000000000000000000000000000000000000000000000000000000",Mr=new M(hc);function xc(a,e,t){switch(a){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let n=a.match(Sx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(n=a.match(Cx),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Px).substring(0,66)):e}if(n=a.match(Rx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(xc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",a)}function nu(a,e){a.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(xc(n,e[i]))}),W(ye(t))}function bc(a,e){return fe(nu(a,e))}function gc(a,e){return Xt(nu(a,e))}var Tc="units/5.7.0";var vc=new M(Tc),wc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function _c(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&vc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Cl(a,e){if(typeof e=="string"){let t=wc.indexOf(e);t!==-1&&(e=3*t)}return Gi(a,e??18)}function Sl(a,e){if(typeof a!="string"&&vc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=wc.indexOf(e);t!==-1&&(e=3*t)}return ln(a,e??18)}function kc(a){return Cl(a,18)}function Ac(a){return Sl(a,18)}var au="ethers/5.7.2";var Mc=new M(au);try{let a=window;a._ethers==null&&(a._ethers=Rl)}catch{}var Nn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Nn||(Nn={}));var iu;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(iu||(iu={}));var Er;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Er||(Er={}));var ru;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(ru||(ru={}));var Pl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Pl||(Pl={}));var Es;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Es||(Es={}));var Is;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Is||(Is={}));var Nl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Nl||(Nl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new te.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new te.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Ec=(a,e)=>{throw new Error(`${e}: ${a}`)},Ll=a=>a!=null;var{keccak256:Dx,toUtf8Bytes:Ox}=te,{MaxUint256:Bx}=ht;var Ul=a=>te.formatEther(a);var Vl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Bx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Ba=a=>Dx(Ox(a));var Ir=async(a,e)=>(await Ti.connect(a,e).version()).toNumber(),jl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=te,{MaxUint256:Fx}=ht,Ic=a=>{let e=Hl(a,0,3),t=F.from(Hl(a,4,35)),n=F.from(Hl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Cc=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Fx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await vi(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},Lx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Cc(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ta(a,e,t,n[0],i):Lx(a,e,t,n,i):Cc(a,e,t,n,i);var{MaxUint256:Sc}=ht,{AddressZero:Ux}=ht;async function Vx(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ic(s),C=gi.connect(r,n.signer||n.provider),_=await Vx(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:E}=await a.getSkill(l),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Ux);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:jx}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${jx}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Rc=10,Dk=_t(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=6,Fk=_t(Dc),Oc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Bc=Dc-1;var Fc=7,Vk=_t(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[]},Uc=Fc-1;var Vc=7,qk=_t(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=4,Wk=_t(qc),Gc={1:[],2:[],3:[]},zc=qc-1;var Wc=5,$k=_t(Wc),Kc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Jc=Wc-1;var $c=2,Yk=_t($c),Qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Xc=$c-1;var Yc=4,tA=_t(Yc),Zc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},em=Yc-1;var tm=7,iA=_t(tm),nm={1:[],2:[],3:[],4:[],5:[],6:[]},am=tm-1;var im=11,oA=_t(im),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gl=im-1;var rm=6,lA=_t(rm),sm={1:[],2:[],3:[],4:[],5:[]},om=rm-1;var Fa=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Pc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Oc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Lc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=jc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=Gc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=Qc[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=Kc[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=Zc[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=nm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=sm[e];return!!n&&!n.includes(t)}default:return Ec(a,"Could not find extension with name")}};var Hx={[we.CoinMachine]:Nc,[we.EvaluatedExpenditure]:Bc,[we.FundingQueue]:Uc,[we.IVotingReputation]:Gl,[we.OneTxPayment]:Hc,[we.ReputationBootstrapper]:zc,[we.StagedExpenditure]:Xc,[we.StakedExpenditure]:Jc,[we.StreamingPayments]:em,[we.TokenSupplier]:am,[we.VotingReputation]:Gl,[we.Whitelist]:om};var Ch=kn(um(),1);var yp=kn(Mh(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var Eh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,t1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),fp=(a,e)=>{let t=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Eh(t.errors);throw new Error(n)};var Ih=(a,e)=>{let t=a===Re.Colony?t1(e):e,n=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:pp});if(!n.success){let i=Eh(n.errors);throw new Error(i)}return n.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,Ch.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Fs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Nr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Fs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await hp(n)).json();return fp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await hp(n)).json(),s=Object.entries(Fs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Ih(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var FM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(vn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(wn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ei,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Sh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",k1=a=>a.length>1,Dn=class extends ci{constructor(...e){k1(e)?super(...e):super(Vu,Sh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Dn,"bytecode",Sh),xe(Dn,"abi",Vu);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ci=class{static createInterface(){return new te.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};xe(Ci,"abi",vp);var Si;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var _n;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(_n||(_n={}));var{AddressZero:Rh}=ht;async function E1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Dn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await E1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Rh)}catch{i=!1}try{await t.nonces(Rh)}catch{r=!1}return n?i?t.tokenClientType=_n.Colony:(t=Ii.connect(a,e),t.tokenClientType=_n.ColonyLegacy):r?(t=wn.connect(a,e),t.tokenClientType=_n.Erc2612):(t=vn.connect(a,e),t.tokenClientType=_n.Erc20),t.clientType=Si.TokenClient,t},wp=I1;var C1=(a,e)=>{let t=Ci.connect(a,e);return t.clientType=Si.TokenLockingClient,t},_p=C1;var{AddressZero:kp}=ht,S1=vn.connect(kp,new ea.BaseProvider(3656691)).interface,R1=Ei.connect(kp,new ea.BaseProvider(3656691)).interface,P1=wn.connect(kp,new ea.BaseProvider(3656691)).interface;var Ap=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Fs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:D1,solidityKeccak256:O1,splitSignature:B1}=te,Pi=class extends Ta{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=O1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=D1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=B1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},ju=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Ni.abi=Ip;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Di.abi=Cp;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var{AddressZero:q1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===q1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,r,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Va.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Vs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var js=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=wn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ne("Approval",i)}))}};var Ph=async(a,e)=>{let t=await wp(e,a.signerOrProvider);switch(t.tokenClientType){case _n.Colony:return new Vs(a,t);case _n.Erc20:return new Bn(a,t);case _n.Erc2612:return new js(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};ji.abi=Bp;var{AddressZero:Fp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,r,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Ol);return[e,t,Fp,Ol,n,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Ul(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],ja.extensionType=we.VotingReputation;var K1={["motion"]:ja,["oneTx"]:Va},Or=class{static async connect(e,t){let n=await Ir(t,e.signerOrProvider),i=Or.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Ph(e,s),l=new Or(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=K1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Fa(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return su(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Br=Or;Br.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:J1}=te,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:f}),{r:C,s:_,v}=J1(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:f,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Hs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Nh}=te,{AddressZero:Lp}=ht,qs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Nr(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||ru[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Er[this.network]},this.networkContract=Ri.connect(t?.customNetworkAddress||iu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Hs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new Ta({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Pi({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Re.Colony,n),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Br.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.network],""):null}async getColonyAddress(e){let t=Nh(`${e}${Es[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.network],""):null}async getUserAddress(e){let t=Nh(`${e}${Is[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...ne("TokenDeployed",i)}))}};var{formatEther:$1,isAddress:Q1}=te,X1=new ea.JsonRpcProvider("http://127.0.0.1:8545"),Y1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",X1),Z1=async a=>{let e=Y1(),i=await(await new qs(e,{customNetworkAddress:a,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return $1(i)},Vp=document.querySelector("#address"),Oh=document.querySelector("#button"),jp=document.querySelector("#error"),Bh=document.querySelector("#result");if(!Vp||!Oh||!jp||!Bh)throw new Error("Could not find all required HTML elements");var Dh=a=>{jp.innerText=a},eg=()=>{jp.innerText=""},Up=a=>{Bh.innerText=a};Oh.addEventListener("click",async()=>{eg();let a=Vp.value;if(!Q1(a))return Dh("This is not a valid address");Up("Thinking..."),Vp.value="";let e;try{e=await Z1(a),Up(`${e} CLNY in root domain of local MetaColony`)}catch(t){Dh(`Found an error: ${t.message}`),Up("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-motions.js b/local-motions.js index 823bc3c06..a0ed6913a 100644 --- a/local-motions.js +++ b/local-motions.js @@ -1,12 +1,12 @@ -"use strict";(()=>{var u6=Object.create;var Zs=Object.defineProperty;var l6=Object.getOwnPropertyDescriptor;var d6=Object.getOwnPropertyNames;var p6=Object.getPrototypeOf,y6=Object.prototype.hasOwnProperty;var c6=(n,e,t)=>e in n?Zs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ie=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Jr=(n,e)=>{for(var t in e)Zs(n,t,{get:e[t],enumerable:!0})},f6=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d6(e))!y6.call(n,r)&&r!==t&&Zs(n,r,{get:()=>e[r],enumerable:!(i=l6(e,r))||i.enumerable});return n};var In=(n,e,t)=>(t=n!=null?u6(p6(n)):{},f6(e||!n||!n.__esModule?Zs(t,"default",{value:n,enumerable:!0}):t,n));var Ct=(n,e,t)=>(c6(n,typeof e!="symbol"?e+"":e,t),t);var e0=ie(()=>{});var hl=ie((t0,ml)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function i(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof n=="object"?n.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=e0().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(x==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function d(C,u,y,x){for(var w=0,A=0,h=Math.min(C.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(A!==0&&(x=A.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),A=x||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,A=0,h=0;A>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(x=0&&(u[x--]=k>>8&255),x>=0&&(u[x--]=k>>16&255),h===6?(x>=0&&(u[x--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=x.length,A!==0)this.words[this.length]=A,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;x>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,A=y.words,h=x.words,k=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,Y=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,de=ft>>>13,Ji=w[4]|0,Oe=Ji&8191,Be=Ji>>>13,$i=w[5]|0,Fe=$i&8191,Le=$i>>>13,Qi=w[6]|0,Ue=Qi&8191,Ve=Qi>>>13,Yi=w[7]|0,je=Yi&8191,qe=Yi>>>13,Xi=w[8]|0,He=Xi&8191,Ge=Xi>>>13,Zi=w[9]|0,ze=Zi&8191,We=Zi>>>13,er=A[0]|0,Ke=er&8191,Je=er>>>13,tr=A[1]|0,$e=tr&8191,Qe=tr>>>13,nr=A[2]|0,Ye=nr&8191,Xe=nr>>>13,ir=A[3]|0,Ze=ir&8191,et=ir>>>13,rr=A[4]|0,tt=rr&8191,nt=rr>>>13,ar=A[5]|0,it=ar&8191,rt=ar>>>13,sr=A[6]|0,at=sr&8191,st=sr>>>13,or=A[7]|0,ot=or&8191,ut=or>>>13,ur=A[8]|0,lt=ur&8191,dt=ur>>>13,lr=A[9]|0,pt=lr&8191,yt=lr>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,Ke),l=Math.imul(f,Je),l=l+Math.imul(P,Ke)|0,m=Math.imul(P,Je);var Ci=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,g=Math.imul(V,Ke),l=Math.imul(V,Je),l=l+Math.imul(K,Ke)|0,m=Math.imul(K,Je),g=g+Math.imul(f,$e)|0,l=l+Math.imul(f,Qe)|0,l=l+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var Ii=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,g=Math.imul(Y,Ke),l=Math.imul(Y,Je),l=l+Math.imul(Q,Ke)|0,m=Math.imul(Q,Je),g=g+Math.imul(V,$e)|0,l=l+Math.imul(V,Qe)|0,l=l+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|0;var Si=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Si>>>26)|0,Si&=67108863,g=Math.imul(Z,Ke),l=Math.imul(Z,Je),l=l+Math.imul(de,Ke)|0,m=Math.imul(de,Je),g=g+Math.imul(Y,$e)|0,l=l+Math.imul(Y,Qe)|0,l=l+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Ye)|0,l=l+Math.imul(V,Xe)|0,l=l+Math.imul(K,Ye)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(f,Ze)|0,l=l+Math.imul(f,et)|0,l=l+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Ri=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,g=Math.imul(Oe,Ke),l=Math.imul(Oe,Je),l=l+Math.imul(Be,Ke)|0,m=Math.imul(Be,Je),g=g+Math.imul(Z,$e)|0,l=l+Math.imul(Z,Qe)|0,l=l+Math.imul(de,$e)|0,m=m+Math.imul(de,Qe)|0,g=g+Math.imul(Y,Ye)|0,l=l+Math.imul(Y,Xe)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(V,Ze)|0,l=l+Math.imul(V,et)|0,l=l+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(f,tt)|0,l=l+Math.imul(f,nt)|0,l=l+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Pi=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,g=Math.imul(Fe,Ke),l=Math.imul(Fe,Je),l=l+Math.imul(Le,Ke)|0,m=Math.imul(Le,Je),g=g+Math.imul(Oe,$e)|0,l=l+Math.imul(Oe,Qe)|0,l=l+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(Y,Ze)|0,l=l+Math.imul(Y,et)|0,l=l+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,l=l+Math.imul(V,nt)|0,l=l+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(f,it)|0,l=l+Math.imul(f,rt)|0,l=l+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var tl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(Ue,Ke),l=Math.imul(Ue,Je),l=l+Math.imul(Ve,Ke)|0,m=Math.imul(Ve,Je),g=g+Math.imul(Fe,$e)|0,l=l+Math.imul(Fe,Qe)|0,l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Ye)|0,l=l+Math.imul(Oe,Xe)|0,l=l+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|0,g=g+Math.imul(Z,Ze)|0,l=l+Math.imul(Z,et)|0,l=l+Math.imul(de,Ze)|0,m=m+Math.imul(de,et)|0,g=g+Math.imul(Y,tt)|0,l=l+Math.imul(Y,nt)|0,l=l+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,it)|0,l=l+Math.imul(V,rt)|0,l=l+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(f,at)|0,l=l+Math.imul(f,st)|0,l=l+Math.imul(P,at)|0,m=m+Math.imul(P,st)|0;var nl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(je,Ke),l=Math.imul(je,Je),l=l+Math.imul(qe,Ke)|0,m=Math.imul(qe,Je),g=g+Math.imul(Ue,$e)|0,l=l+Math.imul(Ue,Qe)|0,l=l+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Ye)|0,l=l+Math.imul(Fe,Xe)|0,l=l+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|0,g=g+Math.imul(Oe,Ze)|0,l=l+Math.imul(Oe,et)|0,l=l+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Z,tt)|0,l=l+Math.imul(Z,nt)|0,l=l+Math.imul(de,tt)|0,m=m+Math.imul(de,nt)|0,g=g+Math.imul(Y,it)|0,l=l+Math.imul(Y,rt)|0,l=l+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(V,at)|0,l=l+Math.imul(V,st)|0,l=l+Math.imul(K,at)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(f,ot)|0,l=l+Math.imul(f,ut)|0,l=l+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var il=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,g=Math.imul(He,Ke),l=Math.imul(He,Je),l=l+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,l=l+Math.imul(je,Qe)|0,l=l+Math.imul(qe,$e)|0,m=m+Math.imul(qe,Qe)|0,g=g+Math.imul(Ue,Ye)|0,l=l+Math.imul(Ue,Xe)|0,l=l+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Xe)|0,g=g+Math.imul(Fe,Ze)|0,l=l+Math.imul(Fe,et)|0,l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,l=l+Math.imul(Oe,nt)|0,l=l+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Z,it)|0,l=l+Math.imul(Z,rt)|0,l=l+Math.imul(de,it)|0,m=m+Math.imul(de,rt)|0,g=g+Math.imul(Y,at)|0,l=l+Math.imul(Y,st)|0,l=l+Math.imul(Q,at)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,l=l+Math.imul(V,ut)|0,l=l+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(f,lt)|0,l=l+Math.imul(f,dt)|0,l=l+Math.imul(P,lt)|0,m=m+Math.imul(P,dt)|0;var rl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(rl>>>26)|0,rl&=67108863,g=Math.imul(ze,Ke),l=Math.imul(ze,Je),l=l+Math.imul(We,Ke)|0,m=Math.imul(We,Je),g=g+Math.imul(He,$e)|0,l=l+Math.imul(He,Qe)|0,l=l+Math.imul(Ge,$e)|0,m=m+Math.imul(Ge,Qe)|0,g=g+Math.imul(je,Ye)|0,l=l+Math.imul(je,Xe)|0,l=l+Math.imul(qe,Ye)|0,m=m+Math.imul(qe,Xe)|0,g=g+Math.imul(Ue,Ze)|0,l=l+Math.imul(Ue,et)|0,l=l+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,l=l+Math.imul(Fe,nt)|0,l=l+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,it)|0,l=l+Math.imul(Oe,rt)|0,l=l+Math.imul(Be,it)|0,m=m+Math.imul(Be,rt)|0,g=g+Math.imul(Z,at)|0,l=l+Math.imul(Z,st)|0,l=l+Math.imul(de,at)|0,m=m+Math.imul(de,st)|0,g=g+Math.imul(Y,ot)|0,l=l+Math.imul(Y,ut)|0,l=l+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,lt)|0,l=l+Math.imul(V,dt)|0,l=l+Math.imul(K,lt)|0,m=m+Math.imul(K,dt)|0,g=g+Math.imul(f,pt)|0,l=l+Math.imul(f,yt)|0,l=l+Math.imul(P,pt)|0,m=m+Math.imul(P,yt)|0;var al=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(al>>>26)|0,al&=67108863,g=Math.imul(ze,$e),l=Math.imul(ze,Qe),l=l+Math.imul(We,$e)|0,m=Math.imul(We,Qe),g=g+Math.imul(He,Ye)|0,l=l+Math.imul(He,Xe)|0,l=l+Math.imul(Ge,Ye)|0,m=m+Math.imul(Ge,Xe)|0,g=g+Math.imul(je,Ze)|0,l=l+Math.imul(je,et)|0,l=l+Math.imul(qe,Ze)|0,m=m+Math.imul(qe,et)|0,g=g+Math.imul(Ue,tt)|0,l=l+Math.imul(Ue,nt)|0,l=l+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,it)|0,l=l+Math.imul(Fe,rt)|0,l=l+Math.imul(Le,it)|0,m=m+Math.imul(Le,rt)|0,g=g+Math.imul(Oe,at)|0,l=l+Math.imul(Oe,st)|0,l=l+Math.imul(Be,at)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Z,ot)|0,l=l+Math.imul(Z,ut)|0,l=l+Math.imul(de,ot)|0,m=m+Math.imul(de,ut)|0,g=g+Math.imul(Y,lt)|0,l=l+Math.imul(Y,dt)|0,l=l+Math.imul(Q,lt)|0,m=m+Math.imul(Q,dt)|0,g=g+Math.imul(V,pt)|0,l=l+Math.imul(V,yt)|0,l=l+Math.imul(K,pt)|0,m=m+Math.imul(K,yt)|0;var sl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(sl>>>26)|0,sl&=67108863,g=Math.imul(ze,Ye),l=Math.imul(ze,Xe),l=l+Math.imul(We,Ye)|0,m=Math.imul(We,Xe),g=g+Math.imul(He,Ze)|0,l=l+Math.imul(He,et)|0,l=l+Math.imul(Ge,Ze)|0,m=m+Math.imul(Ge,et)|0,g=g+Math.imul(je,tt)|0,l=l+Math.imul(je,nt)|0,l=l+Math.imul(qe,tt)|0,m=m+Math.imul(qe,nt)|0,g=g+Math.imul(Ue,it)|0,l=l+Math.imul(Ue,rt)|0,l=l+Math.imul(Ve,it)|0,m=m+Math.imul(Ve,rt)|0,g=g+Math.imul(Fe,at)|0,l=l+Math.imul(Fe,st)|0,l=l+Math.imul(Le,at)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,l=l+Math.imul(Oe,ut)|0,l=l+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Z,lt)|0,l=l+Math.imul(Z,dt)|0,l=l+Math.imul(de,lt)|0,m=m+Math.imul(de,dt)|0,g=g+Math.imul(Y,pt)|0,l=l+Math.imul(Y,yt)|0,l=l+Math.imul(Q,pt)|0,m=m+Math.imul(Q,yt)|0;var ol=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ol>>>26)|0,ol&=67108863,g=Math.imul(ze,Ze),l=Math.imul(ze,et),l=l+Math.imul(We,Ze)|0,m=Math.imul(We,et),g=g+Math.imul(He,tt)|0,l=l+Math.imul(He,nt)|0,l=l+Math.imul(Ge,tt)|0,m=m+Math.imul(Ge,nt)|0,g=g+Math.imul(je,it)|0,l=l+Math.imul(je,rt)|0,l=l+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ue,at)|0,l=l+Math.imul(Ue,st)|0,l=l+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,l=l+Math.imul(Fe,ut)|0,l=l+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,lt)|0,l=l+Math.imul(Oe,dt)|0,l=l+Math.imul(Be,lt)|0,m=m+Math.imul(Be,dt)|0,g=g+Math.imul(Z,pt)|0,l=l+Math.imul(Z,yt)|0,l=l+Math.imul(de,pt)|0,m=m+Math.imul(de,yt)|0;var ul=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ul>>>26)|0,ul&=67108863,g=Math.imul(ze,tt),l=Math.imul(ze,nt),l=l+Math.imul(We,tt)|0,m=Math.imul(We,nt),g=g+Math.imul(He,it)|0,l=l+Math.imul(He,rt)|0,l=l+Math.imul(Ge,it)|0,m=m+Math.imul(Ge,rt)|0,g=g+Math.imul(je,at)|0,l=l+Math.imul(je,st)|0,l=l+Math.imul(qe,at)|0,m=m+Math.imul(qe,st)|0,g=g+Math.imul(Ue,ot)|0,l=l+Math.imul(Ue,ut)|0,l=l+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,lt)|0,l=l+Math.imul(Fe,dt)|0,l=l+Math.imul(Le,lt)|0,m=m+Math.imul(Le,dt)|0,g=g+Math.imul(Oe,pt)|0,l=l+Math.imul(Oe,yt)|0,l=l+Math.imul(Be,pt)|0,m=m+Math.imul(Be,yt)|0;var ll=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ll>>>26)|0,ll&=67108863,g=Math.imul(ze,it),l=Math.imul(ze,rt),l=l+Math.imul(We,it)|0,m=Math.imul(We,rt),g=g+Math.imul(He,at)|0,l=l+Math.imul(He,st)|0,l=l+Math.imul(Ge,at)|0,m=m+Math.imul(Ge,st)|0,g=g+Math.imul(je,ot)|0,l=l+Math.imul(je,ut)|0,l=l+Math.imul(qe,ot)|0,m=m+Math.imul(qe,ut)|0,g=g+Math.imul(Ue,lt)|0,l=l+Math.imul(Ue,dt)|0,l=l+Math.imul(Ve,lt)|0,m=m+Math.imul(Ve,dt)|0,g=g+Math.imul(Fe,pt)|0,l=l+Math.imul(Fe,yt)|0,l=l+Math.imul(Le,pt)|0,m=m+Math.imul(Le,yt)|0;var dl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(dl>>>26)|0,dl&=67108863,g=Math.imul(ze,at),l=Math.imul(ze,st),l=l+Math.imul(We,at)|0,m=Math.imul(We,st),g=g+Math.imul(He,ot)|0,l=l+Math.imul(He,ut)|0,l=l+Math.imul(Ge,ot)|0,m=m+Math.imul(Ge,ut)|0,g=g+Math.imul(je,lt)|0,l=l+Math.imul(je,dt)|0,l=l+Math.imul(qe,lt)|0,m=m+Math.imul(qe,dt)|0,g=g+Math.imul(Ue,pt)|0,l=l+Math.imul(Ue,yt)|0,l=l+Math.imul(Ve,pt)|0,m=m+Math.imul(Ve,yt)|0;var pl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(pl>>>26)|0,pl&=67108863,g=Math.imul(ze,ot),l=Math.imul(ze,ut),l=l+Math.imul(We,ot)|0,m=Math.imul(We,ut),g=g+Math.imul(He,lt)|0,l=l+Math.imul(He,dt)|0,l=l+Math.imul(Ge,lt)|0,m=m+Math.imul(Ge,dt)|0,g=g+Math.imul(je,pt)|0,l=l+Math.imul(je,yt)|0,l=l+Math.imul(qe,pt)|0,m=m+Math.imul(qe,yt)|0;var yl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(yl>>>26)|0,yl&=67108863,g=Math.imul(ze,lt),l=Math.imul(ze,dt),l=l+Math.imul(We,lt)|0,m=Math.imul(We,dt),g=g+Math.imul(He,pt)|0,l=l+Math.imul(He,yt)|0,l=l+Math.imul(Ge,pt)|0,m=m+Math.imul(Ge,yt)|0;var cl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(cl>>>26)|0,cl&=67108863,g=Math.imul(ze,pt),l=Math.imul(ze,yt),l=l+Math.imul(We,pt)|0,m=Math.imul(We,yt);var fl=(k+g|0)+((l&8191)<<13)|0;return k=(m+(l>>>13)|0)+(fl>>>26)|0,fl&=67108863,h[0]=Ci,h[1]=Ii,h[2]=Si,h[3]=Ri,h[4]=Pi,h[5]=tl,h[6]=nl,h[7]=il,h[8]=rl,h[9]=al,h[10]=sl,h[11]=ol,h[12]=ul,h[13]=ll,h[14]=dl,h[15]=pl,h[16]=yl,h[17]=cl,h[18]=fl,k!==0&&(h[19]=k,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,x=h,h=w}return x!==0?y.words[A]=x:y.length--,y._strip()}function q(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=q(this,u,y),x};function M(C,u){this.x=C,this.y=u}M.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},M.prototype.permute=function(u,y,x,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,x[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,x+=A/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(x!==0){for(A=this.length-1;A>=0;A--)this.words[A+x]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+x]=h&67108863}for(;A>26,this.words[A+x]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);x=26-k,x!==0&&(A=A.ushln(x),w.iushln(x),h=A.words[A.length-1]|0);var g=w.length-A.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[A.length+f]|0)*67108864+(w.words[A.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),x&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),x&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=x.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(x*w+(this.words[A]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+x*67108864;this.words[w]=A/u|0,x=A%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),A=new r(0),h=new r(0),k=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(l),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(l),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),A.isub(k)):(x.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),A=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(A)):(x.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var A=y.cmp(x);if(A<0){var h=y;y=x,x=h}else if(A===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,A=u.words[x]|0;if(w!==A){wA&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new H(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function H(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}H.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},H.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},H.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},H.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},H.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},H.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},H.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},H.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},H.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},H.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},H.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},H.prototype.isqr=function(u){return this.imul(u,u.clone())},H.prototype.sqr=function(u){return this.mul(u,u)},H.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(k)!==0;)l.redIAdd(k);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=A;f.cmp(h)!==0;){for(var D=f,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&k===0){g=0;continue}k<<=1,k|=f,g++,!(g!==x&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}l=26}return h},H.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},H.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(se,H),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=x.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=x.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof ml>"u"||ml,t0)});var E0=ie((tT,ao)=>{(function(){"use strict";var n="input is invalid type",e="finalize already called",t=typeof window=="object",i=t?window:{};i.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=global:r&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&typeof ao=="object"&&ao.exports,o=typeof define=="function"&&define.amd,d=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],q={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var M=function(f,P,D){return function(V){return new l(f,P,f).update(V)[D]()}},J=function(f,P,D){return function(V,K){return new l(f,P,K).update(V)[D]()}},$=function(f,P,D){return function(V,K,ee,Y){return u["cshake"+f].update(V,K,ee,Y)[D]()}},le=function(f,P,D){return function(V,K,ee,Y){return u["kmac"+f].update(V,K,ee,Y)[D]()}},T=function(f,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(n);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=f.length,Y=this.blockCount,Q=0,ft=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(V[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=V[Y],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(n);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=f.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&1023)<<10|f.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(f),V},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return V&&(Q=P[K],Y+=p[Q>>4&15]+p[Q&15],V>1&&(Y+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(Y+=p[Q>>20&15]+p[Q>>16&15])),Y},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,Y=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(Y);for(var ft=new Uint32Array(Q);ee>8&255,Y[Q+2]=ft>>16&255,Y[Q+3]=ft>>24&255;ee%f===0&&G(P)}return V&&(Q=ee<<2,ft=P[K],Y[Q]=ft&255,V>1&&(Y[Q+1]=ft>>8&255),V>2&&(Y[Q+2]=ft>>16&255)),Y};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,V,K,ee,Y,Q,ft,Z,de,Ji,Oe,Be,$i,Fe,Le,Qi,Ue,Ve,Yi,je,qe,Xi,He,Ge,Zi,ze,We,er,Ke,Je,tr,$e,Qe,nr,Ye,Xe,ir,Ze,et,rr,tt,nt,ar,it,rt,sr,at,st,or,ot,ut,ur,lt,dt,lr,pt,yt,Ci,Ii,Si,Ri,Pi;for(V=0;V<48;V+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],Y=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],ft=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Ji=f[7]^f[17]^f[27]^f[37]^f[47],Oe=f[8]^f[18]^f[28]^f[38]^f[48],Be=f[9]^f[19]^f[29]^f[39]^f[49],P=Oe^(Y<<1|Q>>>31),D=Be^(Q<<1|Y>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(ft<<1|Z>>>31),D=ee^(Z<<1|ft>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=Y^(de<<1|Ji>>>31),D=Q^(Ji<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=ft^(Oe<<1|Be>>>31),D=Z^(Be<<1|Oe>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Ji^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,$i=f[0],Fe=f[1],rt=f[11]<<4|f[10]>>>28,sr=f[10]<<4|f[11]>>>28,We=f[20]<<3|f[21]>>>29,er=f[21]<<3|f[20]>>>29,Ii=f[31]<<9|f[30]>>>23,Si=f[30]<<9|f[31]>>>23,tt=f[40]<<18|f[41]>>>14,nt=f[41]<<18|f[40]>>>14,Qe=f[2]<<1|f[3]>>>31,nr=f[3]<<1|f[2]>>>31,Le=f[13]<<12|f[12]>>>20,Qi=f[12]<<12|f[13]>>>20,at=f[22]<<10|f[23]>>>22,st=f[23]<<10|f[22]>>>22,Ke=f[33]<<13|f[32]>>>19,Je=f[32]<<13|f[33]>>>19,Ri=f[42]<<2|f[43]>>>30,Pi=f[43]<<2|f[42]>>>30,lt=f[5]<<30|f[4]>>>2,dt=f[4]<<30|f[5]>>>2,Ye=f[14]<<6|f[15]>>>26,Xe=f[15]<<6|f[14]>>>26,Ue=f[25]<<11|f[24]>>>21,Ve=f[24]<<11|f[25]>>>21,or=f[34]<<15|f[35]>>>17,ot=f[35]<<15|f[34]>>>17,tr=f[45]<<29|f[44]>>>3,$e=f[44]<<29|f[45]>>>3,He=f[6]<<28|f[7]>>>4,Ge=f[7]<<28|f[6]>>>4,lr=f[17]<<23|f[16]>>>9,pt=f[16]<<23|f[17]>>>9,ir=f[26]<<25|f[27]>>>7,Ze=f[27]<<25|f[26]>>>7,Yi=f[36]<<21|f[37]>>>11,je=f[37]<<21|f[36]>>>11,ut=f[47]<<24|f[46]>>>8,ur=f[46]<<24|f[47]>>>8,ar=f[8]<<27|f[9]>>>5,it=f[9]<<27|f[8]>>>5,Zi=f[18]<<20|f[19]>>>12,ze=f[19]<<20|f[18]>>>12,yt=f[29]<<7|f[28]>>>25,Ci=f[28]<<7|f[29]>>>25,et=f[38]<<8|f[39]>>>24,rr=f[39]<<8|f[38]>>>24,qe=f[48]<<14|f[49]>>>18,Xi=f[49]<<14|f[48]>>>18,f[0]=$i^~Le&Ue,f[1]=Fe^~Qi&Ve,f[10]=He^~Zi&We,f[11]=Ge^~ze&er,f[20]=Qe^~Ye&ir,f[21]=nr^~Xe&Ze,f[30]=ar^~rt&at,f[31]=it^~sr&st,f[40]=lt^~lr&yt,f[41]=dt^~pt&Ci,f[2]=Le^~Ue&Yi,f[3]=Qi^~Ve&je,f[12]=Zi^~We&Ke,f[13]=ze^~er&Je,f[22]=Ye^~ir&et,f[23]=Xe^~Ze&rr,f[32]=rt^~at&or,f[33]=sr^~st&ot,f[42]=lr^~yt&Ii,f[43]=pt^~Ci&Si,f[4]=Ue^~Yi&qe,f[5]=Ve^~je&Xi,f[14]=We^~Ke&tr,f[15]=er^~Je&$e,f[24]=ir^~et&tt,f[25]=Ze^~rr&nt,f[34]=at^~or&ut,f[35]=st^~ot&ur,f[44]=yt^~Ii&Ri,f[45]=Ci^~Si&Pi,f[6]=Yi^~qe&$i,f[7]=je^~Xi&Fe,f[16]=Ke^~tr&He,f[17]=Je^~$e&Ge,f[26]=et^~tt&Qe,f[27]=rr^~nt&nr,f[36]=or^~ut&ar,f[37]=ot^~ur&it,f[46]=Ii^~Ri<,f[47]=Si^~Pi&dt,f[8]=qe^~$i&Le,f[9]=Xi^~Fe&Qi,f[18]=tr^~He&Zi,f[19]=$e^~Ge&ze,f[28]=tt^~Qe&Ye,f[29]=nt^~nr&Xe,f[38]=ut^~ar&rt,f[39]=ur^~it&sr,f[48]=Ri^~lt&lr,f[49]=Pi^~dt&pt,f[0]^=S[V],f[1]^=S[V+1]};if(s)ao.exports=u;else{for(x=0;x{vy.exports=Ty;function Ty(n,e){if(!n)throw new Error(e||"Assertion failed")}Ty.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)}});var wy=ie((K3,Hl)=>{typeof Object.create=="function"?Hl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Hl.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Rn=ie(Ne=>{"use strict";var g2=la(),T2=wy();Ne.inherits=T2;function v2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function w2(n,e){if(Array.isArray(n))return n.slice();if(!n)return[];var t=[];if(typeof n=="string")if(e){if(e==="hex")for(n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n),r=0;r>6|192,t[i++]=a&63|128):v2(n,r)?(a=65536+((a&1023)<<10)+(n.charCodeAt(++r)&1023),t[i++]=a>>18|240,t[i++]=a>>12&63|128,t[i++]=a>>6&63|128,t[i++]=a&63|128):(t[i++]=a>>12|224,t[i++]=a>>6&63|128,t[i++]=a&63|128)}else for(r=0;r>>24|n>>>8&65280|n<<8&16711680|(n&255)<<24;return e>>>0}Ne.htonl=_y;function k2(n,e){for(var t="",i=0;i>>0}return a}Ne.join32=A2;function E2(n,e){for(var t=new Array(n.length*4),i=0,r=0;i>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Ne.split32=E2;function M2(n,e){return n>>>e|n<<32-e}Ne.rotr32=M2;function C2(n,e){return n<>>32-e}Ne.rotl32=C2;function I2(n,e){return n+e>>>0}Ne.sum32=I2;function S2(n,e,t){return n+e+t>>>0}Ne.sum32_3=S2;function R2(n,e,t,i){return n+e+t+i>>>0}Ne.sum32_4=R2;function P2(n,e,t,i,r){return n+e+t+i+r>>>0}Ne.sum32_5=P2;function N2(n,e,t,i){var r=n[e],a=n[e+1],s=i+a>>>0,o=(s>>0,n[e+1]=s}Ne.sum64=N2;function D2(n,e,t,i){var r=e+i>>>0,a=(r>>0}Ne.sum64_hi=D2;function O2(n,e,t,i){var r=e+i;return r>>>0}Ne.sum64_lo=O2;function B2(n,e,t,i,r,a,s,o){var d=0,p=e;p=p+i>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Ne.sum64_4_hi=B2;function F2(n,e,t,i,r,a,s,o){var d=e+i+a+o;return d>>>0}Ne.sum64_4_lo=F2;function L2(n,e,t,i,r,a,s,o,d,p){var c=0,b=e;b=b+i>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Ne.sum64_5_hi=L2;function U2(n,e,t,i,r,a,s,o,d,p){var c=e+i+a+o+p;return c>>>0}Ne.sum64_5_lo=U2;function V2(n,e,t){var i=e<<32-t|n>>>t;return i>>>0}Ne.rotr64_hi=V2;function j2(n,e,t){var i=n<<32-t|e>>>t;return i>>>0}Ne.rotr64_lo=j2;function q2(n,e,t){return n>>>t}Ne.shr64_hi=q2;function H2(n,e,t){var i=n<<32-t|e>>>t;return i>>>0}Ne.shr64_lo=H2});var da=ie(My=>{"use strict";var Ey=Rn(),G2=la();function Mo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}My.BlockHash=Mo;Mo.prototype.update=function(e,t){if(e=Ey.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=Ey.join32(e,0,e.length-i,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var z2=Rn(),Jn=z2.rotr32;function W2(n,e,t,i){if(n===0)return Cy(e,t,i);if(n===1||n===3)return Sy(e,t,i);if(n===2)return Iy(e,t,i)}hi.ft_1=W2;function Cy(n,e,t){return n&e^~n&t}hi.ch32=Cy;function Iy(n,e,t){return n&e^n&t^e&t}hi.maj32=Iy;function Sy(n,e,t){return n^e^t}hi.p32=Sy;function K2(n){return Jn(n,2)^Jn(n,13)^Jn(n,22)}hi.s0_256=K2;function J2(n){return Jn(n,6)^Jn(n,11)^Jn(n,25)}hi.s1_256=J2;function $2(n){return Jn(n,7)^Jn(n,18)^n>>>3}hi.g0_256=$2;function Q2(n){return Jn(n,17)^Jn(n,19)^n>>>10}hi.g1_256=Q2});var Ny=ie((Y3,Py)=>{"use strict";var pa=Rn(),Y2=da(),X2=Gl(),zl=pa.rotl32,as=pa.sum32,Z2=pa.sum32_5,eb=X2.ft_1,Ry=Y2.BlockHash,tb=[1518500249,1859775393,2400959708,3395469782];function $n(){if(!(this instanceof $n))return new $n;Ry.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}pa.inherits($n,Ry);Py.exports=$n;$n.blockSize=512;$n.outSize=160;$n.hmacStrength=80;$n.padLength=64;$n.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r{"use strict";var ya=Rn(),nb=da(),ca=Gl(),ib=la(),Pn=ya.sum32,rb=ya.sum32_4,ab=ya.sum32_5,sb=ca.ch32,ob=ca.maj32,ub=ca.s0_256,lb=ca.s1_256,db=ca.g0_256,pb=ca.g1_256,Dy=nb.BlockHash,yb=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Qn(){if(!(this instanceof Qn))return new Qn;Dy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=yb,this.W=new Array(64)}ya.inherits(Qn,Dy);Oy.exports=Qn;Qn.blockSize=512;Qn.outSize=256;Qn.hmacStrength=192;Qn.padLength=64;Qn.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r{"use strict";var Kl=Rn(),By=Wl();function bi(){if(!(this instanceof bi))return new bi;By.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Kl.inherits(bi,By);Fy.exports=bi;bi.blockSize=512;bi.outSize=224;bi.hmacStrength=192;bi.padLength=64;bi.prototype._digest=function(e){return e==="hex"?Kl.toHex32(this.h.slice(0,7),"big"):Kl.split32(this.h.slice(0,7),"big")}});var Ql=ie((e8,qy)=>{"use strict";var Zt=Rn(),cb=da(),fb=la(),Yn=Zt.rotr64_hi,Xn=Zt.rotr64_lo,Uy=Zt.shr64_hi,Vy=Zt.shr64_lo,Fi=Zt.sum64,Jl=Zt.sum64_hi,$l=Zt.sum64_lo,mb=Zt.sum64_4_hi,hb=Zt.sum64_4_lo,bb=Zt.sum64_5_hi,xb=Zt.sum64_5_lo,jy=cb.BlockHash,gb=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Nn(){if(!(this instanceof Nn))return new Nn;jy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=gb,this.W=new Array(160)}Zt.inherits(Nn,jy);qy.exports=Nn;Nn.blockSize=1024;Nn.outSize=512;Nn.hmacStrength=192;Nn.padLength=128;Nn.prototype._prepareBlock=function(e,t){for(var i=this.W,r=0;r<32;r++)i[r]=e[t+r];for(;r{"use strict";var Yl=Rn(),Hy=Ql();function xi(){if(!(this instanceof xi))return new xi;Hy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Yl.inherits(xi,Hy);Gy.exports=xi;xi.blockSize=1024;xi.outSize=384;xi.hmacStrength=192;xi.padLength=128;xi.prototype._digest=function(e){return e==="hex"?Yl.toHex32(this.h.slice(0,12),"big"):Yl.split32(this.h.slice(0,12),"big")}});var Wy=ie(fa=>{"use strict";fa.sha1=Ny();fa.sha224=Ly();fa.sha256=Wl();fa.sha384=zy();fa.sha512=Ql()});var Xy=ie(Yy=>{"use strict";var hr=Rn(),Pb=da(),Co=hr.rotl32,Ky=hr.sum32,ss=hr.sum32_3,Jy=hr.sum32_4,Qy=Pb.BlockHash;function Zn(){if(!(this instanceof Zn))return new Zn;Qy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}hr.inherits(Zn,Qy);Yy.ripemd160=Zn;Zn.blockSize=512;Zn.outSize=160;Zn.hmacStrength=192;Zn.padLength=64;Zn.prototype._update=function(e,t){for(var i=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=i,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Ky(Co(Jy(i,$y(_,r,a,s),e[Ob[_]+t],Nb(_)),Fb[_]),o);i=o,o=s,s=Co(a,10),a=r,r=v,v=Ky(Co(Jy(d,$y(79-_,p,c,b),e[Bb[_]+t],Db(_)),Lb[_]),I),d=I,I=b,b=Co(c,10),c=p,p=v}v=ss(this.h[1],a,b),this.h[1]=ss(this.h[2],s,I),this.h[2]=ss(this.h[3],o,d),this.h[3]=ss(this.h[4],i,p),this.h[4]=ss(this.h[0],r,c),this.h[0]=v};Zn.prototype._digest=function(e){return e==="hex"?hr.toHex32(this.h,"little"):hr.split32(this.h,"little")};function $y(n,e,t,i){return n<=15?e^t^i:n<=31?e&t|~e&i:n<=47?(e|~t)^i:n<=63?e&i|t&~i:e^(t|~i)}function Nb(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Db(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ob=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Bb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Fb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Lb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var ec=ie((r8,Zy)=>{"use strict";var Ub=Rn(),Vb=la();function ma(n,e,t){if(!(this instanceof ma))return new ma(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Ub.toArray(e,t))}Zy.exports=ma;ma.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Vb(e.length<=this.blockSize);for(var t=e.length;t{var Dt=tc;Dt.utils=Rn();Dt.common=da();Dt.sha=Wy();Dt.ripemd=Xy();Dt.hmac=ec();Dt.sha1=Dt.sha.sha1;Dt.sha256=Dt.sha.sha256;Dt.sha224=Dt.sha.sha224;Dt.sha384=Dt.sha.sha384;Dt.sha512=Dt.sha.sha512;Dt.ripemd160=Dt.ripemd.ripemd160});var bd=ie((hd,Ic)=>{"use strict";(function(n){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function i(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,k,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),k.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+k[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],q=[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],M=[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],J=[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],$=[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],le=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var k=1;k>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var k=l/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[k][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^q[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[k][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=i(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=r(h.length),g=r(16),l=0;l=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=i(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=i(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,l=0;l{"use strict";(function(n){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,q=1359893119,M=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,l=q,m=M,G=J,f=$,P,D,V,K,ee;for(D=0;D<16;D++)V=x+D*4,le[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,f=G,G=m,m=l,l=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,q=q+l|0,M=M+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,H=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(H>>>16&255),u.push(H>>>8&255),u.push(H>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function i(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),q,M=[];for(q=0;q<64;q++)O[q]=54;for(q=0;q<_.length;q++)O[q]^=_[q];for(q=0;q=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),M=M.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),M=M.concat(t(U.concat(t(O))).slice(0,S))),M}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,q){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let M=i(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),M.push(J[G]>>8&255),M.push(J[G]>>16&255),M.push(J[G]>>24&255);let m=i(_,M,U);return q&&q(null,1,m),m}q&&k(g)};if(!q)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,q){return new Promise(function(M,J){let $=0;q&&q(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)q&&$!==1&&q(1),M(new Uint8Array(R));else if(q&&T!==$)return $=T,q(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof wd<"u"?Rc.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(wd)});var nf=ie((K4,tf)=>{"use strict";var Xo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Md={};for(hs=0;hs>25;return(n&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Zc(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=ka(e)^i>>5}for(e=ka(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var i=Zc(n);if(typeof i=="string")throw new Error(i);for(var r=n+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=ka(i)^s,r+=Xo.charAt(s)}for(a=0;a<6;++a)i=ka(i);for(i^=1,a=0;a<6;++a){var o=i>>(5-a)*5&31;r+=Xo.charAt(o)}return r}function ef(n,e){if(e=e||90,n.length<8)return n+" too short";if(n.length>e)return"Exceeds length limit";var t=n.toLowerCase(),i=n.toUpperCase();if(n!==t&&n!==i)return"Mixed-case string "+n;n=t;var r=n.lastIndexOf("1");if(r===-1)return"No separator character for "+n;if(r===0)return"Missing prefix for "+n;var a=n.slice(0,r),s=n.slice(r+1);if(s.length<6)return"Data too short";var o=Zc(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+n:{prefix:a,words:d}}function k5(){var n=ef.apply(null,arguments);if(typeof n=="object")return n}function A5(n){var e=ef.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Zo(n,e,t,i){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(i)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(n,e){typeof tp=="object"&&typeof np<"u"?np.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(tp,function(){"use strict";var n=function(i,r){if(r=r||{},typeof i!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;i(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(q){q?S(L,null,U):I(U)}).catch(_)}catch(q){_(q)}else L=0}function t(i){this.name="ArgumentError",this.message=i}return n})});var ip=ie(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$dictionary=void 0;hu.$dictionary=function(){var n,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(n=e.__typia_custom_validator)!==null&&n!==void 0?n:e.__typia_custom_validator=new Map}()});var Us=ie((sE,vm)=>{vm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var ap=ie(Gi=>{var Me=Us(),rp=()=>[{type:Me.RANGE,from:48,to:57}],wm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(rp()),_m=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],c1=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];Gi.words=()=>({type:Me.SET,set:wm(),not:!1});Gi.notWords=()=>({type:Me.SET,set:wm(),not:!0});Gi.ints=()=>({type:Me.SET,set:rp(),not:!1});Gi.notInts=()=>({type:Me.SET,set:rp(),not:!0});Gi.whitespace=()=>({type:Me.SET,set:_m(),not:!1});Gi.notWhitespace=()=>({type:Me.SET,set:_m(),not:!0});Gi.anyChar=()=>({type:Me.SET,set:c1(),not:!0})});var Am=ie(Vs=>{var km=Us(),La=ap(),f1="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",m1={0:0,t:9,n:10,v:11,f:12,r:13};Vs.strToChars=function(n){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return n=n.replace(e,function(t,i,r,a,s,o,d,p){if(r)return t;var c=i?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?f1.indexOf(d):m1[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),n};Vs.tokenizeClass=(n,e)=>{for(var t=[],i=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=i.exec(n))!=null;)if(r[1])t.push(La.words());else if(r[2])t.push(La.ints());else if(r[3])t.push(La.whitespace());else if(r[4])t.push(La.notWords());else if(r[5])t.push(La.notInts());else if(r[6])t.push(La.notWhitespace());else if(r[7])t.push({type:km.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:km.CHAR,value:a.charCodeAt(0)});else return[t,i.lastIndex];Vs.error(e,"Unterminated character class")};Vs.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var Em=ie(js=>{var bu=Us();js.wordBoundary=()=>({type:bu.POSITION,value:"b"});js.nonWordBoundary=()=>({type:bu.POSITION,value:"B"});js.begin=()=>({type:bu.POSITION,value:"^"});js.end=()=>({type:bu.POSITION,value:"$"})});var Mm=ie((dE,sp)=>{var Ua=Am(),_n=Us(),Cr=ap(),xu=Em();sp.exports=n=>{var e=0,t,i,r={type:_n.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Ua.error(n,`Nothing to repeat at column ${O-1}`)},p=Ua.strToChars(n);for(t=p.length;e{"use strict";var kn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new kn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var i=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var i=t.low;i<=t.high;)e.push(i),i++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Cm.exports=zi});var Rm=ie((yE,Sm)=>{var gu=Mm(),qs=Im(),Ir=gu.types;Sm.exports=class Hs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=gu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Hs.prototype.max!=null?Hs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var i,r,a,s,o;switch(e.type){case Ir.ROOT:case Ir.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),i=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=i.length;s{"use strict";var h1=Sr&&Sr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.RandomGenerator=void 0;var b1=h1(Rm()),x1;(function(n){var e="abcdefghijklmnopqrstuvwxyz";n.boolean=function(){return Math.random()<.5},n.integer=function(t,i){return t??(t=0),i??(i=100),Math.floor(Math.random()*(i-t+1))+t},n.bigint=function(t,i){return t??(t=BigInt(0)),i??(i=BigInt(100)),BigInt(n.integer(Number(t),Number(i)))},n.number=function(t,i){return t??(t=0),i??(i=100),Math.random()*(i-t)+t},n.string=function(t){return new Array(t??n.integer(5,10)).fill(0).map(function(){return e[n.integer(0,e.length-1)]}).join("")},n.array=function(t,i){return new Array(i??n.integer(0,3)).fill(0).map(function(r,a){return t(a)})},n.pick=function(t){return t[n.integer(0,t.length-1)]},n.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=Math.random()*16|0,r=t==="x"?i:i&3|8;return r.toString(16)})},n.email=function(){return"".concat(n.string(10),"@").concat(n.string(10),".").concat(n.string(3))},n.url=function(){return"https://".concat(n.string(10),".").concat(n.string(3))},n.ipv4=function(){return n.array(function(){return n.integer(0,255)},4).join(".")},n.ipv6=function(){return n.array(function(){return n.integer(0,65535).toString(16)},8).join(":")},n.pattern=function(t){return new b1.default(t).gen()},n.date=function(t,i){return t??(t=0),i??(i=Date.now()*2),new Date(n.number(t,i)).toISOString().substring(0,10)},n.datetime=function(t,i){return t??(t=0),i??(i=Date.now()*2),new Date(n.number(t,i)).toISOString()}})(x1=Sr.RandomGenerator||(Sr.RandomGenerator={}))});var Gs=ie(Va=>{"use strict";var g1=Va&&Va.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Va,"__esModule",{value:!0});Va.TypeGuardError=void 0;var T1=function(n){g1(e,n);function e(t){var i=this.constructor,r=n.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=i.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Va.TypeGuardError=T1});var Nm=ie(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$any=void 0;var v1=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};Tu.$any=v1});var Dm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$every=void 0;var w1=function(n,e){for(var t=null,i=0;i{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$guard=void 0;var _1=Gs(),k1=function(n){return function(e,t){if(e===!0)throw new _1.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};wu.$guard=k1});var Bm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_between=void 0;var A1=function(n,e,t){return e<=n&&n<=t};_u.$is_between=A1});var Fm=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_custom=void 0;var E1=ip(),M1=function(n,e,t,i){var r,a=(r=E1.$dictionary.get(n))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(i)};ku.$is_custom=M1});var Lm=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_date=void 0;var C1=function(n){return I1.test(n)};Au.$is_date=C1;var I1=/^(\d{4})-(\d{2})-(\d{2})$/});var Um=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_datetime=void 0;var S1=function(n){return!isNaN(new Date(n).getTime())};Eu.$is_datetime=S1});var Vm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_email=void 0;var R1=function(n){return P1.test(n)};Mu.$is_email=R1;var P1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var jm=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_ipv4=void 0;var N1=function(n){return D1.test(n)};Cu.$is_ipv4=N1;var D1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var qm=ie(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_ipv6=void 0;var O1=function(n){return B1.test(n)};Iu.$is_ipv6=O1;var B1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Hm=ie(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_url=void 0;var F1=function(n){return L1.test(n)};Su.$is_url=F1;var L1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Gm=ie(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$is_uuid=void 0;var U1=function(n){return V1.test(n)};Ru.$is_uuid=U1;var V1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var zm=ie(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$join=void 0;var j1=function(n){return q1(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Pu.$join=j1;var q1=function(n){return H1(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},H1=function(n){return G1.has(n)},G1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Wm=ie(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$number=void 0;var z1=Gs(),W1=function(n){if(isFinite(n)===!1)throw new z1.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Nu.$number=W1});var Km=ie(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$report=void 0;var K1=function(n){var e=function(t){if(n.length===0)return!0;var i=n[n.length-1].path;return t.length>i.length||i.substring(0,t.length)!==t};return function(t,i){return t&&e(i.path)&&n.push(i),!1}};Du.$report=K1});var Jm=ie(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$rest=void 0;var J1=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Ou.$rest=J1});var $m=ie(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$string=void 0;var $1=function(n){if(n.length>41)return JSON.stringify(n);for(var e=n.length,t="",i=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=n.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=n.slice(i,o)+"\\",i=o,r=!0)}return r?t+=n.slice(i):t=n,s<32||a===!0?JSON.stringify(n):'"'.concat(t,'"')};Bu.$string=$1});var Qm=ie(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.$tail=void 0;var Q1=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Fu.$tail=Q1});var eh=ie(Rr=>{"use strict";var Gt=Rr&&Rr.__assign||function(){return Gt=Object.assign||function(n){for(var e,t=1,i=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),i}}})},n.stringify=function(t){return Gt(Gt({},n.is()),{number:lx.$number,string:yx.$string,tail:cx.$tail,rest:px.$rest,throws:e(t)})},n.clone=function(t){return Gt(Gt({},n.is()),{throws:e(t),any:Y1.$any})},n.prune=function(t){return Gt(Gt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Ym.RandomGenerator,pick:Ym.RandomGenerator.pick}};var e=function(t){return function(i){throw new Xm.TypeGuardError(Gt(Gt({},i),{method:"typia.".concat(t)}))}}})(fx=Rr.Namespace||(Rr.Namespace={}))});var th=ie(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.MapUtil=void 0;var mx;(function(n){n.take=function(e){return function(t,i){var r=e.get(t);if(r)return r;var a=i();return e.set(t,a),a}}})(mx=zs.MapUtil||(zs.MapUtil={}))});var ih=ie(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var ah=ie(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0})});var oh=ie(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var lh=ie(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var ph=ie(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0})});var ch=ie(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0})});var gp=ie(z=>{"use strict";var hx=z&&z.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),Pr=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&hx(e,n,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var ja=ip(),Ce=eh(),bx=th();Pr(ih(),z);Pr(ah(),z);Pr(oh(),z);Pr(lh(),z);Pr(ph(),z);Pr(ch(),z);Pr(Gs(),z);function op(){ae("assert")}z.assert=op;Object.assign(op,Ce.Namespace.assert("assert"));function up(){ae("assertType")}z.assertType=up;Object.assign(up,Ce.Namespace.assert("assertType"));function Lu(){ae("is")}z.is=Lu;Object.assign(Lu,Ce.Namespace.assert("is"));function Uu(){ae("validate")}z.validate=Uu;Object.assign(Uu,Ce.Namespace.validate());function lp(){ae("assertEquals")}z.assertEquals=lp;Object.assign(lp,Ce.Namespace.assert("assertEquals"));function dp(){ae("equals")}z.equals=dp;Object.assign(dp,Ce.Namespace.is());function pp(){ae("validateEquals")}z.validateEquals=pp;Object.assign(pp,Ce.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=ja.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:ja.$dictionary.size},has:function(n){return function(e){var t,i;return(i=(t=ja.$dictionary.get(n))===null||t===void 0?void 0:t.has(e))!==null&&i!==void 0?i:!1}},get:function(n){return function(e){var t;return(t=ja.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var i=bx.MapUtil.take(ja.$dictionary)(n,function(){return new Map});return i.has(e)?!1:(i.set(e,t),!0)}}},erase:function(n){return function(e){var t,i;return(i=(t=ja.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&i!==void 0?i:!1}}};function xx(){ae("application")}z.application=xx;function yp(){ae("assertParse")}z.assertParse=yp;Object.assign(yp,Ce.Namespace.assert("assertParse"));function cp(){ae("isParse")}z.isParse=cp;Object.assign(cp,Lu);function fp(){ae("validateParse")}z.validateParse=fp;Object.assign(fp,Uu);function mp(){ae("stringify")}z.stringify=mp;Object.assign(mp,Ce.Namespace.stringify("stringify"));function Vu(){ae("assertStringify")}z.assertStringify=Vu;Object.assign(Vu,Ce.Namespace.assert("assertStringify"));Object.assign(Vu,Ce.Namespace.stringify("assertStringify"));function ju(){ae("isStringify")}z.isStringify=ju;Object.assign(ju,Ce.Namespace.is());Object.assign(ju,Ce.Namespace.stringify("isStringify"));function qu(){ae("validateStringify")}z.validateStringify=qu;Object.assign(qu,Ce.Namespace.validate());Object.assign(qu,Ce.Namespace.stringify("validateStringify"));function gx(){ae("metadata")}z.metadata=gx;function hp(){ae("random")}z.random=hp;Object.assign(hp,Ce.Namespace.random());function Tx(){ae("literals")}z.literals=Tx;function bp(){ae("clone")}z.clone=bp;Object.assign(bp,Ce.Namespace.clone("clone"));function Hu(){ae("assertClone")}z.assertClone=Hu;Object.assign(Hu,Ce.Namespace.assert("assertClone"));Object.assign(Hu,Ce.Namespace.clone("assertClone"));function Gu(){ae("isClone")}z.isClone=Gu;Object.assign(Gu,Ce.Namespace.is());Object.assign(Gu,Ce.Namespace.clone("isClone"));function zu(){ae("validateClone")}z.validateClone=zu;Object.assign(zu,Ce.Namespace.validate());Object.assign(zu,Ce.Namespace.clone("validateClone"));function xp(){ae("prune")}z.prune=xp;Object.assign(xp,Ce.Namespace.prune("prune"));function Wu(){ae("assertPrune")}z.assertPrune=Wu;Object.assign(Wu,Ce.Namespace.assert("assertPrune"));Object.assign(Wu,Ce.Namespace.prune("assertPrune"));function Ku(){ae("isPrune")}z.isPrune=Ku;Object.assign(Ku,Ce.Namespace.is());Object.assign(Ku,Ce.Namespace.prune("isPrune"));function Ju(){ae("validatePrune")}z.validatePrune=Ju;Object.assign(Ju,Ce.Namespace.prune("validatePrune"));Object.assign(Ju,Ce.Namespace.validate());function fh(){ae("createAssert")}z.createAssert=fh;Object.assign(fh,op);function mh(){ae("createAssertType")}z.createAssertType=mh;Object.assign(mh,up);function hh(){ae("createIs")}z.createIs=hh;Object.assign(hh,Lu);function bh(){ae("createValidate")}z.createValidate=bh;Object.assign(bh,Uu);function xh(){ae("createAssertEquals")}z.createAssertEquals=xh;Object.assign(xh,lp);function gh(){ae("createEquals")}z.createEquals=gh;Object.assign(gh,dp);function Th(){ae("createValidateEquals")}z.createValidateEquals=Th;Object.assign(Th,pp);function vh(){ae("createIsParse")}z.createIsParse=vh;Object.assign(vh,cp);function wh(){ae("createAssertParse")}z.createAssertParse=wh;Object.assign(wh,yp);function _h(){ae("createValidateParse")}z.createValidateParse=_h;Object.assign(_h,fp);function kh(){ae("createStringify")}z.createStringify=kh;Object.assign(kh,mp);function Ah(){ae("createAssertStringify")}z.createAssertStringify=Ah;Object.assign(Ah,Vu);function Eh(){ae("createIsStringify")}z.createIsStringify=Eh;Object.assign(Eh,ju);function Mh(){ae("createValidateStringify")}z.createValidateStringify=Mh;Object.assign(Mh,qu);function Ch(){ae("createRandom")}z.createRandom=Ch;Object.assign(Ch,hp);function Ih(){ae("createClone")}z.createClone=Ih;Object.assign(Ih,bp);function Sh(){ae("createAssertClone")}z.createAssertClone=Sh;Object.assign(Sh,Hu);function Rh(){ae("createIsClone")}z.createIsClone=Rh;Object.assign(Rh,Gu);function Ph(){ae("createValidateClone")}z.createValidateClone=Ph;Object.assign(Ph,zu);function Nh(){ae("createPrune")}z.createPrune=Nh;Object.assign(Nh,xp);function Dh(){ae("createAssertPrune")}z.createAssertPrune=Dh;Object.assign(Dh,Wu);function Oh(){ae("createIsPrune")}z.createIsPrune=Oh;Object.assign(Oh,Ku);function Bh(){ae("createValidatePrune")}z.createValidatePrune=Bh;Object.assign(Bh,Ju);function ae(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Lh=ie(An=>{"use strict";var Fh=An&&An.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),vx=An&&An.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),wx=An&&An.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&Fh(e,n,t);return vx(e,n),e},_x=An&&An.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Fh(e,n,t)};Object.defineProperty(An,"__esModule",{value:!0});var kx=wx(gp());An.default=kx;_x(gp(),An)});var qd={};Jr(qd,{BaseContract:()=>ba,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>Tr,FixedNumber:()=>mt,Signer:()=>Nt,VoidSigner:()=>mi,Wallet:()=>dn,Wordlist:()=>wn,constants:()=>xt,errors:()=>$t,getDefaultProvider:()=>du,logger:()=>Lf,providers:()=>si,utils:()=>te,version:()=>yu,wordlists:()=>wr});var c0=In(hl());var n0="logger/5.7.0";var i0=!1,r0=!1,eo={debug:1,default:2,info:2,warning:3,error:4,off:5},a0=eo.default,bl=null;function m6(){try{let n=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{n.push(e)}}),n.length)throw new Error("missing "+n.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(n){return n.message}return null}var s0=m6(),xl;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(xl||(xl={}));var $t;(function(n){n.UNKNOWN_ERROR="UNKNOWN_ERROR",n.NOT_IMPLEMENTED="NOT_IMPLEMENTED",n.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",n.NETWORK_ERROR="NETWORK_ERROR",n.SERVER_ERROR="SERVER_ERROR",n.TIMEOUT="TIMEOUT",n.BUFFER_OVERRUN="BUFFER_OVERRUN",n.NUMERIC_FAULT="NUMERIC_FAULT",n.MISSING_NEW="MISSING_NEW",n.INVALID_ARGUMENT="INVALID_ARGUMENT",n.MISSING_ARGUMENT="MISSING_ARGUMENT",n.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",n.CALL_EXCEPTION="CALL_EXCEPTION",n.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",n.NONCE_EXPIRED="NONCE_EXPIRED",n.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",n.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",n.TRANSACTION_REPLACED="TRANSACTION_REPLACED",n.ACTION_REJECTED="ACTION_REJECTED"})($t||($t={}));var o0="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let i=e.toLowerCase();eo[i]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(a0>eo[i])&&console.log.apply(console,t)}debug(...e){this._log(E.levels.DEBUG,e)}info(...e){this._log(E.levels.INFO,e)}warn(...e){this._log(E.levels.WARNING,e)}makeError(e,t,i){if(r0)return this.makeError("censored error",t,{});t||(t=E.errors.UNKNOWN_ERROR),i||(i={});let r=[];Object.keys(i).forEach(d=>{let p=i[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=o0[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(i[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case $t.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case $t.CALL_EXCEPTION:case $t.INSUFFICIENT_FUNDS:case $t.MISSING_NEW:case $t.NONCE_EXPIRED:case $t.REPLACEMENT_UNDERPRICED:case $t.TRANSACTION_REPLACED:case $t.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(i).forEach(function(d){o[d]=i[d]}),o}throwError(e,t,i){throw this.makeError(e,t,i)}throwArgumentError(e,t,i){return this.throwError(e,E.errors.INVALID_ARGUMENT,{argument:t,value:i})}assert(e,t,i,r){e||this.throwError(t,i,r)}assertArgument(e,t,i,r){e||this.throwArgumentError(t,i,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),s0&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:s0})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,i){i?i=": "+i:i="",et&&this.throwError("too many arguments"+i,E.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",E.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return bl||(bl=new E(n0)),bl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i0){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}r0=!!e,i0=!!t}static setLogLevel(e){let t=eo[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}a0=t}static from(e){return new E(e)}};E.errors=$t;E.levels=xl;var u0="bytes/5.7.0";var _t=new E(u0);function d0(n){return!!n.toHexString}function $r(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return $r(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function di(n){return re(n)&&!(n.length%2)||cn(n)}function l0(n){return typeof n=="number"&&n==n&&n%1===0}function cn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!l0(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(n,e){if(e||(e={}),typeof n=="number"){_t.checkSafeUint53(n,"invalid arrayify value");let t=[];for(;n;)t.unshift(n&255),n=parseInt(String(n/256));return t.length===0&&t.push(0),$r(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),d0(n)&&(n=n.toHexString()),re(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":_t.throwArgumentError("hex data is odd-length","value",n));let i=[];for(let r=0;rj(r)),t=e.reduce((r,a)=>r+a.length,0),i=new Uint8Array(t);return e.reduce((r,a)=>(i.set(a,r),r+a.length),0),$r(i)}function nn(n){let e=j(n);if(e.length===0)return e;let t=0;for(;te&&_t.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(n,e-n.length),$r(t)}function re(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var gl="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){_t.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=gl[n&15]+t,n=Math.floor(n/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof n=="bigint")return n=n.toString(16),n.length%2?"0x0"+n:"0x"+n;if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),d0(n))return n.toHexString();if(re(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":_t.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(cn(n)){let t="0x";for(let i=0;i>4]+gl[r&15]}return t}return _t.throwArgumentError("invalid hexlify value","value",n)}function Ft(n){if(typeof n!="string")n=W(n);else if(!re(n)||n.length%2)return null;return(n.length-2)/2}function Ie(n,e,t){return typeof n!="string"?n=W(n):(!re(n)||n.length%2)&&_t.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function At(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Gn(n){let e=Tl(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function Tl(n){typeof n!="string"&&(n=W(n)),re(n)||_t.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&_t.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function zn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(di(n)){let t=j(n);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):_t.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:_t.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=n.r,e.s=n.s,e.v=n.v,e.recoveryParam=n.recoveryParam,e._vs=n._vs,e._vs!=null){let r=dr(j(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&_t.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&_t.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?_t.throwArgumentError("signature missing v and recoveryParam","signature",n):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&_t.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!re(e.r)?_t.throwArgumentError("signature missing or invalid r","signature",n):e.r=he(e.r,32),e.s==null||!re(e.s)?_t.throwArgumentError("signature missing or invalid s","signature",n):e.s=he(e.s,32);let t=j(e.s);t[0]>=128&&_t.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let i=W(t);e._vs&&(re(e._vs)||_t.throwArgumentError("signature invalid _vs","signature",n),e._vs=he(e._vs,32)),e._vs==null?e._vs=i:e._vs!==i&&_t.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Wa(n){return n=zn(n),W(ce([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var to="bignumber/5.7.0";var Ka=c0.default.BN,pi=new E(to),vl={},p0=9007199254740991;function f0(n){return n!=null&&(F.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||re(n)||typeof n=="bigint"||cn(n))}var y0=!1,F=class{constructor(e,t){e!==vl&&pi.throwError("cannot call constructor directly; use BigNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qt(xe(this).fromTwos(e))}toTwos(e){return Qt(xe(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Qt(xe(this).add(xe(e)))}sub(e){return Qt(xe(this).sub(xe(e)))}div(e){return F.from(e).isZero()&&fn("division-by-zero","div"),Qt(xe(this).div(xe(e)))}mul(e){return Qt(xe(this).mul(xe(e)))}mod(e){let t=xe(e);return t.isNeg()&&fn("division-by-zero","mod"),Qt(xe(this).umod(t))}pow(e){let t=xe(e);return t.isNeg()&&fn("negative-power","pow"),Qt(xe(this).pow(t))}and(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","and"),Qt(xe(this).and(t))}or(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","or"),Qt(xe(this).or(t))}xor(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","xor"),Qt(xe(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&fn("negative-width","mask"),Qt(xe(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&fn("negative-width","shl"),Qt(xe(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&fn("negative-width","shr"),Qt(xe(this).shrn(e))}eq(e){return xe(this).eq(xe(e))}lt(e){return xe(this).lt(xe(e))}lte(e){return xe(this).lte(xe(e))}gt(e){return xe(this).gt(xe(e))}gte(e){return xe(this).gte(xe(e))}isNegative(){return this._hex[0]==="-"}isZero(){return xe(this).isZero()}toNumber(){try{return xe(this).toNumber()}catch{fn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return pi.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?y0||(y0=!0,pi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?pi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",E.errors.UNEXPECTED_ARGUMENT,{}):pi.throwError("BigNumber.toString does not accept parameters",E.errors.UNEXPECTED_ARGUMENT,{})),xe(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(vl,Ja(e)):e.match(/^-?[0-9]+$/)?new F(vl,Ja(new Ka(e))):pi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&fn("underflow","BigNumber.from",e),(e>=p0||e<=-p0)&&fn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(cn(t))return F.from(W(t));if(t)if(t.toHexString){let i=t.toHexString();if(typeof i=="string")return F.from(i)}else{let i=t._hex;if(i==null&&t.type==="BigNumber"&&(i=t.hex),typeof i=="string"&&(re(i)||i[0]==="-"&&re(i.substring(1))))return F.from(i)}return pi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ja(n){if(typeof n!="string")return Ja(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&pi.throwArgumentError("invalid hex","value",n),n=Ja(n),n==="0x00"?n:"-"+n;if(n.substring(0,2)!=="0x"&&(n="0x"+n),n==="0x")return"0x00";for(n.length%2&&(n="0x0"+n.substring(2));n.length>4&&n.substring(0,4)==="0x00";)n="0x"+n.substring(4);return n}function Qt(n){return F.from(Ja(n))}function xe(n){let e=F.from(n).toHexString();return e[0]==="-"?new Ka("-"+e.substring(3),16):new Ka(e.substring(2),16)}function fn(n,e,t){let i={fault:n,operation:e};return t!=null&&(i.value=t),pi.throwError(n,E.errors.NUMERIC_FAULT,i)}function wl(n){return new Ka(n,36).toString(16)}function _l(n){return new Ka(n,16).toString(36)}var zt=new E(to),$a={},h0=F.from(0),b0=F.from(-1);function x0(n,e,t,i){let r={fault:e,operation:t};return i!==void 0&&(r.value=i),zt.throwError(n,E.errors.NUMERIC_FAULT,r)}var Qa="0";for(;Qa.length<256;)Qa+=Qa;function kl(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Qa.substring(0,n):zt.throwArgumentError("invalid decimal size","decimals",n)}function Qr(n,e){e==null&&(e=0);let t=kl(e);n=F.from(n);let i=n.lt(h0);i&&(n=n.mul(b0));let r=n.mod(t).toString();for(;r.length2&&zt.throwArgumentError("too many decimal points","value",n);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&x0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&zt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),i=a("width","number",i),r=a("decimals","number",r)}return i%8&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",i),r>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new yi($a,t,i,r)}},mt=class{constructor(e,t,i,r){e!==$a&&zt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=i,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&zt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),i=mn(e._value,e.format.decimals);return mt.fromValue(t.add(i),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),i=mn(e._value,e.format.decimals);return mt.fromValue(t.sub(i),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),i=mn(e._value,e.format.decimals);return mt.fromValue(t.mul(i).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),i=mn(e._value,e.format.decimals);return mt.fromValue(t.mul(this.format._multiplier).div(i),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=mt.from(e[0],this.format),i=!e[1].match(/^(0*)$/);return this.isNegative()&&i&&(t=t.subUnsafe(m0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=mt.from(e[0],this.format),i=!e[1].match(/^(0*)$/);return!this.isNegative()&&i&&(t=t.addUnsafe(m0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&zt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let i=mt.from("1"+Qa.substring(0,e),this.format),r=h6.toFormat(this.format);return this.mulUnsafe(i).addUnsafe(r).floor().divUnsafe(i)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&zt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return he(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return mt.fromString(this._value,e)}static fromValue(e,t,i){return i==null&&t!=null&&!f0(t)&&(i=t,t=null),t==null&&(t=0),i==null&&(i="fixed"),mt.fromString(Qr(e,t),yi.from(i))}static fromString(e,t){t==null&&(t="fixed");let i=yi.from(t),r=mn(e,i.decimals);!i.signed&&r.lt(h0)&&x0("unsigned value cannot be negative","overflow","value",e);let a=null;i.signed?a=r.toTwos(i.width).toHexString():(a=r.toHexString(),a=he(a,i.width/8));let s=Qr(r,i.decimals);return new mt($a,a,s,i)}static fromBytes(e,t){t==null&&(t="fixed");let i=yi.from(t);if(j(e).length>i.width/8)throw new Error("overflow");let r=F.from(e);i.signed&&(r=r.fromTwos(i.width));let a=r.toTwos((i.signed?0:1)+i.width).toHexString(),s=Qr(r,i.decimals);return new mt($a,a,s,i)}static from(e,t){if(typeof e=="string")return mt.fromString(e,t);if(cn(e))return mt.fromBytes(e,t);try{return mt.fromValue(e,0,t)}catch(i){if(i.code!==E.errors.INVALID_ARGUMENT)throw i}return zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},m0=mt.from(1),h6=mt.from("0.5");var g0="properties/5.7.0";var b6=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},no=new E(g0);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function bt(n,e){for(let t=0;t<32;t++){if(n[e])return n[e];if(!n.prototype||typeof n.prototype!="object")break;n=Object.getPrototypeOf(n.prototype).constructor}return null}function Se(n){return b6(this,void 0,void 0,function*(){let e=Object.keys(n).map(i=>{let r=n[i];return Promise.resolve(r).then(a=>({key:i,value:a}))});return(yield Promise.all(e)).reduce((i,r)=>(i[r.key]=r.value,i),{})})}function Yr(n,e){(!n||typeof n!="object")&&no.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||no.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}function we(n){let e={};for(let t in n)e[t]=n[t];return e}var x6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function T0(n){if(n==null||x6[typeof n])return!0;if(Array.isArray(n)||typeof n=="object"){if(!Object.isFrozen(n))return!1;let e=Object.keys(n);for(let t=0;tht(e)));if(typeof n=="object"){let e={};for(let t in n){let i=n[t];i!==void 0&&B(e,t,ht(i))}return e}return no.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ht(n){return g6(n)}var rn=class{constructor(e){for(let t in e)this[t]=ht(e[t])}};var Wn="abi/5.7.0";var Te=new E(Wn),pr={},v0={calldata:!0,memory:!0,storage:!0},T6={calldata:!0,memory:!0};function io(n,e){if(n==="bytes"||n==="string"){if(v0[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&T6[e])return!0;return(v0[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function v6(n,e){let t=n;function i(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",n)}n=n.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(i)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(i=>i.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?ct.fromString(e,t):ct.fromObject(e)}static fromObject(e){return ct.isParamType(e)?e:new ct(pr,{name:e.name||null,type:Xr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ct.fromObject):null})}static fromString(e,t){function i(r){return ct.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return i(v6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Ya(n,e){return k6(n).map(t=>ct.fromString(t,e))}var Kt=class{constructor(e,t){e!==pr&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ro(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Kt.isFragment(e)?e:typeof e=="string"?Kt.fromString(e):Kt.fromObject(e)}static fromObject(e){if(Kt.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Wt.fromObject(e);case"constructor":return Lt.fromObject(e);case"error":return an.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Wt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ut.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Lt.fromString(e.trim()):e.split(" ")[0]==="error"?an.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Wt=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Wt.fromString(e):Wt.fromObject(e)}static fromObject(e){if(Wt.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Xa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ct.fromObject):[],type:"event"};return new Wt(pr,t)}static fromString(e){let t=e.match(Za);t||Te.throwArgumentError("invalid event string","value",e);let i=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":i=!0;break;case"":break;default:Te.warn("unknown modifier: "+r)}}),Wt.fromObject({name:t[1].trim(),anonymous:i,inputs:Ya(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function _0(n,e){e.gas=null;let t=n.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=F.from(t[1]),t[0]):n}function k0(n,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",n.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function A0(n){let e={constant:!1,payable:!0,stateMutability:"payable"};return n.stateMutability!=null?(e.stateMutability=n.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",n.constant!=null&&!!n.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable=e.stateMutability==="payable",n.payable!=null&&!!n.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",n)):n.payable!=null?(e.payable=!!n.payable,n.constant==null&&!e.payable&&n.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",n),e.constant=!!n.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",n)):n.constant!=null?(e.constant=!!n.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):n.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",n),e}var Lt=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",E.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(i=>i.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Lt.fromString(e):Lt.fromObject(e)}static fromObject(e){if(Lt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=A0(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let i={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ct.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Lt(pr,i)}static fromString(e){let t={type:"constructor"};e=_0(e,t);let i=e.match(Za);return(!i||i[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Ya(i[2].trim(),!1),k0(i[3].trim(),t),Lt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ut=class extends Lt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e))),outputs:this.outputs.map(i=>JSON.parse(i.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(i=>i.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=A0(e),i={type:e.type,name:Xa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(ct.fromObject):[],outputs:e.outputs?e.outputs.map(ct.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ut(pr,i)}static fromString(e){let t={type:"function"};e=_0(e,t);let i=e.split(" returns ");i.length>2&&Te.throwArgumentError("invalid function string","value",e);let r=i[0].match(Za);if(r||Te.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&Xa(t.name),t.inputs=Ya(r[2],!1),k0(r[3].trim(),t),i.length>1){let a=i[1].match(Za);(a[1].trim()!=""||a[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Ya(a[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function w0(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}var an=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?an.fromString(e):an.fromObject(e)}static fromObject(e){if(an.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Xa(e.name),inputs:e.inputs?e.inputs.map(ct.fromObject):[]};return w0(new an(pr,t))}static fromString(e){let t={type:"error"},i=e.match(Za);return i||Te.throwArgumentError("invalid error signature","value",e),t.name=i[1].trim(),t.name&&Xa(t.name),t.inputs=Ya(i[2],!1),w0(an.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Xr(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var _6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Xa(n){return(!n||!n.match(_6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Za=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function k6(n){n=n.trim();let e=[],t="",i=0;for(let r=0;rthis.wordSize&&Al.throwError("value out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ce([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},cr=class{constructor(e,t,i,r){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",i),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let i=e.match("^u?int([0-9]+)$");return i&&parseInt(i[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):cr.coerce(e,t)}_peekBytes(e,t,i){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&i&&this._offset+t<=this._data.length?r=t:Al.throwError("data out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new cr(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let i=this._peekBytes(0,e,!!t);return this._offset+=i.length,i.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var M0=In(E0());function fe(n){return"0x"+M0.default.keccak_256(j(n))}var so={};Jr(so,{decode:()=>es,encode:()=>ci});var C0="rlp/5.7.0";var Kn=new E(C0);function I0(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function S0(n,e,t){let i=0;for(let r=0;re+1+i&&Kn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+i,result:r}}function N0(n,e){if(n.length===0&&Kn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Kn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let i=S0(n,e+1,t);return e+1+t+i>n.length&&Kn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),R0(n,e,e+1+t,t+i)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),R0(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=S0(n,e+1,t);e+1+t+i>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let r=W(n.slice(e+1+t,e+1+t+i));return{consumed:1+t+i,result:r}}else if(n[e]>=128){let t=n[e]-128;e+1+t>n.length&&Kn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let i=W(n.slice(e+1,e+1+t));return{consumed:1+t,result:i}}return{consumed:1,result:W(n[e])}}function es(n){let e=j(n),t=N0(e,0);return t.consumed!==e.length&&Kn.throwArgumentError("invalid rlp data","data",n),t.result}var D0="address/5.7.0";var Ni=new E(D0);function O0(n){re(n,20)||Ni.throwArgumentError("invalid address","address",n),n=n.toLowerCase();let e=n.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let i=j(fe(t));for(let r=0;r<40;r+=2)i[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(i[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var A6=9007199254740991;function E6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var El={};for(let n=0;n<10;n++)El[String(n)]=String(n);for(let n=0;n<26;n++)El[String.fromCharCode(65+n)]=String(10+n);var B0=Math.floor(E6(A6));function F0(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(i=>El[i]).join("");for(;e.length>=B0;){let i=e.substring(0,B0);e=parseInt(i,10)%97+e.substring(i.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function me(n){let e=null;if(typeof n!="string"&&Ni.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=O0(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ni.throwArgumentError("bad address checksum","address",n);else if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(n.substring(2,4)!==F0(n)&&Ni.throwArgumentError("bad icap checksum","address",n),e=wl(n.substring(4));e.length<40;)e="0"+e;e=O0("0x"+e)}else Ni.throwArgumentError("invalid address","address",n);return e}function L0(n){try{return me(n),!0}catch{}return!1}function U0(n){let e=_l(me(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+F0("XE00"+e)+e}function fr(n){let e=null;try{e=me(n.from)}catch{Ni.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return me(Ie(fe(ci([e,t])),12))}function V0(n,e,t){return Ft(e)!==32&&Ni.throwArgumentError("salt must be 32 bytes","salt",e),Ft(t)!==32&&Ni.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),me(Ie(fe(ce(["0xff",me(n),e,t])),12))}var oo=class extends Et{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=me(t)}catch(i){this._throwError(i.message,t)}return e.writeValue(t)}decode(e){return me(he(e.readValue().toHexString(),20))}};var uo=class extends Et{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var ea=new E(Wn);function Ml(n,e,t){let i=null;if(Array.isArray(t))i=t;else if(t&&typeof t=="object"){let d={};i=e.map(p=>{let c=p.localName;return c||ea.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&ea.throwError("cannot encode object for signature with duplicate names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else ea.throwArgumentError("invalid tuple value","tuple",t);e.length!==i.length&&ea.throwArgumentError("types/value length mismatch","tuple",t);let r=new yr(n.wordSize),a=new yr(n.wordSize),s=[];e.forEach((d,p)=>{let c=i[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=n.appendWriter(r);return o+=n.appendWriter(a),o}function Cl(n,e){let t=[],i=n.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=n.readValue(),d=i.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===E.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(n)}catch(o){if(o.code===E.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var lo=class extends Et{constructor(e,t,i){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,i,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let i=0;ie._data.length&&ea.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let i=[];for(let r=0;rmo,EtherSymbol:()=>z0,HashZero:()=>na,MaxInt256:()=>G0,MaxUint256:()=>xo,MinInt256:()=>H0,NegativeOne:()=>ho,One:()=>bo,Two:()=>j0,WeiPerEther:()=>q0,Zero:()=>ta});var mo="0x0000000000000000000000000000000000000000";var ho=F.from(-1),ta=F.from(0),bo=F.from(1),j0=F.from(2),q0=F.from("1000000000000000000"),xo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),H0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),G0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var na="0x0000000000000000000000000000000000000000000000000000000000000000";var z0="\u039E";var go=class extends Et{constructor(e,t,i){let r=(t?"int":"uint")+e*8;super(r,r,i,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let i=F.from(t),r=xo.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(i.gt(a)||i.lt(a.add(bo).mul(ho)))&&this._throwError("value out-of-bounds",t)}else(i.lt(ta)||i.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return i=i.toTwos(this.size*8).mask(this.size*8),this.signed&&(i=i.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(i)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var W0="strings/5.7.0";var K0=new E(W0),Jt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Jt||(Jt={}));var Vt;(function(n){n.UNEXPECTED_CONTINUE="unexpected continuation byte",n.BAD_PREFIX="bad codepoint prefix",n.OVERRUN="string overrun",n.MISSING_CONTINUE="missing continuation byte",n.OUT_OF_RANGE="out of UTF-8 range",n.UTF16_SURROGATE="UTF-16 surrogate",n.OVERLONG="overlong representation"})(Vt||(Vt={}));function M6(n,e,t,i,r){return K0.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function J0(n,e,t,i,r){if(n===Vt.BAD_PREFIX||n===Vt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return n===Vt.OVERRUN?t.length-e-1:0}function C6(n,e,t,i,r){return n===Vt.OVERLONG?(i.push(r),0):(i.push(65533),J0(n,e,t,i,r))}var To=Object.freeze({error:M6,ignore:J0,replace:C6});function Sl(n,e){e==null&&(e=To.error),n=j(n);let t=[],i=0;for(;i>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?i+=e(Vt.UNEXPECTED_CONTINUE,i-1,n,t):i+=e(Vt.BAD_PREFIX,i-1,n,t);continue}if(i-1+a>=n.length){i+=e(Vt.OVERRUN,i-1,n,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){i+=e(Vt.OUT_OF_RANGE,i-1-a,n,t,o);continue}if(o>=55296&&o<=57343){i+=e(Vt.UTF16_SURROGATE,i-1-a,n,t,o);continue}if(o<=s){i+=e(Vt.OVERLONG,i-1-a,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Jt.current){e!=Jt.current&&(K0.checkNormalize(),n=n.normalize(e));let t=[];for(let i=0;i>6|192),t.push(r&63|128);else if((r&64512)==55296){i++;let a=n.charCodeAt(i);if(i>=n.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return j(t)}function Il(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Rl(n,e){return'"'+Sl(n,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Il(t):(t-=65536,Il((t>>10&1023)+55296)+Il((t&1023)+56320))}).join("")+'"'}function vo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Yt(n,e){return vo(Sl(n,e))}function Di(n,e=Jt.current){return Sl(ve(n,e))}function Pl(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ce([e,na]).slice(0,32))}function Nl(n){let e=j(n);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Yt(e.slice(0,t))}function I6(n){if(n.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),i[t]=e(a[1])}),i}function $0(n){let e=0;return n.split(",").map(t=>{let i=t.split("-");i.length===1?i[1]="0":i[1]===""&&(i[1]="1");let r=e+parseInt(i[0],16);return e=parseInt(i[1],16),{l:r,h:e}})}function Ol(n,e){let t=0;for(let i=0;i=t&&n<=t+r.h&&(n-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(n-t)!==-1)continue;return r}}return null}var S6=$0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),R6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),P6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],N6=Dl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),D6=Dl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),O6=Dl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",I6),B6=$0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function F6(n){return n.reduce((e,t)=>(t.forEach(i=>{e.push(i)}),e),[])}function L6(n){return!!Ol(n,S6)}function U6(n){let e=Ol(n,P6);if(e)return[n+e.s];let t=N6[n];if(t)return t;let i=D6[n];if(i)return[n+i[0]];let r=O6[n];return r||null}function V6(n){return!!Ol(n,B6)}function Bl(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Di(n);e=F6(e.map(i=>{if(R6.indexOf(i)>=0)return[];if(i>=65024&&i<=65039)return[];let r=U6(i);return r||[i]})),e=Di(vo(e),Jt.NFKC),e.forEach(i=>{if(V6(i))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(i=>{if(L6(i))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=vo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var wo=class extends ts{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Yt(super.decode(e))}};var mr=class extends Et{constructor(e,t){let i=!1,r=[];e.forEach(s=>{s.dynamic&&(i=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,i),this.coders=e}defaultValue(){let e=[];this.coders.forEach(i=>{e.push(i.defaultValue())});let t=this.coders.reduce((i,r)=>{let a=r.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});return this.coders.forEach((i,r)=>{let a=i.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return Ml(e,this.coders,t)}decode(e){return e.coerce(this.name,Cl(e,this.coders))}};var _o=new E(Wn),j6=new RegExp(/^bytes([0-9]*)$/),q6=new RegExp(/^(u?int)([0-9]*)$/),ia=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new oo(e.name);case"bool":return new po(e.name);case"string":return new wo(e.name);case"bytes":return new yo(e.name);case"array":return new lo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new mr((e.components||[]).map(i=>this._getCoder(i)),e.name);case"":return new fo(e.name)}let t=e.type.match(q6);if(t){let i=parseInt(t[2]||"256");return(i===0||i>256||i%8!==0)&&_o.throwArgumentError("invalid "+t[1]+" bit length","param",e),new go(i/8,t[1]==="int",e.name)}if(t=e.type.match(j6),t){let i=parseInt(t[1]);return(i===0||i>32)&&_o.throwArgumentError("invalid bytes length","param",e),new co(i,e.name)}return _o.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new cr(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new yr(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(ct.from(r)));return new mr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&_o.throwError("types/values length mismatch",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let i=e.map(s=>this._getCoder(ct.from(s))),r=new mr(i,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,i){let r=e.map(s=>this._getCoder(ct.from(s)));return new mr(r,"_").decode(this._getReader(j(t),i))}},ns=new ia;function sn(n){return fe(ve(n))}var ko="hash/5.7.0";var Fl={};Jr(Fl,{decode:()=>ra,encode:()=>aa});function ra(n){n=atob(n);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(n,e),t}function H6(n){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,q=1+R-T}let M=i-4;return O.map(J=>{switch(J-M){case 3:return M+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return M+256+(n[o++]<<8|n[o++]);case 1:return M+n[o++];default:return J-1}})}function z6(n){let e=0;return()=>n[e++]}function X0(n){return z6(G6(n))}function W6(n){return n&1?~n>>1:n>>1}function K6(n,e){let t=Array(n);for(let i=0;ie[s]):t}function Z0(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Q6(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Y6(t,n))}return H6(Y0(e))}function $6(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function ey(n,e,t){let i=Array(n).fill(void 0).map(()=>[]);for(let r=0;ri[s].push(a));return i}function Q6(n,e){let t=1+e(),i=e(),r=$6(e),a=ey(r.length,1+n,e);return Y0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*i;return[d+b*t,p.map(_=>_+I)]})}))}function Y6(n,e){let t=1+e();return ey(t,1+n,e).map(r=>[r[0],r.slice(1)])}function ty(n){let e=is(n).sort((i,r)=>i-r);return t();function t(){let i=[];for(;;){let p=is(n,e);if(p.length==0)break;i.push({set:new Set(p),node:t()})}i.sort((p,c)=>c.set.size-p.set.size);let r=n(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:i,valid:a,fe0f:s,save:o,check:d}}}function ny(){return X0(ra("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var Ao=ny(),X6=new Set(is(Ao)),Z6=new Set(is(Ao)),e2=Z0(Ao),t2=ty(Ao),iy=45,ry=95;function ay(n){return Di(n)}function n2(n){return n.filter(e=>e!=65039)}function sy(n){for(let e of n.split(".")){let t=ay(e);try{for(let i=t.lastIndexOf(ry)-1;i>=0;i--)if(t[i]!==ry)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(i=>i<128)&&t[2]===iy&&t[3]===iy)throw new Error("invalid label extension")}catch(i){throw new Error(`Invalid label "${e}": ${i.message}`)}}return n}function oy(n){return sy(i2(n,n2))}function i2(n,e){let t=ay(n).reverse(),i=[];for(;t.length;){let r=a2(t);if(r){i.push(...e(r));continue}let a=t.pop();if(X6.has(a)){i.push(a);continue}if(Z6.has(a))continue;let s=e2[a];if(s){i.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return sy(r2(String.fromCodePoint(...i)))}function r2(n){return n.normalize("NFC")}function a2(n,e){var t;let i=t2,r,a,s=[],o=n.length;for(e&&(e.length=0);o;){let d=n[--o];if(i=(t=i.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!i)break;if(i.save)a=d;else if(i.check&&d===a)break;s.push(d),i.fe0f&&(s.push(65039),o>0&&n[o-1]==65039&&o--),i.valid&&(r=s.slice(),i.valid==2&&r.splice(1,1),e&&e.push(...n.slice(o).reverse()),n.length=o)}return r}var s2=new E(ko),ly=new Uint8Array(32);ly.fill(0);function uy(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ll(n){let e=ve(oy(n)),t=[];if(n.length===0)return t;let i=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(uy(e.slice(i))),t}function Ul(n){try{return Ll(n).length!==0}catch{}return!1}function Oi(n){typeof n!="string"&&s2.throwArgumentError("invalid ENS name; not a string","name",n);let e=ly,t=Ll(n);for(;t.length;)e=fe(ce([e,fe(t.pop())]));return W(e)}function rs(n){return W(ce(Ll(n).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var dy=`Ethereum Signed Message: -`;function sa(n){return typeof n=="string"&&(n=ve(n)),fe(ce([ve(dy),ve(String(n.length)),n]))}var o2=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},gt=new E(ko),fy=new Uint8Array(32);fy.fill(0);var u2=F.from(-1),my=F.from(0),hy=F.from(1),l2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function d2(n){let e=j(n),t=e.length%32;return t?At([e,fy.slice(t)]):W(e)}var p2=he(hy.toHexString(),32),y2=he(my.toHexString(),32),py={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Vl=["name","version","chainId","verifyingContract","salt"];function yy(n){return function(e){return typeof e!="string"&>.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var c2={name:yy("name"),version:yy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return gt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return me(n).toLowerCase()}catch{}return gt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{let e=j(n);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return gt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function jl(n){{let e=n.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",i=parseInt(e[2]||"256");(i%8!==0||i>256||e[2]&&e[2]!==String(i))&>.throwArgumentError("invalid numeric width","type",n);let r=l2.mask(t?i-1:i),a=t?r.add(hy).mul(u2):my;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&>.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),he(o.toTwos(256).toHexString(),32)}}}{let e=n.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&>.throwArgumentError("invalid bytes width","type",n),function(i){return j(i).length!==t&>.throwArgumentError(`invalid length for ${n}`,"value",i),d2(i)}}}switch(n){case"address":return function(e){return he(me(e),32)};case"bool":return function(e){return e?p2:y2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function cy(n,e){return`${n}(${e.map(({name:t,type:i})=>i+" "+t).join(",")})`}var Tt=class{constructor(e){B(this,"types",Object.freeze(ht(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},i={},r={};Object.keys(e).forEach(o=>{t[o]={},i[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&>.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&>.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!jl(c)&&(i[c]||gt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),i[c].push(o),t[o][c]=!0)})}let a=Object.keys(i).filter(o=>i[o].length===0);a.length===0?gt.throwArgumentError("missing primary type","types",e):a.length>1&>.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&>.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!i[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=cy(o,e[o])+d.map(p=>cy(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=jl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&>.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(fe)),fe(At(d))}}let i=this.types[e];if(i){let r=sn(this._types[e]);return a=>{let s=i.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?fe(p):p});return s.unshift(r),At(s)}}return gt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||gt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,i){if(jl(e))return i(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&>.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,i))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],i),s),{}):gt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Tt(e)}static getPrimaryType(e){return Tt.from(e).primaryType}static hashStruct(e,t,i){return Tt.from(t).hashStruct(e,i)}static hashDomain(e){let t=[];for(let i in e){let r=py[i];r||gt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(i)}`,"domain",e),t.push({name:i,type:r})}return t.sort((i,r)=>Vl.indexOf(i.name)-Vl.indexOf(r.name)),Tt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,i){return At(["0x1901",Tt.hashDomain(e),Tt.from(t).hash(i)])}static hash(e,t,i){return fe(Tt.encode(e,t,i))}static resolveNames(e,t,i,r){return o2(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=Tt.from(t);s.visit(i,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),i=s.visit(i,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:i}})}static getPayload(e,t,i){Tt.hashDomain(e);let r={},a=[];Vl.forEach(d=>{let p=e[d];p!=null&&(r[d]=c2[d](p),a.push({name:d,type:py[d]}))});let s=Tt.from(t),o=we(t);return o.EIP712Domain?gt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(i),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(i,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(j(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&>.throwArgumentError("invalid string","value",p),p}return gt.throwArgumentError("unsupported type","type",d)})}}};var vt=new E(Wn);var oa=class extends rn{},ua=class extends rn{},ql=class extends rn{},fi=class extends rn{static isIndexed(e){return!!(e&&e._isIndexed)}},f2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function by(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}var Bi=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(i=>Kt.from(i)).filter(i=>i!=null)),B(this,"_abiCoder",bt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(i=>{let r=null;switch(i.type){case"constructor":if(this.deploy){vt.warn("duplicate definition - constructor");return}B(this,"deploy",i);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=i.format();if(r[a]){vt.warn("duplicate definition - "+a);return}r[a]=i}),this.deploy||B(this,"deploy",Lt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&&vt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(i=>i.format(e));return e===ge.json?JSON.stringify(t.map(i=>JSON.parse(i))):t}static getAbiCoder(){return ns}static getAddress(e){return me(e)}static getSighash(e){return Ie(sn(e.format()),0,4)}static getEventTopic(e){return sn(e.format())}getFunction(e){if(re(e)){for(let i in this.functions)if(e===this.getSighash(i))return this.functions[i];vt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let i=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===i);return r.length===0?vt.throwArgumentError("no matching function","name",i):r.length>1&&vt.throwArgumentError("multiple matching functions","name",i),this.functions[r[0]]}let t=this.functions[Ut.fromString(e).format()];return t||vt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let i=e.toLowerCase();for(let r in this.events)if(i===this.getEventTopic(r))return this.events[r];vt.throwArgumentError("no matching event","topichash",i)}if(e.indexOf("(")===-1){let i=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===i);return r.length===0?vt.throwArgumentError("no matching event","name",i):r.length>1&&vt.throwArgumentError("multiple matching events","name",i),this.events[r[0]]}let t=this.events[Wt.fromString(e).format()];return t||vt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let i=bt(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===i(a))return this.errors[r]}vt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let i=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===i);return r.length===0?vt.throwArgumentError("no matching error","name",i):r.length>1&&vt.throwArgumentError("multiple matching errors","name",i),this.errors[r[0]]}let t=this.errors[Ut.fromString(e).format()];return t||vt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return bt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),bt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let i=j(t);return W(i.slice(0,4))!==this.getSighash(e)&&vt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(i)),this._decodeParams(e.inputs,i.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ce([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let i=j(t);return W(i.slice(0,4))!==this.getSighash(e)&&vt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(i)),this._decodeParams(e.inputs,i.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ce([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let i=j(t),r=null,a="",s=null,o=null,d=null;switch(i.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,i)}catch{}break;case 4:{let p=W(i.slice(0,4)),c=f2[p];if(c)s=this._abiCoder.decode(c.inputs,i.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,i.slice(4)),o=b.name,d=b.format()}catch{}break}}return vt.throwError("call revert exception"+a,E.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&vt.throwError("too many arguments for "+e.format(),E.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let i=[];e.anonymous||i.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?sn(s):a.type==="bytes"?fe(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),he(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&vt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?i.push(null):o.baseType==="array"||o.baseType==="tuple"?vt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?i.push(a.map(d=>r(o,d))):i.push(r(o,a))});i.length&&i[i.length-1]===null;)i.pop();return i}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let i=[],r=[],a=[];return e.anonymous||i.push(this.getEventTopic(e)),t.length!==e.inputs.length&&vt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")i.push(sn(d));else if(s.type==="bytes")i.push(fe(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");i.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:i}}decodeEventLog(e,t,i){if(typeof e=="string"&&(e=this.getEvent(e)),i!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(i[0],32)||i[0].toLowerCase()!==I)&&vt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:i[0]}),i=i.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(ct.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=i!=null?this._abiCoder.decode(r,ce(i)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new fi({_isIndexed:!0,hash:null});else if(s[_])p[_]=new fi({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw by(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw by(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ua({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new oa({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),i=this.getError(t.substring(0,10).toLowerCase());return i?new ql({args:this._abiCoder.decode(i.inputs,"0x"+t.substring(10)),errorFragment:i,name:i.name,signature:i.format(),sighash:this.getSighash(i)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var xy="abstract-provider/5.7.0";var m2=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},h2=new E(xy),Eo=class extends rn{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){h2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return m2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Se({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),i=null,r=null,a=null;return e&&e.baseFeePerGas&&(i=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:i,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var gy="abstract-signer/5.7.0";var Sn=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},hn=new E(gy),b2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],x2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Nt=class{constructor(){hn.checkAbstract(new.target,Nt),B(this,"_isSigner",!0)}getBalance(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Sn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Se(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Sn(this,void 0,void 0,function*(){this._checkProvider("call");let i=yield Se(this.checkTransaction(e));return yield this.provider.call(i,t)})}sendTransaction(e){return Sn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),i=yield this.signTransaction(t);return yield this.provider.sendTransaction(i)})}getChainId(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let i in e)b2.indexOf(i)===-1&&hn.throwArgumentError("invalid transaction key: "+i,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(i=>(i[0].toLowerCase()!==i[1].toLowerCase()&&hn.throwArgumentError("from address mismatch","transaction",e),i[0])),t}populateTransaction(e){return Sn(this,void 0,void 0,function*(){let t=yield Se(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>Sn(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&hn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let i=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||i)?hn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&i&&hn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(i&&hn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):hn.throwError("failed to get consistent fee data",E.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(x2.indexOf(r.code)>=0)throw r;return hn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&hn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Se(t)})}_checkProvider(e){this.provider||hn.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},mi=class extends Nt{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{hn.throwError(e,E.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,i){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new mi(this.address,e)}};var pe=In(hl()),ei=In(Xl());function ha(n,e,t){return t={path:e,exports:{},require:function(i,r){return jb(i,r??t.path)}},n(t,t.exports),t.exports}function jb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var nd=ic;function ic(n,e){if(!n)throw new Error(e||"Assertion failed")}ic.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)};var Dn=ha(function(n,e){"use strict";var t=e;function i(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=i;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=i;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),Ro=on.getNAF,qb=on.getJSF,Po=on.assert;function Ui(n,e){this.type=n,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var br=Ui;Ui.prototype.point=function(){throw new Error("Not implemented")};Ui.prototype.validate=function(){throw new Error("Not implemented")};Ui.prototype._fixedNafMul=function(e,t){Po(e.precomputed);var i=e._getDoubles(),r=Ro(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];Po(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Ui.prototype._wnafMulAdd=function(e,t,i,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=Ro(i[v],s[v],this._bitLength),d[S]=Ro(i[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=qb(i[v],i[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};xn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};gn.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=i.b.neg().mul(e).divRound(this.n),o=a.mul(i.a),d=s.mul(r.a),p=a.mul(i.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};gn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(r.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};gn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return i.redSqr().redISub(a).cmpn(0)===0};gn.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};It.prototype.isInfinity=function(){return this.inf};It.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)};It.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),r=e.redInvm(),a=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};It.prototype.getX=function(){return this.x.fromRed()};It.prototype.getY=function(){return this.y.fromRed()};It.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};It.prototype.mulAdd=function(e,t,i){var r=[this,t],a=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};It.prototype.jmulAdd=function(e,t,i){var r=[this,t],a=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};It.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};It.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t};It.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Ot(n,e,t,i){br.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}id(Ot,br.BasePoint);gn.prototype.jpoint=function(e,t,i){return new Ot(this,e,t,i)};Ot.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)};Ot.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Ot.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(i),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Ot.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=i.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=i.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Ot.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t=0)return!1;if(i.redIAdd(a),this.x.cmp(i)===0)return!0}};Ot.prototype.inspect=function(){return this.isInfinity()?"":""};Ot.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Io=ha(function(n,e){"use strict";var t=e;t.base=br,t.short=Gb,t.mont=null,t.edwards=null}),So=ha(function(n,e){"use strict";var t=e,i=on.assert;function r(o){o.type==="short"?this.curve=new Io.short(o):o.type==="edwards"?this.curve=new Io.edwards(o):this.curve=new Io.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:ei.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:ei.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:ei.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:ei.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:ei.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ei.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ei.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:ei.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Li(n){if(!(this instanceof Li))return new Li(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Dn.toArray(n.entropy,n.entropyEnc||"hex"),t=Dn.toArray(n.nonce,n.nonceEnc||"hex"),i=Dn.toArray(n.pers,n.persEnc||"hex");nd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,i)}var rc=Li;Li.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1};Li.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=i,i=t,t=null),i&&(i=Dn.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length"};var zb=on.assert;function No(n,e){if(n instanceof No)return n;this._importDER(n,e)||(zb(n.r&&n.s,"Signature without r or s"),this.r=new pe.default(n.r,16),this.s=new pe.default(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var Do=No;function Wb(){this.place=0}function Zl(n,e){var t=n[e.place++];if(!(t&128))return t;var i=t&15;if(i===0||i>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function nc(n){for(var e=0,t=n.length-1;!n[e]&&!(n[e+1]&128)&&e>>3);for(n.push(t|128);--t;)n.push(e>>>(t<<3)&255);n.push(e)}No.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),i[0]&128&&(i=[0].concat(i)),t=nc(t),i=nc(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var r=[2];ed(r,t.length),r=r.concat(t),r.push(2),ed(r,i.length);var a=r.concat(i),s=[48];return ed(s,a.length),s=s.concat(a),on.encode(s,e)};var Kb=function(){throw new Error("unsupported")},ac=on.assert;function bn(n){if(!(this instanceof bn))return new bn(n);typeof n=="string"&&(ac(Object.prototype.hasOwnProperty.call(So,n),"Unknown curve "+n),n=So[n]),n instanceof So.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var Jb=bn;bn.prototype.keyPair=function(e){return new rd(this,e)};bn.prototype.keyFromPrivate=function(e,t){return rd.fromPrivate(this,e,t)};bn.prototype.keyFromPublic=function(e,t){return rd.fromPublic(this,e,t)};bn.prototype.genKeyPair=function(e){e||(e={});for(var t=new rc({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Kb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(i));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};bn.prototype._truncateToN=function(e,t){var i=e.byteLength()*8-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};bn.prototype.sign=function(e,t,i,r){typeof i=="object"&&(r=i,i=null),r||(r={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new rc({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Do({r:v,s:S,recoveryParam:L})}}}}}};bn.prototype.verify=function(e,t,i,r){e=this._truncateToN(new pe.default(e,16)),i=this.keyFromPublic(i,r),t=new Do(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,i.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,i.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};bn.prototype.recoverPubKey=function(n,e,t,i){ac((3&t)===t,"The recovery param is more than two bits"),e=new Do(e,i);var r=this.n,a=new pe.default(n),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};bn.prototype.getKeyRecoveryParam=function(n,e,t,i){if(e=new Do(e,i),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(n,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var $b=ha(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=on,t.rand=function(){throw new Error("unsupported")},t.curve=Io,t.curves=So,t.ec=Jb,t.eddsa=null}),sc=$b.ec;var oc="signing-key/5.7.0";var sd=new E(oc),ad=null;function ti(){return ad||(ad=new sc("secp256k1")),ad}var Tn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&sd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=ti().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=ti().keyFromPublic(j(this.publicKey)),i=ti().keyFromPublic(j(e));return"0x"+t.pub.add(i.pub).encodeCompressed("hex")}signDigest(e){let t=ti().keyFromPrivate(j(this.privateKey)),i=j(e);i.length!==32&&sd.throwArgumentError("bad digest length","digest",e);let r=t.sign(i,{canonical:!0});return zn({recoveryParam:r.recoveryParam,r:he("0x"+r.r.toString(16),32),s:he("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=ti().keyFromPrivate(j(this.privateKey)),i=ti().keyFromPublic(j(os(e)));return he("0x"+t.derive(i.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Oo(n,e){let t=zn(e),i={r:j(t.r),s:j(t.s)};return"0x"+ti().recoverPubKey(j(n),i,t.recoveryParam).encode("hex",!1)}function os(n,e){let t=j(n);if(t.length===32){let i=new Tn(t);return e?"0x"+ti().keyFromPrivate(t).getPublic(!0,"hex"):i.publicKey}else{if(t.length===33)return e?W(t):"0x"+ti().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+ti().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return sd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var uc="transactions/5.7.0";var Ht=new E(uc),Bo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Bo||(Bo={}));function ud(n){return n==="0x"?null:me(n)}function qt(n){return n==="0x"?ta:F.from(n)}var Qb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Yb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function vn(n){let e=os(n);return me(Ie(fe(Ie(e,1)),12))}function xr(n,e){return vn(Oo(j(n),e))}function un(n,e){let t=nn(F.from(n).toHexString());return t.length>32&&Ht.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function od(n,e){return{address:me(n),storageKeys:(e||[]).map((t,i)=>(Ft(t)!==32&&Ht.throwArgumentError("invalid access list storageKey",`accessList[${n}:${i}]`,t),t.toLowerCase()))}}function ln(n){if(Array.isArray(n))return n.map((t,i)=>Array.isArray(t)?(t.length>2&&Ht.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${i}]`,t),od(t[0],t[1])):od(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let i=n[t].reduce((r,a)=>(r[a]=!0,r),{});return od(t,Object.keys(i).sort())});return e.sort((t,i)=>t.address.localeCompare(i.address)),e}function lc(n){return ln(n).map(e=>[e.address,e.storageKeys])}function dc(n,e){if(n.gasPrice!=null){let i=F.from(n.gasPrice),r=F.from(n.maxFeePerGas||0);i.eq(r)||Ht.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:i,maxFeePerGas:r})}let t=[un(n.chainId||0,"chainId"),un(n.nonce||0,"nonce"),un(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(n.maxFeePerGas||0,"maxFeePerGas"),un(n.gasLimit||0,"gasLimit"),n.to!=null?me(n.to):"0x",un(n.value||0,"value"),n.data||"0x",lc(n.accessList||[])];if(e){let i=zn(e);t.push(un(i.recoveryParam,"recoveryParam")),t.push(nn(i.r)),t.push(nn(i.s))}return At(["0x02",ci(t)])}function pc(n,e){let t=[un(n.chainId||0,"chainId"),un(n.nonce||0,"nonce"),un(n.gasPrice||0,"gasPrice"),un(n.gasLimit||0,"gasLimit"),n.to!=null?me(n.to):"0x",un(n.value||0,"value"),n.data||"0x",lc(n.accessList||[])];if(e){let i=zn(e);t.push(un(i.recoveryParam,"recoveryParam")),t.push(nn(i.r)),t.push(nn(i.s))}return At(["0x01",ci(t)])}function Xb(n,e){Yr(n,Yb);let t=[];Qb.forEach(function(s){let o=n[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=j(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ht.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=nn(o),o.length>s.maxLength&&Ht.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let i=0;if(n.chainId!=null?(i=n.chainId,typeof i!="number"&&Ht.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!di(e)&&e.v>28&&(i=Math.floor((e.v-35)/2)),i!==0&&(t.push(W(i)),t.push("0x"),t.push("0x")),!e)return ci(t);let r=zn(e),a=27+r.recoveryParam;return i!==0?(t.pop(),t.pop(),t.pop(),a+=i*2+8,r.v>28&&r.v!==a&&Ht.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ht.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(nn(j(r.r))),t.push(nn(j(r.s))),ci(t)}function us(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ht.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Xb(n,e);switch(n.type){case 1:return pc(n,e);case 2:return dc(n,e);default:break}return Ht.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function yc(n,e,t){try{let i=qt(e[0]).toNumber();if(i!==0&&i!==1)throw new Error("bad recid");n.v=i}catch{Ht.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=he(e[1],32),n.s=he(e[2],32);try{let i=fe(t(n));n.from=xr(i,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Zb(n){let e=es(n.slice(1));e.length!==9&&e.length!==12&&Ht.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=qt(e[2]),i=qt(e[3]),r={type:2,chainId:qt(e[0]).toNumber(),nonce:qt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:i,gasPrice:null,gasLimit:qt(e[4]),to:ud(e[5]),value:qt(e[6]),data:e[7],accessList:ln(e[8])};return e.length===9||(r.hash=fe(n),yc(r,e.slice(9),dc)),r}function e5(n){let e=es(n.slice(1));e.length!==8&&e.length!==11&&Ht.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));let t={type:1,chainId:qt(e[0]).toNumber(),nonce:qt(e[1]).toNumber(),gasPrice:qt(e[2]),gasLimit:qt(e[3]),to:ud(e[4]),value:qt(e[5]),data:e[6],accessList:ln(e[7])};return e.length===8||(t.hash=fe(n),yc(t,e.slice(8),pc)),t}function t5(n){let e=es(n);e.length!==9&&e.length!==6&&Ht.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:qt(e[0]).toNumber(),gasPrice:qt(e[1]),gasLimit:qt(e[2]),to:ud(e[3]),value:qt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=he(e[7],32),t.s=he(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let i=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),i-=t.chainId*2+8);let a=fe(ci(r));try{t.from=xr(a,{r:W(t.r),s:W(t.s),recoveryParam:i})}catch{}t.hash=fe(n)}return t.type=null,t}function Fo(n){let e=j(n);if(e[0]>127)return t5(e);switch(e[0]){case 1:return e5(e);case 2:return Zb(e);default:break}return Ht.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var cc="contracts/5.7.0";var Vi=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},Re=new E(cc),n5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Lo(n,e){return Vi(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Re.throwArgumentError("invalid address or ENS name","name",t);try{return me(t)}catch{}n||Re.throwError("a provider or signer is needed to resolve ENS names",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let i=yield n.resolveName(t);return i==null&&Re.throwArgumentError("resolver or addr is not configured for ENS name","name",t),i})}function ls(n,e,t){return Vi(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((i,r)=>ls(n,Array.isArray(e)?e[r]:e[i.name],i))):t.type==="address"?yield Lo(n,e):t.type==="tuple"?yield ls(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(i=>ls(n,i,t.arrayChildren))):Promise.reject(Re.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function jo(n,e,t){return Vi(this,void 0,void 0,function*(){let i={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(i=we(t.pop())),Re.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?i.from?i.from=Se({override:Lo(n.signer,i.from),signer:n.signer.getAddress()}).then(p=>Vi(this,void 0,void 0,function*(){return me(p.signer)!==p.override&&Re.throwError("Contract with a Signer cannot override from",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):i.from=n.signer.getAddress():i.from&&(i.from=Lo(n.provider,i.from));let r=yield Se({args:ls(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Se(i)||{}}),a=n.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=ln(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=j(a);for(let b=0;bi[p]!=null);return d.length&&Re.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,E.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function i5(n,e){return function(...t){return jo(n,e,t)}}function r5(n,e){let t=n.signer||n.provider;return function(...i){return Vi(this,void 0,void 0,function*(){t||Re.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield jo(n,e,i);return yield t.estimateGas(r)})}}function mc(n,e){let t=e.wait.bind(e);e.wait=i=>t(i).then(r=>(r.events=r.logs.map(a=>{let s=ht(a),o=null;try{o=n.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>n.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>n.provider,s.getBlock=()=>n.provider.getBlock(r.blockHash),s.getTransaction=()=>n.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function hc(n,e,t){let i=n.signer||n.provider;return function(...r){return Vi(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}n.deployTransaction!=null&&(yield n._deployed(a));let s=yield jo(n,e,r),o=yield i.call(s,a);try{let d=n.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===E.errors.CALL_EXCEPTION&&(d.address=n.address,d.args=r,d.transaction=s),d}})}}function a5(n,e){return function(...t){return Vi(this,void 0,void 0,function*(){n.signer||Re.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let i=yield jo(n,e,t),r=yield n.signer.sendTransaction(i);return mc(n,r),r})}}function fc(n,e,t){return e.constant?hc(n,e,t):a5(n,e)}function bc(n){return n.address&&(n.topics==null||n.topics.length===0)?"*":(n.address||"*")+"@"+(n.topics?n.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var gr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(i=>t||i.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(i=>{let r=e.slice();return setTimeout(()=>{i.listener.apply(this,r)},0),!i.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ld=class extends gr{constructor(){super("error",null)}},Uo=class extends gr{constructor(e,t,i,r){let a={address:e},s=t.getEventTopic(i);r?(s!==r[0]&&Re.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(bc(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",i)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,i)=>this.interface.decodeEventLog(this.fragment,t,i);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Zr(e.args);if(t.length)throw t[0].error;let i=(e.args||[]).slice();return i.push(e),i}},Vo=class extends gr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(i,r)=>this.interface.decodeEventLog(t.eventFragment,i,r),e.args=t.args}catch{}}},ba=class{constructor(e,t,i){B(this,"interface",bt(new.target,"getInterface")(t)),i==null?(B(this,"provider",null),B(this,"signer",null)):Nt.isSigner(i)?(B(this,"provider",i.provider||null),B(this,"signer",i)):Xt.isProvider(i)?(B(this,"provider",i),B(this,"signer",null)):Re.throwArgumentError("invalid signer or provider","signerOrProvider",i),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Re.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Re.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Lo(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(me(e)))}catch{Re.throwError("provider is required to use ENS name as contract address",E.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Re.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,fc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,fc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,hc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,i5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,r5(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return fr(e)}static getInterface(e){return Bi.isInterface(e)?e:new Bi(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Re.throwError("contract not deployed",E.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Re.throwError("sending a transactions require a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(i){t[i]!=null&&Re.throwError("cannot override "+i,E.errors.UNSUPPORTED_OPERATION,{operation:i})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new mi(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return fi.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ld);if(e==="event")return this._normalizeRunningEvent(new gr("event",null));if(e==="*")return this._normalizeRunningEvent(new Vo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Uo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let i=e.topics[0];if(typeof i!="string")throw new Error("invalid topic");let r=this.interface.getEvent(i);return this._normalizeRunningEvent(new Uo(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new gr(bc(t),t))}return this._normalizeRunningEvent(new Vo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,i){let r=ht(t);return r.removeListener=()=>{!i||(e.removeListener(i),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,i){if(this.provider||Re.throwError("events require a provider or a signer with a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,i),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,i){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(i!=null&&Re.throwArgumentError("cannot specify toBlock with blockhash","toBlock",i),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=i??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let i=this._getRunningEvent(e),r=i.run(t)>0;return this._checkRunningEvents(i),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,i)=>t+this._runningEvents[i].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let i in this._runningEvents)this._runningEvents[i].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let i in this._runningEvents){let r=this._runningEvents[i];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let i=this._getRunningEvent(e);return i.removeListener(t),this._checkRunningEvents(i),this}removeListener(e,t){return this.off(e,t)}},oe=class extends ba{},Tr=class{constructor(e,t,i){let r=null;typeof t=="string"?r=t:cn(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Re.throwArgumentError("invalid bytecode","bytecode",t),i&&!Nt.isSigner(i)&&Re.throwArgumentError("invalid signer","signer",i),B(this,"bytecode",r),B(this,"interface",bt(new.target,"getInterface")(e)),B(this,"signer",i||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let i in t)if(!n5[i])throw new Error("unknown transaction override "+i)}return["data","from","to"].forEach(i=>{t[i]!=null&&Re.throwError("cannot override "+i,E.errors.UNSUPPORTED_OPERATION,{operation:i})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Re.throwError("non-payable constructor cannot override value",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Re.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ce([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Vi(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Re.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let i=yield ls(this.signer,e,this.interface.deploy.inputs);i.push(t);let r=this.getDeployTransaction(...i),a=yield this.signer.sendTransaction(r),s=bt(this.constructor,"getContractAddress")(a),o=bt(this.constructor,"getContract")(s,this.interface,this.signer);return mc(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Re.throwError("missing compiler output",E.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let i=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(i,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return fr(e)}static getContract(e,t,i){return new oe(e,t,i)}};var qo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)i.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[i[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let i=0;i>=8;for(;a>0;)t.push(a&255),a>>=8}for(let i=0;e[i]===this._leader&&i>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=j(Ti(r,n,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(i/a),p=i-(s-1)*a),c.set(I);for(let S=1;S{var u6=Object.create;var Zs=Object.defineProperty;var d6=Object.getOwnPropertyDescriptor;var l6=Object.getOwnPropertyNames;var p6=Object.getPrototypeOf,y6=Object.prototype.hasOwnProperty;var c6=(n,e,t)=>e in n?Zs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ji=(n,e)=>{for(var t in e)Zs(n,t,{get:e[t],enumerable:!0})},f6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of l6(e))!y6.call(n,i)&&i!==t&&Zs(n,i,{get:()=>e[i],enumerable:!(a=d6(e,i))||a.enumerable});return n};var Cn=(n,e,t)=>(t=n!=null?u6(p6(n)):{},f6(e||!n||!n.__esModule?Zs(t,"default",{value:n,enumerable:!0}):t,n));var be=(n,e,t)=>(c6(n,typeof e!="symbol"?e+"":e,t),t);var ey=ae(()=>{});var hd=ae((ty,md)=>{(function(n,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function a(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof n=="object"?n.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=ey().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var z=this.clone();for(z.negative=0;!z.isZero();){var f=z.modrn(m).toString(u);z=z.idivn(m),z.isZero()?b=f+b:b=x[d-f.length]+f+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,z=g&67108863,f=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=f;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+z,m+=h/67108864|0,z=h&67108863}y.words[d]=z|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,z=w[0]|0,f=z&8191,P=z>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,Y=ee&8191,Q=ee>>>13,mt=w[3]|0,Z=mt&8191,le=mt>>>13,Ja=w[4]|0,Be=Ja&8191,Fe=Ja>>>13,$a=w[5]|0,Le=$a&8191,Ue=$a>>>13,Qa=w[6]|0,Ve=Qa&8191,je=Qa>>>13,Ya=w[7]|0,He=Ya&8191,qe=Ya>>>13,Xa=w[8]|0,ze=Xa&8191,Ge=Xa>>>13,Za=w[9]|0,We=Za&8191,Ke=Za>>>13,ei=A[0]|0,Je=ei&8191,$e=ei>>>13,ti=A[1]|0,Qe=ti&8191,Ye=ti>>>13,ni=A[2]|0,Xe=ni&8191,Ze=ni>>>13,ai=A[3]|0,et=ai&8191,tt=ai>>>13,ii=A[4]|0,nt=ii&8191,at=ii>>>13,ri=A[5]|0,it=ri&8191,rt=ri>>>13,si=A[6]|0,st=si&8191,ot=si>>>13,oi=A[7]|0,ut=oi&8191,dt=oi>>>13,ui=A[8]|0,lt=ui&8191,pt=ui>>>13,di=A[9]|0,yt=di&8191,ct=di>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(f,Je),d=Math.imul(f,$e),d=d+Math.imul(P,Je)|0,m=Math.imul(P,$e);var Ia=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,g=Math.imul(V,Je),d=Math.imul(V,$e),d=d+Math.imul(K,Je)|0,m=Math.imul(K,$e),g=g+Math.imul(f,Qe)|0,d=d+Math.imul(f,Ye)|0,d=d+Math.imul(P,Qe)|0,m=m+Math.imul(P,Ye)|0;var Ca=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,g=Math.imul(Y,Je),d=Math.imul(Y,$e),d=d+Math.imul(Q,Je)|0,m=Math.imul(Q,$e),g=g+Math.imul(V,Qe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Qe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(f,Xe)|0,d=d+Math.imul(f,Ze)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ze)|0;var Sa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Sa>>>26)|0,Sa&=67108863,g=Math.imul(Z,Je),d=Math.imul(Z,$e),d=d+Math.imul(le,Je)|0,m=Math.imul(le,$e),g=g+Math.imul(Y,Qe)|0,d=d+Math.imul(Y,Ye)|0,d=d+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ze)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(f,et)|0,d=d+Math.imul(f,tt)|0,d=d+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Ra=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,g=Math.imul(Be,Je),d=Math.imul(Be,$e),d=d+Math.imul(Fe,Je)|0,m=Math.imul(Fe,$e),g=g+Math.imul(Z,Qe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Qe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(Y,Xe)|0,d=d+Math.imul(Y,Ze)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(V,et)|0,d=d+Math.imul(V,tt)|0,d=d+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(f,nt)|0,d=d+Math.imul(f,at)|0,d=d+Math.imul(P,nt)|0,m=m+Math.imul(P,at)|0;var Pa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,g=Math.imul(Le,Je),d=Math.imul(Le,$e),d=d+Math.imul(Ue,Je)|0,m=Math.imul(Ue,$e),g=g+Math.imul(Be,Qe)|0,d=d+Math.imul(Be,Ye)|0,d=d+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Ye)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ze)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ze)|0,g=g+Math.imul(Y,et)|0,d=d+Math.imul(Y,tt)|0,d=d+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(V,nt)|0,d=d+Math.imul(V,at)|0,d=d+Math.imul(K,nt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(f,it)|0,d=d+Math.imul(f,rt)|0,d=d+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(Ve,Je),d=Math.imul(Ve,$e),d=d+Math.imul(je,Je)|0,m=Math.imul(je,$e),g=g+Math.imul(Le,Qe)|0,d=d+Math.imul(Le,Ye)|0,d=d+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Ye)|0,g=g+Math.imul(Be,Xe)|0,d=d+Math.imul(Be,Ze)|0,d=d+Math.imul(Fe,Xe)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(Z,et)|0,d=d+Math.imul(Z,tt)|0,d=d+Math.imul(le,et)|0,m=m+Math.imul(le,tt)|0,g=g+Math.imul(Y,nt)|0,d=d+Math.imul(Y,at)|0,d=d+Math.imul(Q,nt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(V,it)|0,d=d+Math.imul(V,rt)|0,d=d+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(f,st)|0,d=d+Math.imul(f,ot)|0,d=d+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(He,Je),d=Math.imul(He,$e),d=d+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(Ve,Qe)|0,d=d+Math.imul(Ve,Ye)|0,d=d+Math.imul(je,Qe)|0,m=m+Math.imul(je,Ye)|0,g=g+Math.imul(Le,Xe)|0,d=d+Math.imul(Le,Ze)|0,d=d+Math.imul(Ue,Xe)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,d=d+Math.imul(Be,tt)|0,d=d+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(Z,nt)|0,d=d+Math.imul(Z,at)|0,d=d+Math.imul(le,nt)|0,m=m+Math.imul(le,at)|0,g=g+Math.imul(Y,it)|0,d=d+Math.imul(Y,rt)|0,d=d+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(V,st)|0,d=d+Math.imul(V,ot)|0,d=d+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(f,ut)|0,d=d+Math.imul(f,dt)|0,d=d+Math.imul(P,ut)|0,m=m+Math.imul(P,dt)|0;var ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(ze,Je),d=Math.imul(ze,$e),d=d+Math.imul(Ge,Je)|0,m=Math.imul(Ge,$e),g=g+Math.imul(He,Qe)|0,d=d+Math.imul(He,Ye)|0,d=d+Math.imul(qe,Qe)|0,m=m+Math.imul(qe,Ye)|0,g=g+Math.imul(Ve,Xe)|0,d=d+Math.imul(Ve,Ze)|0,d=d+Math.imul(je,Xe)|0,m=m+Math.imul(je,Ze)|0,g=g+Math.imul(Le,et)|0,d=d+Math.imul(Le,tt)|0,d=d+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(Z,it)|0,d=d+Math.imul(Z,rt)|0,d=d+Math.imul(le,it)|0,m=m+Math.imul(le,rt)|0,g=g+Math.imul(Y,st)|0,d=d+Math.imul(Y,ot)|0,d=d+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(V,ut)|0,d=d+Math.imul(V,dt)|0,d=d+Math.imul(K,ut)|0,m=m+Math.imul(K,dt)|0,g=g+Math.imul(f,lt)|0,d=d+Math.imul(f,pt)|0,d=d+Math.imul(P,lt)|0,m=m+Math.imul(P,pt)|0;var id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(We,Je),d=Math.imul(We,$e),d=d+Math.imul(Ke,Je)|0,m=Math.imul(Ke,$e),g=g+Math.imul(ze,Qe)|0,d=d+Math.imul(ze,Ye)|0,d=d+Math.imul(Ge,Qe)|0,m=m+Math.imul(Ge,Ye)|0,g=g+Math.imul(He,Xe)|0,d=d+Math.imul(He,Ze)|0,d=d+Math.imul(qe,Xe)|0,m=m+Math.imul(qe,Ze)|0,g=g+Math.imul(Ve,et)|0,d=d+Math.imul(Ve,tt)|0,d=d+Math.imul(je,et)|0,m=m+Math.imul(je,tt)|0,g=g+Math.imul(Le,nt)|0,d=d+Math.imul(Le,at)|0,d=d+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,it)|0,d=d+Math.imul(Be,rt)|0,d=d+Math.imul(Fe,it)|0,m=m+Math.imul(Fe,rt)|0,g=g+Math.imul(Z,st)|0,d=d+Math.imul(Z,ot)|0,d=d+Math.imul(le,st)|0,m=m+Math.imul(le,ot)|0,g=g+Math.imul(Y,ut)|0,d=d+Math.imul(Y,dt)|0,d=d+Math.imul(Q,ut)|0,m=m+Math.imul(Q,dt)|0,g=g+Math.imul(V,lt)|0,d=d+Math.imul(V,pt)|0,d=d+Math.imul(K,lt)|0,m=m+Math.imul(K,pt)|0,g=g+Math.imul(f,yt)|0,d=d+Math.imul(f,ct)|0,d=d+Math.imul(P,yt)|0,m=m+Math.imul(P,ct)|0;var rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(We,Qe),d=Math.imul(We,Ye),d=d+Math.imul(Ke,Qe)|0,m=Math.imul(Ke,Ye),g=g+Math.imul(ze,Xe)|0,d=d+Math.imul(ze,Ze)|0,d=d+Math.imul(Ge,Xe)|0,m=m+Math.imul(Ge,Ze)|0,g=g+Math.imul(He,et)|0,d=d+Math.imul(He,tt)|0,d=d+Math.imul(qe,et)|0,m=m+Math.imul(qe,tt)|0,g=g+Math.imul(Ve,nt)|0,d=d+Math.imul(Ve,at)|0,d=d+Math.imul(je,nt)|0,m=m+Math.imul(je,at)|0,g=g+Math.imul(Le,it)|0,d=d+Math.imul(Le,rt)|0,d=d+Math.imul(Ue,it)|0,m=m+Math.imul(Ue,rt)|0,g=g+Math.imul(Be,st)|0,d=d+Math.imul(Be,ot)|0,d=d+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(Z,ut)|0,d=d+Math.imul(Z,dt)|0,d=d+Math.imul(le,ut)|0,m=m+Math.imul(le,dt)|0,g=g+Math.imul(Y,lt)|0,d=d+Math.imul(Y,pt)|0,d=d+Math.imul(Q,lt)|0,m=m+Math.imul(Q,pt)|0,g=g+Math.imul(V,yt)|0,d=d+Math.imul(V,ct)|0,d=d+Math.imul(K,yt)|0,m=m+Math.imul(K,ct)|0;var sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(We,Xe),d=Math.imul(We,Ze),d=d+Math.imul(Ke,Xe)|0,m=Math.imul(Ke,Ze),g=g+Math.imul(ze,et)|0,d=d+Math.imul(ze,tt)|0,d=d+Math.imul(Ge,et)|0,m=m+Math.imul(Ge,tt)|0,g=g+Math.imul(He,nt)|0,d=d+Math.imul(He,at)|0,d=d+Math.imul(qe,nt)|0,m=m+Math.imul(qe,at)|0,g=g+Math.imul(Ve,it)|0,d=d+Math.imul(Ve,rt)|0,d=d+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Le,st)|0,d=d+Math.imul(Le,ot)|0,d=d+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,d=d+Math.imul(Be,dt)|0,d=d+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,dt)|0,g=g+Math.imul(Z,lt)|0,d=d+Math.imul(Z,pt)|0,d=d+Math.imul(le,lt)|0,m=m+Math.imul(le,pt)|0,g=g+Math.imul(Y,yt)|0,d=d+Math.imul(Y,ct)|0,d=d+Math.imul(Q,yt)|0,m=m+Math.imul(Q,ct)|0;var od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=67108863,g=Math.imul(We,et),d=Math.imul(We,tt),d=d+Math.imul(Ke,et)|0,m=Math.imul(Ke,tt),g=g+Math.imul(ze,nt)|0,d=d+Math.imul(ze,at)|0,d=d+Math.imul(Ge,nt)|0,m=m+Math.imul(Ge,at)|0,g=g+Math.imul(He,it)|0,d=d+Math.imul(He,rt)|0,d=d+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ve,st)|0,d=d+Math.imul(Ve,ot)|0,d=d+Math.imul(je,st)|0,m=m+Math.imul(je,ot)|0,g=g+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,dt)|0,g=g+Math.imul(Be,lt)|0,d=d+Math.imul(Be,pt)|0,d=d+Math.imul(Fe,lt)|0,m=m+Math.imul(Fe,pt)|0,g=g+Math.imul(Z,yt)|0,d=d+Math.imul(Z,ct)|0,d=d+Math.imul(le,yt)|0,m=m+Math.imul(le,ct)|0;var ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=67108863,g=Math.imul(We,nt),d=Math.imul(We,at),d=d+Math.imul(Ke,nt)|0,m=Math.imul(Ke,at),g=g+Math.imul(ze,it)|0,d=d+Math.imul(ze,rt)|0,d=d+Math.imul(Ge,it)|0,m=m+Math.imul(Ge,rt)|0,g=g+Math.imul(He,st)|0,d=d+Math.imul(He,ot)|0,d=d+Math.imul(qe,st)|0,m=m+Math.imul(qe,ot)|0,g=g+Math.imul(Ve,ut)|0,d=d+Math.imul(Ve,dt)|0,d=d+Math.imul(je,ut)|0,m=m+Math.imul(je,dt)|0,g=g+Math.imul(Le,lt)|0,d=d+Math.imul(Le,pt)|0,d=d+Math.imul(Ue,lt)|0,m=m+Math.imul(Ue,pt)|0,g=g+Math.imul(Be,yt)|0,d=d+Math.imul(Be,ct)|0,d=d+Math.imul(Fe,yt)|0,m=m+Math.imul(Fe,ct)|0;var dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=67108863,g=Math.imul(We,it),d=Math.imul(We,rt),d=d+Math.imul(Ke,it)|0,m=Math.imul(Ke,rt),g=g+Math.imul(ze,st)|0,d=d+Math.imul(ze,ot)|0,d=d+Math.imul(Ge,st)|0,m=m+Math.imul(Ge,ot)|0,g=g+Math.imul(He,ut)|0,d=d+Math.imul(He,dt)|0,d=d+Math.imul(qe,ut)|0,m=m+Math.imul(qe,dt)|0,g=g+Math.imul(Ve,lt)|0,d=d+Math.imul(Ve,pt)|0,d=d+Math.imul(je,lt)|0,m=m+Math.imul(je,pt)|0,g=g+Math.imul(Le,yt)|0,d=d+Math.imul(Le,ct)|0,d=d+Math.imul(Ue,yt)|0,m=m+Math.imul(Ue,ct)|0;var ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,g=Math.imul(We,st),d=Math.imul(We,ot),d=d+Math.imul(Ke,st)|0,m=Math.imul(Ke,ot),g=g+Math.imul(ze,ut)|0,d=d+Math.imul(ze,dt)|0,d=d+Math.imul(Ge,ut)|0,m=m+Math.imul(Ge,dt)|0,g=g+Math.imul(He,lt)|0,d=d+Math.imul(He,pt)|0,d=d+Math.imul(qe,lt)|0,m=m+Math.imul(qe,pt)|0,g=g+Math.imul(Ve,yt)|0,d=d+Math.imul(Ve,ct)|0,d=d+Math.imul(je,yt)|0,m=m+Math.imul(je,ct)|0;var pd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=67108863,g=Math.imul(We,ut),d=Math.imul(We,dt),d=d+Math.imul(Ke,ut)|0,m=Math.imul(Ke,dt),g=g+Math.imul(ze,lt)|0,d=d+Math.imul(ze,pt)|0,d=d+Math.imul(Ge,lt)|0,m=m+Math.imul(Ge,pt)|0,g=g+Math.imul(He,yt)|0,d=d+Math.imul(He,ct)|0,d=d+Math.imul(qe,yt)|0,m=m+Math.imul(qe,ct)|0;var yd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(yd>>>26)|0,yd&=67108863,g=Math.imul(We,lt),d=Math.imul(We,pt),d=d+Math.imul(Ke,lt)|0,m=Math.imul(Ke,pt),g=g+Math.imul(ze,yt)|0,d=d+Math.imul(ze,ct)|0,d=d+Math.imul(Ge,yt)|0,m=m+Math.imul(Ge,ct)|0;var cd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(cd>>>26)|0,cd&=67108863,g=Math.imul(We,yt),d=Math.imul(We,ct),d=d+Math.imul(Ke,yt)|0,m=Math.imul(Ke,ct);var fd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(fd>>>26)|0,fd&=67108863,h[0]=Ia,h[1]=Ca,h[2]=Sa,h[3]=Ra,h[4]=Pa,h[5]=td,h[6]=nd,h[7]=ad,h[8]=id,h[9]=rd,h[10]=sd,h[11]=od,h[12]=ud,h[13]=dd,h[14]=ld,h[15]=pd,h[16]=yd,h[17]=cd,h[18]=fd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function M(I,u){this.x=I,this.y=u}M.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},M.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var z=this.words[d]|0;this.words[d]=m<<26-A|z>>>A,m=z&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;f--){var P=(w.words[A.length+f]|0)*67108864+(w.words[A.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,f),w.isZero()||(w.negative^=1);d&&(d.words[f]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var z=0,f=1;(y.words[0]&f)===0&&z<26;++z,f<<=1);if(z>0)for(y.iushrn(z);z-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var z;return y.cmpn(1)===0?z=w:z=A,z.cmpn(0)<0&&z.iadd(u),z},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),z=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=A;f.cmp(h)!==0;){for(var D=f,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],z=d-1;z>=0;z--){var f=m>>z&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&k===0){g=0;continue}k<<=1,k|=f,g++,!(g!==b&&(A!==0||z!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof md>"u"||md,ty)});var Ey=ae((TT,ro)=>{(function(){"use strict";var n="input is invalid type",e="finalize already called",t=typeof window=="object",a=t?window:{};a.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!a.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?a=global:i&&(a=self);var s=!a.JS_SHA3_NO_COMMON_JS&&typeof ro=="object"&&ro.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),l&&(a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var M=function(f,P,D){return function(V){return new d(f,P,f).update(V)[D]()}},J=function(f,P,D){return function(V,K){return new d(f,P,K).update(V)[D]()}},$=function(f,P,D){return function(V,K,ee,Y){return u["cshake"+f].update(V,K,ee,Y)[D]()}},de=function(f,P,D){return function(V,K,ee,Y){return u["kmac"+f].update(V,K,ee,Y)[D]()}},T=function(f,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(n);if(l&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!l||!ArrayBuffer.isView(f)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=f.length,Y=this.blockCount,Q=0,mt=this.s,Z,le;Q>2]|=f[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[Y],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(n);if(l&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!l||!ArrayBuffer.isView(f)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=f.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&1023)<<10|f.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(f),V},d.prototype.bytepad=function(f,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(z(P),K=0)}return V&&(Q=P[K],Y+=p[Q>>4&15]+p[Q&15],V>1&&(Y+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(Y+=p[Q>>20&15]+p[Q>>16&15])),Y},d.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,Y=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(Y);for(var mt=new Uint32Array(Q);ee>8&255,Y[Q+2]=mt>>16&255,Y[Q+3]=mt>>24&255;ee%f===0&&z(P)}return V&&(Q=ee<<2,mt=P[K],Y[Q]=mt&255,V>1&&(Y[Q+1]=mt>>8&255),V>2&&(Y[Q+2]=mt>>16&255)),Y};function m(f,P,D){d.call(this,f,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var z=function(f){var P,D,V,K,ee,Y,Q,mt,Z,le,Ja,Be,Fe,$a,Le,Ue,Qa,Ve,je,Ya,He,qe,Xa,ze,Ge,Za,We,Ke,ei,Je,$e,ti,Qe,Ye,ni,Xe,Ze,ai,et,tt,ii,nt,at,ri,it,rt,si,st,ot,oi,ut,dt,ui,lt,pt,di,yt,ct,Ia,Ca,Sa,Ra,Pa;for(V=0;V<48;V+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],Y=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],mt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],le=f[6]^f[16]^f[26]^f[36]^f[46],Ja=f[7]^f[17]^f[27]^f[37]^f[47],Be=f[8]^f[18]^f[28]^f[38]^f[48],Fe=f[9]^f[19]^f[29]^f[39]^f[49],P=Be^(Y<<1|Q>>>31),D=Fe^(Q<<1|Y>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(mt<<1|Z>>>31),D=ee^(Z<<1|mt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=Y^(le<<1|Ja>>>31),D=Q^(Ja<<1|le>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=mt^(Be<<1|Fe>>>31),D=Z^(Fe<<1|Be>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=le^(K<<1|ee>>>31),D=Ja^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,$a=f[0],Le=f[1],rt=f[11]<<4|f[10]>>>28,si=f[10]<<4|f[11]>>>28,Ke=f[20]<<3|f[21]>>>29,ei=f[21]<<3|f[20]>>>29,Ca=f[31]<<9|f[30]>>>23,Sa=f[30]<<9|f[31]>>>23,nt=f[40]<<18|f[41]>>>14,at=f[41]<<18|f[40]>>>14,Ye=f[2]<<1|f[3]>>>31,ni=f[3]<<1|f[2]>>>31,Ue=f[13]<<12|f[12]>>>20,Qa=f[12]<<12|f[13]>>>20,st=f[22]<<10|f[23]>>>22,ot=f[23]<<10|f[22]>>>22,Je=f[33]<<13|f[32]>>>19,$e=f[32]<<13|f[33]>>>19,Ra=f[42]<<2|f[43]>>>30,Pa=f[43]<<2|f[42]>>>30,lt=f[5]<<30|f[4]>>>2,pt=f[4]<<30|f[5]>>>2,Xe=f[14]<<6|f[15]>>>26,Ze=f[15]<<6|f[14]>>>26,Ve=f[25]<<11|f[24]>>>21,je=f[24]<<11|f[25]>>>21,oi=f[34]<<15|f[35]>>>17,ut=f[35]<<15|f[34]>>>17,ti=f[45]<<29|f[44]>>>3,Qe=f[44]<<29|f[45]>>>3,ze=f[6]<<28|f[7]>>>4,Ge=f[7]<<28|f[6]>>>4,di=f[17]<<23|f[16]>>>9,yt=f[16]<<23|f[17]>>>9,ai=f[26]<<25|f[27]>>>7,et=f[27]<<25|f[26]>>>7,Ya=f[36]<<21|f[37]>>>11,He=f[37]<<21|f[36]>>>11,dt=f[47]<<24|f[46]>>>8,ui=f[46]<<24|f[47]>>>8,ri=f[8]<<27|f[9]>>>5,it=f[9]<<27|f[8]>>>5,Za=f[18]<<20|f[19]>>>12,We=f[19]<<20|f[18]>>>12,ct=f[29]<<7|f[28]>>>25,Ia=f[28]<<7|f[29]>>>25,tt=f[38]<<8|f[39]>>>24,ii=f[39]<<8|f[38]>>>24,qe=f[48]<<14|f[49]>>>18,Xa=f[49]<<14|f[48]>>>18,f[0]=$a^~Ue&Ve,f[1]=Le^~Qa&je,f[10]=ze^~Za&Ke,f[11]=Ge^~We&ei,f[20]=Ye^~Xe&ai,f[21]=ni^~Ze&et,f[30]=ri^~rt&st,f[31]=it^~si&ot,f[40]=lt^~di&ct,f[41]=pt^~yt&Ia,f[2]=Ue^~Ve&Ya,f[3]=Qa^~je&He,f[12]=Za^~Ke&Je,f[13]=We^~ei&$e,f[22]=Xe^~ai&tt,f[23]=Ze^~et&ii,f[32]=rt^~st&oi,f[33]=si^~ot&ut,f[42]=di^~ct&Ca,f[43]=yt^~Ia&Sa,f[4]=Ve^~Ya&qe,f[5]=je^~He&Xa,f[14]=Ke^~Je&ti,f[15]=ei^~$e&Qe,f[24]=ai^~tt&nt,f[25]=et^~ii&at,f[34]=st^~oi&dt,f[35]=ot^~ut&ui,f[44]=ct^~Ca&Ra,f[45]=Ia^~Sa&Pa,f[6]=Ya^~qe&$a,f[7]=He^~Xa&Le,f[16]=Je^~ti&ze,f[17]=$e^~Qe&Ge,f[26]=tt^~nt&Ye,f[27]=ii^~at&ni,f[36]=oi^~dt&ri,f[37]=ut^~ui&it,f[46]=Ca^~Ra<,f[47]=Sa^~Pa&pt,f[8]=qe^~$a&Ue,f[9]=Xa^~Le&Qa,f[18]=ti^~ze&Za,f[19]=Qe^~Ge&We,f[28]=nt^~Ye&Xe,f[29]=at^~ni&Ze,f[38]=dt^~ri&rt,f[39]=ui^~it&si,f[48]=Ra^~lt&di,f[49]=Pa^~pt&yt,f[0]^=S[V],f[1]^=S[V+1]};if(s)ro.exports=u;else{for(b=0;b{v0.exports=T0;function T0(n,e){if(!n)throw new Error(e||"Assertion failed")}T0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var w0=ae((y8,qd)=>{typeof Object.create=="function"?qd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:qd.exports=function(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var Rn=ae(De=>{"use strict";var g2=dr(),T2=w0();De.inherits=T2;function v2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function w2(n,e){if(Array.isArray(n))return n.slice();if(!n)return[];var t=[];if(typeof n=="string")if(e){if(e==="hex")for(n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n),i=0;i>6|192,t[a++]=r&63|128):v2(n,i)?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),t[a++]=r>>18|240,t[a++]=r>>12&63|128,t[a++]=r>>6&63|128,t[a++]=r&63|128):(t[a++]=r>>12|224,t[a++]=r>>6&63|128,t[a++]=r&63|128)}else for(i=0;i>>24|n>>>8&65280|n<<8&16711680|(n&255)<<24;return e>>>0}De.htonl=_0;function k2(n,e){for(var t="",a=0;a>>0}return r}De.join32=A2;function E2(n,e){for(var t=new Array(n.length*4),a=0,i=0;a>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}De.split32=E2;function M2(n,e){return n>>>e|n<<32-e}De.rotr32=M2;function I2(n,e){return n<>>32-e}De.rotl32=I2;function C2(n,e){return n+e>>>0}De.sum32=C2;function S2(n,e,t){return n+e+t>>>0}De.sum32_3=S2;function R2(n,e,t,a){return n+e+t+a>>>0}De.sum32_4=R2;function P2(n,e,t,a,i){return n+e+t+a+i>>>0}De.sum32_5=P2;function N2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}De.sum64=N2;function D2(n,e,t,a){var i=e+a>>>0,r=(i>>0}De.sum64_hi=D2;function O2(n,e,t,a){var i=e+a;return i>>>0}De.sum64_lo=O2;function B2(n,e,t,a,i,r,s,o){var l=0,p=e;p=p+a>>>0,l+=p>>0,l+=p>>0,l+=p>>0}De.sum64_4_hi=B2;function F2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}De.sum64_4_lo=F2;function L2(n,e,t,a,i,r,s,o,l,p){var c=0,x=e;x=x+a>>>0,c+=x>>0,c+=x>>0,c+=x>>0,c+=x>>0}De.sum64_5_hi=L2;function U2(n,e,t,a,i,r,s,o,l,p){var c=e+a+r+o+p;return c>>>0}De.sum64_5_lo=U2;function V2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}De.rotr64_hi=V2;function j2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.rotr64_lo=j2;function H2(n,e,t){return n>>>t}De.shr64_hi=H2;function q2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.shr64_lo=q2});var lr=ae(M0=>{"use strict";var E0=Rn(),z2=dr();function Mo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}M0.BlockHash=Mo;Mo.prototype.update=function(e,t){if(e=E0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=E0.join32(e,0,e.length-a,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var G2=Rn(),Jn=G2.rotr32;function W2(n,e,t,a){if(n===0)return I0(e,t,a);if(n===1||n===3)return S0(e,t,a);if(n===2)return C0(e,t,a)}ha.ft_1=W2;function I0(n,e,t){return n&e^~n&t}ha.ch32=I0;function C0(n,e,t){return n&e^n&t^e&t}ha.maj32=C0;function S0(n,e,t){return n^e^t}ha.p32=S0;function K2(n){return Jn(n,2)^Jn(n,13)^Jn(n,22)}ha.s0_256=K2;function J2(n){return Jn(n,6)^Jn(n,11)^Jn(n,25)}ha.s1_256=J2;function $2(n){return Jn(n,7)^Jn(n,18)^n>>>3}ha.g0_256=$2;function Q2(n){return Jn(n,17)^Jn(n,19)^n>>>10}ha.g1_256=Q2});var N0=ae((h8,P0)=>{"use strict";var pr=Rn(),Y2=lr(),X2=zd(),Gd=pr.rotl32,rs=pr.sum32,Z2=pr.sum32_5,e5=X2.ft_1,R0=Y2.BlockHash,t5=[1518500249,1859775393,2400959708,3395469782];function $n(){if(!(this instanceof $n))return new $n;R0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}pr.inherits($n,R0);P0.exports=$n;$n.blockSize=512;$n.outSize=160;$n.hmacStrength=80;$n.padLength=64;$n.prototype._update=function(e,t){for(var a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var yr=Rn(),n5=lr(),cr=zd(),a5=dr(),Pn=yr.sum32,i5=yr.sum32_4,r5=yr.sum32_5,s5=cr.ch32,o5=cr.maj32,u5=cr.s0_256,d5=cr.s1_256,l5=cr.g0_256,p5=cr.g1_256,D0=n5.BlockHash,y5=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Qn(){if(!(this instanceof Qn))return new Qn;D0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y5,this.W=new Array(64)}yr.inherits(Qn,D0);O0.exports=Qn;Qn.blockSize=512;Qn.outSize=256;Qn.hmacStrength=192;Qn.padLength=64;Qn.prototype._update=function(e,t){for(var a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var Kd=Rn(),B0=Wd();function xa(){if(!(this instanceof xa))return new xa;B0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Kd.inherits(xa,B0);F0.exports=xa;xa.blockSize=512;xa.outSize=224;xa.hmacStrength=192;xa.padLength=64;xa.prototype._digest=function(e){return e==="hex"?Kd.toHex32(this.h.slice(0,7),"big"):Kd.split32(this.h.slice(0,7),"big")}});var Qd=ae((g8,H0)=>{"use strict";var Zt=Rn(),c5=lr(),f5=dr(),Yn=Zt.rotr64_hi,Xn=Zt.rotr64_lo,U0=Zt.shr64_hi,V0=Zt.shr64_lo,Fa=Zt.sum64,Jd=Zt.sum64_hi,$d=Zt.sum64_lo,m5=Zt.sum64_4_hi,h5=Zt.sum64_4_lo,x5=Zt.sum64_5_hi,b5=Zt.sum64_5_lo,j0=c5.BlockHash,g5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Nn(){if(!(this instanceof Nn))return new Nn;j0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g5,this.W=new Array(160)}Zt.inherits(Nn,j0);H0.exports=Nn;Nn.blockSize=1024;Nn.outSize=512;Nn.hmacStrength=192;Nn.padLength=128;Nn.prototype._prepareBlock=function(e,t){for(var a=this.W,i=0;i<32;i++)a[i]=e[t+i];for(;i{"use strict";var Yd=Rn(),q0=Qd();function ba(){if(!(this instanceof ba))return new ba;q0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Yd.inherits(ba,q0);z0.exports=ba;ba.blockSize=1024;ba.outSize=384;ba.hmacStrength=192;ba.padLength=128;ba.prototype._digest=function(e){return e==="hex"?Yd.toHex32(this.h.slice(0,12),"big"):Yd.split32(this.h.slice(0,12),"big")}});var W0=ae(fr=>{"use strict";fr.sha1=N0();fr.sha224=L0();fr.sha256=Wd();fr.sha384=G0();fr.sha512=Qd()});var X0=ae(Y0=>{"use strict";var hi=Rn(),P5=lr(),Io=hi.rotl32,K0=hi.sum32,ss=hi.sum32_3,J0=hi.sum32_4,Q0=P5.BlockHash;function Zn(){if(!(this instanceof Zn))return new Zn;Q0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}hi.inherits(Zn,Q0);Y0.ripemd160=Zn;Zn.blockSize=512;Zn.outSize=160;Zn.hmacStrength=192;Zn.padLength=64;Zn.prototype._update=function(e,t){for(var a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,c=r,x=s,C=o,_=0;_<80;_++){var v=K0(Io(J0(a,$0(_,i,r,s),e[O5[_]+t],N5(_)),F5[_]),o);a=o,o=s,s=Io(r,10),r=i,i=v,v=K0(Io(J0(l,$0(79-_,p,c,x),e[B5[_]+t],D5(_)),L5[_]),C),l=C,C=x,x=Io(c,10),c=p,p=v}v=ss(this.h[1],r,x),this.h[1]=ss(this.h[2],s,C),this.h[2]=ss(this.h[3],o,l),this.h[3]=ss(this.h[4],a,p),this.h[4]=ss(this.h[0],i,c),this.h[0]=v};Zn.prototype._digest=function(e){return e==="hex"?hi.toHex32(this.h,"little"):hi.split32(this.h,"little")};function $0(n,e,t,a){return n<=15?e^t^a:n<=31?e&t|~e&a:n<=47?(e|~t)^a:n<=63?e&a|t&~a:e^(t|~a)}function N5(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function D5(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var O5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],B5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],F5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],L5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var ec=ae((_8,Z0)=>{"use strict";var U5=Rn(),V5=dr();function mr(n,e,t){if(!(this instanceof mr))return new mr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(U5.toArray(e,t))}Z0.exports=mr;mr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),V5(e.length<=this.blockSize);for(var t=e.length;t{var Dt=tc;Dt.utils=Rn();Dt.common=lr();Dt.sha=W0();Dt.ripemd=X0();Dt.hmac=ec();Dt.sha1=Dt.sha.sha1;Dt.sha256=Dt.sha.sha256;Dt.sha224=Dt.sha.sha224;Dt.sha384=Dt.sha.sha384;Dt.sha512=Dt.sha.sha512;Dt.ripemd160=Dt.ripemd.ripemd160});var xl=ae((hl,Cc)=>{"use strict";(function(n){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function a(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&z<224?(d.push(String.fromCharCode((z&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((z&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],z=0;z>4]+k[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],c=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],M=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[z][k%4]=m[k],this._Kd[h-z][k%4]=m[k];for(var f=0,P=d,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,d!=8)for(var k=1;k>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var z=1;z>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[z][m];d=g.slice()}for(var f=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],f[4*m]=(c[d[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[d[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[d[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[d[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var z=1;z>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[z][m];d=g.slice()}for(var f=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],f[4*m]=(x[d[m]>>24&255]^P>>24)&255,f[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=a(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=a(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=a(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(n){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,M=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=M,z=J,f=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&z)|0)+(f+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,f=z,z=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,M=M+m|0,J=J+z|0,$=$+f|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function a(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,M=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),M=M.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),M=M.concat(t(U.concat(t(O))).slice(0,S))),M}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let M=a(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let z=0;zh&&(d=h);for(let z=0;z>0&255),M.push(J[z]>>8&255),M.push(J[z]>>16&255),M.push(J[z]>>24&255);let m=a(_,M,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(M,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),M(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof wl<"u"?Rc.exports=C:typeof define=="function"&&define.amd?define(C):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=C)})(wl)});var nf=ae((y9,tf)=>{"use strict";var Xo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ml={};for(hs=0;hs>25;return(n&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Zc(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=kr(e)^a>>5}for(e=kr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Zc(n);if(typeof a=="string")throw new Error(a);for(var i=n+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");a=kr(a)^s,i+=Xo.charAt(s)}for(r=0;r<6;++r)a=kr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Xo.charAt(o)}return i}function ef(n,e){if(e=e||90,n.length<8)return n+" too short";if(n.length>e)return"Exceeds length limit";var t=n.toLowerCase(),a=n.toUpperCase();if(n!==t&&n!==a)return"Mixed-case string "+n;n=t;var i=n.lastIndexOf("1");if(i===-1)return"No separator character for "+n;if(i===0)return"Missing prefix for "+n;var r=n.slice(0,i),s=n.slice(i+1);if(s.length<6)return"Data too short";var o=Zc(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+n:{prefix:r,words:l}}function kx(){var n=ef.apply(null,arguments);if(typeof n=="object")return n}function Ax(n){var e=ef.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Zo(n,e,t,a){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(a)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(n,e){typeof tp=="object"&&typeof np<"u"?np.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(tp,function(){"use strict";var n=function(a,i){if(i=i||{},typeof a!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,c=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")c=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;a(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var ap=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$dictionary=void 0;hu.$dictionary=function(){var n,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(n=e.__typia_custom_validator)!==null&&n!==void 0?n:e.__typia_custom_validator=new Map}()});var Us=ae((AE,vm)=>{vm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var rp=ae(za=>{var Ie=Us(),ip=()=>[{type:Ie.RANGE,from:48,to:57}],wm=()=>[{type:Ie.CHAR,value:95},{type:Ie.RANGE,from:97,to:122},{type:Ie.RANGE,from:65,to:90}].concat(ip()),_m=()=>[{type:Ie.CHAR,value:9},{type:Ie.CHAR,value:10},{type:Ie.CHAR,value:11},{type:Ie.CHAR,value:12},{type:Ie.CHAR,value:13},{type:Ie.CHAR,value:32},{type:Ie.CHAR,value:160},{type:Ie.CHAR,value:5760},{type:Ie.RANGE,from:8192,to:8202},{type:Ie.CHAR,value:8232},{type:Ie.CHAR,value:8233},{type:Ie.CHAR,value:8239},{type:Ie.CHAR,value:8287},{type:Ie.CHAR,value:12288},{type:Ie.CHAR,value:65279}],cb=()=>[{type:Ie.CHAR,value:10},{type:Ie.CHAR,value:13},{type:Ie.CHAR,value:8232},{type:Ie.CHAR,value:8233}];za.words=()=>({type:Ie.SET,set:wm(),not:!1});za.notWords=()=>({type:Ie.SET,set:wm(),not:!0});za.ints=()=>({type:Ie.SET,set:ip(),not:!1});za.notInts=()=>({type:Ie.SET,set:ip(),not:!0});za.whitespace=()=>({type:Ie.SET,set:_m(),not:!1});za.notWhitespace=()=>({type:Ie.SET,set:_m(),not:!0});za.anyChar=()=>({type:Ie.SET,set:cb(),not:!0})});var Am=ae(Vs=>{var km=Us(),Lr=rp(),fb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",mb={0:0,t:9,n:10,v:11,f:12,r:13};Vs.strToChars=function(n){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return n=n.replace(e,function(t,a,i,r,s,o,l,p){if(i)return t;var c=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?fb.indexOf(l):mb[p],x=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Vs.tokenizeClass=(n,e)=>{for(var t=[],a=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=a.exec(n))!=null;)if(i[1])t.push(Lr.words());else if(i[2])t.push(Lr.ints());else if(i[3])t.push(Lr.whitespace());else if(i[4])t.push(Lr.notWords());else if(i[5])t.push(Lr.notInts());else if(i[6])t.push(Lr.notWhitespace());else if(i[7])t.push({type:km.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:km.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Vs.error(e,"Unterminated character class")};Vs.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var Em=ae(js=>{var xu=Us();js.wordBoundary=()=>({type:xu.POSITION,value:"b"});js.nonWordBoundary=()=>({type:xu.POSITION,value:"B"});js.begin=()=>({type:xu.POSITION,value:"^"});js.end=()=>({type:xu.POSITION,value:"$"})});var Mm=ae((CE,sp)=>{var Ur=Am(),_n=Us(),Ii=rp(),bu=Em();sp.exports=n=>{var e=0,t,a,i={type:_n.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ur.error(n,`Nothing to repeat at column ${O-1}`)},p=Ur.strToChars(n);for(t=p.length;e{"use strict";var kn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new kn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var a=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var a=t.low;a<=t.high;)e.push(a),a++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Im.exports=Ga});var Rm=ae((RE,Sm)=>{var gu=Mm(),Hs=Cm(),Ci=gu.types;Sm.exports=class qs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=gu(e)}_setDefaults(e){this.max=e.max!=null?e.max:qs.prototype.max!=null?qs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var a,i,r,s,o;switch(e.type){case Ci.ROOT:case Ci.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var hb=Si&&Si.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Si,"__esModule",{value:!0});Si.RandomGenerator=void 0;var xb=hb(Rm()),bb;(function(n){var e="abcdefghijklmnopqrstuvwxyz";n.boolean=function(){return Math.random()<.5},n.integer=function(t,a){return t??(t=0),a??(a=100),Math.floor(Math.random()*(a-t+1))+t},n.bigint=function(t,a){return t??(t=BigInt(0)),a??(a=BigInt(100)),BigInt(n.integer(Number(t),Number(a)))},n.number=function(t,a){return t??(t=0),a??(a=100),Math.random()*(a-t)+t},n.string=function(t){return new Array(t??n.integer(5,10)).fill(0).map(function(){return e[n.integer(0,e.length-1)]}).join("")},n.array=function(t,a){return new Array(a??n.integer(0,3)).fill(0).map(function(i,r){return t(r)})},n.pick=function(t){return t[n.integer(0,t.length-1)]},n.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,i=t==="x"?a:a&3|8;return i.toString(16)})},n.email=function(){return"".concat(n.string(10),"@").concat(n.string(10),".").concat(n.string(3))},n.url=function(){return"https://".concat(n.string(10),".").concat(n.string(3))},n.ipv4=function(){return n.array(function(){return n.integer(0,255)},4).join(".")},n.ipv6=function(){return n.array(function(){return n.integer(0,65535).toString(16)},8).join(":")},n.pattern=function(t){return new xb.default(t).gen()},n.date=function(t,a){return t??(t=0),a??(a=Date.now()*2),new Date(n.number(t,a)).toISOString().substring(0,10)},n.datetime=function(t,a){return t??(t=0),a??(a=Date.now()*2),new Date(n.number(t,a)).toISOString()}})(bb=Si.RandomGenerator||(Si.RandomGenerator={}))});var zs=ae(Vr=>{"use strict";var gb=Vr&&Vr.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(a[r]=i[r])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.TypeGuardError=void 0;var Tb=function(n){gb(e,n);function e(t){var a=this.constructor,i=n.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=a.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Vr.TypeGuardError=Tb});var Nm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$any=void 0;var vb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};Tu.$any=vb});var Dm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$every=void 0;var wb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$guard=void 0;var _b=zs(),kb=function(n){return function(e,t){if(e===!0)throw new _b.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};wu.$guard=kb});var Bm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_between=void 0;var Ab=function(n,e,t){return e<=n&&n<=t};_u.$is_between=Ab});var Fm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_custom=void 0;var Eb=ap(),Mb=function(n,e,t,a){var i,r=(i=Eb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};ku.$is_custom=Mb});var Lm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_date=void 0;var Ib=function(n){return Cb.test(n)};Au.$is_date=Ib;var Cb=/^(\d{4})-(\d{2})-(\d{2})$/});var Um=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_datetime=void 0;var Sb=function(n){return!isNaN(new Date(n).getTime())};Eu.$is_datetime=Sb});var Vm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_email=void 0;var Rb=function(n){return Pb.test(n)};Mu.$is_email=Rb;var Pb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var jm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_ipv4=void 0;var Nb=function(n){return Db.test(n)};Iu.$is_ipv4=Nb;var Db=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Hm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_ipv6=void 0;var Ob=function(n){return Bb.test(n)};Cu.$is_ipv6=Ob;var Bb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var qm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_url=void 0;var Fb=function(n){return Lb.test(n)};Su.$is_url=Fb;var Lb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var zm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$is_uuid=void 0;var Ub=function(n){return Vb.test(n)};Ru.$is_uuid=Ub;var Vb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Gm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$join=void 0;var jb=function(n){return Hb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Pu.$join=jb;var Hb=function(n){return qb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},qb=function(n){return zb.has(n)},zb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Wm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$number=void 0;var Gb=zs(),Wb=function(n){if(isFinite(n)===!1)throw new Gb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Nu.$number=Wb});var Km=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$report=void 0;var Kb=function(n){var e=function(t){if(n.length===0)return!0;var a=n[n.length-1].path;return t.length>a.length||a.substring(0,t.length)!==t};return function(t,a){return t&&e(a.path)&&n.push(a),!1}};Du.$report=Kb});var Jm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$rest=void 0;var Jb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Ou.$rest=Jb});var $m=ae(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$string=void 0;var $b=function(n){if(n.length>41)return JSON.stringify(n);for(var e=n.length,t="",a=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=n.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=n.slice(a,o)+"\\",a=o,i=!0)}return i?t+=n.slice(a):t=n,s<32||r===!0?JSON.stringify(n):'"'.concat(t,'"')};Bu.$string=$b});var Qm=ae(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.$tail=void 0;var Qb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Fu.$tail=Qb});var eh=ae(Ri=>{"use strict";var zt=Ri&&Ri.__assign||function(){return zt=Object.assign||function(n){for(var e,t=1,a=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),a}}})},n.stringify=function(t){return zt(zt({},n.is()),{number:d1.$number,string:y1.$string,tail:c1.$tail,rest:p1.$rest,throws:e(t)})},n.clone=function(t){return zt(zt({},n.is()),{throws:e(t),any:Yb.$any})},n.prune=function(t){return zt(zt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Ym.RandomGenerator,pick:Ym.RandomGenerator.pick}};var e=function(t){return function(a){throw new Xm.TypeGuardError(zt(zt({},a),{method:"typia.".concat(t)}))}}})(f1=Ri.Namespace||(Ri.Namespace={}))});var th=ae(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.MapUtil=void 0;var m1;(function(n){n.take=function(e){return function(t,a){var i=e.get(t);if(i)return i;var r=a();return e.set(t,r),r}}})(m1=Gs.MapUtil||(Gs.MapUtil={}))});var ah=ae(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var rh=ae(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0})});var oh=ae(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var dh=ae(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var ph=ae(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0})});var ch=ae(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0})});var gp=ae(G=>{"use strict";var h1=G&&G.__createBinding||(Object.create?function(n,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,a,i)}:function(n,e,t,a){a===void 0&&(a=t),n[a]=e[t]}),Pi=G&&G.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&h1(e,n,t)};Object.defineProperty(G,"__esModule",{value:!0});G.createValidatePrune=G.createIsPrune=G.createAssertPrune=G.createPrune=G.createValidateClone=G.createIsClone=G.createAssertClone=G.createClone=G.createRandom=G.createValidateStringify=G.createIsStringify=G.createAssertStringify=G.createStringify=G.createValidateParse=G.createAssertParse=G.createIsParse=G.createValidateEquals=G.createEquals=G.createAssertEquals=G.createValidate=G.createIs=G.createAssertType=G.createAssert=G.validatePrune=G.isPrune=G.assertPrune=G.prune=G.validateClone=G.isClone=G.assertClone=G.clone=G.literals=G.random=G.metadata=G.validateStringify=G.isStringify=G.assertStringify=G.stringify=G.validateParse=G.isParse=G.assertParse=G.application=G.customValidators=G.validateEquals=G.equals=G.assertEquals=G.validate=G.is=G.assertType=G.assert=void 0;var jr=ap(),Ce=eh(),x1=th();Pi(ah(),G);Pi(rh(),G);Pi(oh(),G);Pi(dh(),G);Pi(ph(),G);Pi(ch(),G);Pi(zs(),G);function op(){re("assert")}G.assert=op;Object.assign(op,Ce.Namespace.assert("assert"));function up(){re("assertType")}G.assertType=up;Object.assign(up,Ce.Namespace.assert("assertType"));function Lu(){re("is")}G.is=Lu;Object.assign(Lu,Ce.Namespace.assert("is"));function Uu(){re("validate")}G.validate=Uu;Object.assign(Uu,Ce.Namespace.validate());function dp(){re("assertEquals")}G.assertEquals=dp;Object.assign(dp,Ce.Namespace.assert("assertEquals"));function lp(){re("equals")}G.equals=lp;Object.assign(lp,Ce.Namespace.is());function pp(){re("validateEquals")}G.validateEquals=pp;Object.assign(pp,Ce.Namespace.validate());G.customValidators={size:function(n){var e,t;return n?(t=(e=jr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:jr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=jr.$dictionary.get(n))===null||t===void 0?void 0:t.has(e))!==null&&a!==void 0?a:!1}},get:function(n){return function(e){var t;return(t=jr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=x1.MapUtil.take(jr.$dictionary)(n,function(){return new Map});return a.has(e)?!1:(a.set(e,t),!0)}}},erase:function(n){return function(e){var t,a;return(a=(t=jr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function b1(){re("application")}G.application=b1;function yp(){re("assertParse")}G.assertParse=yp;Object.assign(yp,Ce.Namespace.assert("assertParse"));function cp(){re("isParse")}G.isParse=cp;Object.assign(cp,Lu);function fp(){re("validateParse")}G.validateParse=fp;Object.assign(fp,Uu);function mp(){re("stringify")}G.stringify=mp;Object.assign(mp,Ce.Namespace.stringify("stringify"));function Vu(){re("assertStringify")}G.assertStringify=Vu;Object.assign(Vu,Ce.Namespace.assert("assertStringify"));Object.assign(Vu,Ce.Namespace.stringify("assertStringify"));function ju(){re("isStringify")}G.isStringify=ju;Object.assign(ju,Ce.Namespace.is());Object.assign(ju,Ce.Namespace.stringify("isStringify"));function Hu(){re("validateStringify")}G.validateStringify=Hu;Object.assign(Hu,Ce.Namespace.validate());Object.assign(Hu,Ce.Namespace.stringify("validateStringify"));function g1(){re("metadata")}G.metadata=g1;function hp(){re("random")}G.random=hp;Object.assign(hp,Ce.Namespace.random());function T1(){re("literals")}G.literals=T1;function xp(){re("clone")}G.clone=xp;Object.assign(xp,Ce.Namespace.clone("clone"));function qu(){re("assertClone")}G.assertClone=qu;Object.assign(qu,Ce.Namespace.assert("assertClone"));Object.assign(qu,Ce.Namespace.clone("assertClone"));function zu(){re("isClone")}G.isClone=zu;Object.assign(zu,Ce.Namespace.is());Object.assign(zu,Ce.Namespace.clone("isClone"));function Gu(){re("validateClone")}G.validateClone=Gu;Object.assign(Gu,Ce.Namespace.validate());Object.assign(Gu,Ce.Namespace.clone("validateClone"));function bp(){re("prune")}G.prune=bp;Object.assign(bp,Ce.Namespace.prune("prune"));function Wu(){re("assertPrune")}G.assertPrune=Wu;Object.assign(Wu,Ce.Namespace.assert("assertPrune"));Object.assign(Wu,Ce.Namespace.prune("assertPrune"));function Ku(){re("isPrune")}G.isPrune=Ku;Object.assign(Ku,Ce.Namespace.is());Object.assign(Ku,Ce.Namespace.prune("isPrune"));function Ju(){re("validatePrune")}G.validatePrune=Ju;Object.assign(Ju,Ce.Namespace.prune("validatePrune"));Object.assign(Ju,Ce.Namespace.validate());function fh(){re("createAssert")}G.createAssert=fh;Object.assign(fh,op);function mh(){re("createAssertType")}G.createAssertType=mh;Object.assign(mh,up);function hh(){re("createIs")}G.createIs=hh;Object.assign(hh,Lu);function xh(){re("createValidate")}G.createValidate=xh;Object.assign(xh,Uu);function bh(){re("createAssertEquals")}G.createAssertEquals=bh;Object.assign(bh,dp);function gh(){re("createEquals")}G.createEquals=gh;Object.assign(gh,lp);function Th(){re("createValidateEquals")}G.createValidateEquals=Th;Object.assign(Th,pp);function vh(){re("createIsParse")}G.createIsParse=vh;Object.assign(vh,cp);function wh(){re("createAssertParse")}G.createAssertParse=wh;Object.assign(wh,yp);function _h(){re("createValidateParse")}G.createValidateParse=_h;Object.assign(_h,fp);function kh(){re("createStringify")}G.createStringify=kh;Object.assign(kh,mp);function Ah(){re("createAssertStringify")}G.createAssertStringify=Ah;Object.assign(Ah,Vu);function Eh(){re("createIsStringify")}G.createIsStringify=Eh;Object.assign(Eh,ju);function Mh(){re("createValidateStringify")}G.createValidateStringify=Mh;Object.assign(Mh,Hu);function Ih(){re("createRandom")}G.createRandom=Ih;Object.assign(Ih,hp);function Ch(){re("createClone")}G.createClone=Ch;Object.assign(Ch,xp);function Sh(){re("createAssertClone")}G.createAssertClone=Sh;Object.assign(Sh,qu);function Rh(){re("createIsClone")}G.createIsClone=Rh;Object.assign(Rh,zu);function Ph(){re("createValidateClone")}G.createValidateClone=Ph;Object.assign(Ph,Gu);function Nh(){re("createPrune")}G.createPrune=Nh;Object.assign(Nh,bp);function Dh(){re("createAssertPrune")}G.createAssertPrune=Dh;Object.assign(Dh,Wu);function Oh(){re("createIsPrune")}G.createIsPrune=Oh;Object.assign(Oh,Ku);function Bh(){re("createValidatePrune")}G.createValidatePrune=Bh;Object.assign(Bh,Ju);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Lh=ae(An=>{"use strict";var Fh=An&&An.__createBinding||(Object.create?function(n,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,a,i)}:function(n,e,t,a){a===void 0&&(a=t),n[a]=e[t]}),v1=An&&An.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),w1=An&&An.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&Fh(e,n,t);return v1(e,n),e},_1=An&&An.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Fh(e,n,t)};Object.defineProperty(An,"__esModule",{value:!0});var k1=w1(gp());An.default=k1;_1(gp(),An)});var Hl={};Ji(Hl,{BaseContract:()=>xr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>Ti,FixedNumber:()=>ht,Signer:()=>Nt,VoidSigner:()=>ma,Wallet:()=>ln,Wordlist:()=>wn,constants:()=>gt,errors:()=>$t,getDefaultProvider:()=>lu,logger:()=>Lf,providers:()=>sa,utils:()=>te,version:()=>yu,wordlists:()=>wi});var cy=Cn(hd());var ny="logger/5.7.0";var ay=!1,iy=!1,eo={debug:1,default:2,info:2,warning:3,error:4,off:5},ry=eo.default,xd=null;function m6(){try{let n=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{n.push(e)}}),n.length)throw new Error("missing "+n.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(n){return n.message}return null}var sy=m6(),bd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(bd||(bd={}));var $t;(function(n){n.UNKNOWN_ERROR="UNKNOWN_ERROR",n.NOT_IMPLEMENTED="NOT_IMPLEMENTED",n.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",n.NETWORK_ERROR="NETWORK_ERROR",n.SERVER_ERROR="SERVER_ERROR",n.TIMEOUT="TIMEOUT",n.BUFFER_OVERRUN="BUFFER_OVERRUN",n.NUMERIC_FAULT="NUMERIC_FAULT",n.MISSING_NEW="MISSING_NEW",n.INVALID_ARGUMENT="INVALID_ARGUMENT",n.MISSING_ARGUMENT="MISSING_ARGUMENT",n.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",n.CALL_EXCEPTION="CALL_EXCEPTION",n.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",n.NONCE_EXPIRED="NONCE_EXPIRED",n.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",n.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",n.TRANSACTION_REPLACED="TRANSACTION_REPLACED",n.ACTION_REJECTED="ACTION_REJECTED"})($t||($t={}));var oy="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();eo[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ry>eo[a])&&console.log.apply(console,t)}debug(...e){this._log(E.levels.DEBUG,e)}info(...e){this._log(E.levels.INFO,e)}warn(...e){this._log(E.levels.WARNING,e)}makeError(e,t,a){if(iy)return this.makeError("censored error",t,{});t||(t=E.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let c="";for(let x=0;x>4],c+=oy[p[x]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(a[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case $t.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case $t.CALL_EXCEPTION:case $t.INSUFFICIENT_FUNDS:case $t.MISSING_NEW:case $t.NONCE_EXPIRED:case $t.REPLACEMENT_UNDERPRICED:case $t.TRANSACTION_REPLACED:case $t.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(a).forEach(function(l){o[l]=a[l]}),o}throwError(e,t,a){throw this.makeError(e,t,a)}throwArgumentError(e,t,a){return this.throwError(e,E.errors.INVALID_ARGUMENT,{argument:t,value:a})}assert(e,t,a,i){e||this.throwError(t,a,i)}assertArgument(e,t,a,i){e||this.throwArgumentError(t,a,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),sy&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:sy})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,E.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",E.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return xd||(xd=new E(ny)),xd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),ay){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}iy=!!e,ay=!!t}static setLogLevel(e){let t=eo[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ry=t}static from(e){return new E(e)}};E.errors=$t;E.levels=bd;var uy="bytes/5.7.0";var kt=new E(uy);function ly(n){return!!n.toHexString}function $i(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return $i(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function la(n){return ie(n)&&!(n.length%2)||cn(n)}function dy(n){return typeof n=="number"&&n==n&&n%1===0}function cn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!dy(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(n,e){if(e||(e={}),typeof n=="number"){kt.checkSafeUint53(n,"invalid arrayify value");let t=[];for(;n;)t.unshift(n&255),n=parseInt(String(n/256));return t.length===0&&t.push(0),$i(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ly(n)&&(n=n.toHexString()),ie(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":kt.throwArgumentError("hex data is odd-length","value",n));let a=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),a=new Uint8Array(t);return e.reduce((i,r)=>(a.set(r,i),i+r.length),0),$i(a)}function nn(n){let e=j(n);if(e.length===0)return e;let t=0;for(;te&&kt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(n,e-n.length),$i(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var gd="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){kt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=gd[n&15]+t,n=Math.floor(n/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof n=="bigint")return n=n.toString(16),n.length%2?"0x0"+n:"0x"+n;if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ly(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":kt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(cn(n)){let t="0x";for(let a=0;a>4]+gd[i&15]}return t}return kt.throwArgumentError("invalid hexlify value","value",n)}function Ft(n){if(typeof n!="string")n=W(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Se(n,e,t){return typeof n!="string"?n=W(n):(!ie(n)||n.length%2)&&kt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function Et(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function zn(n){let e=Td(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function Td(n){typeof n!="string"&&(n=W(n)),ie(n)||kt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&kt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Gn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(la(n)){let t=j(n);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):kt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:kt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=n.r,e.s=n.s,e.v=n.v,e.recoveryParam=n.recoveryParam,e._vs=n._vs,e._vs!=null){let i=li(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&kt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&kt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?kt.throwArgumentError("signature missing v and recoveryParam","signature",n):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&kt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?kt.throwArgumentError("signature missing or invalid r","signature",n):e.r=he(e.r,32),e.s==null||!ie(e.s)?kt.throwArgumentError("signature missing or invalid s","signature",n):e.s=he(e.s,32);let t=j(e.s);t[0]>=128&&kt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=W(t);e._vs&&(ie(e._vs)||kt.throwArgumentError("signature invalid _vs","signature",n),e._vs=he(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&kt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Wr(n){return n=Gn(n),W(ce([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var to="bignumber/5.7.0";var Kr=cy.default.BN,pa=new E(to),vd={},py=9007199254740991;function fy(n){return n!=null&&(F.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||ie(n)||typeof n=="bigint"||cn(n))}var yy=!1,F=class{constructor(e,t){e!==vd&&pa.throwError("cannot call constructor directly; use BigNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qt(ge(this).fromTwos(e))}toTwos(e){return Qt(ge(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Qt(ge(this).add(ge(e)))}sub(e){return Qt(ge(this).sub(ge(e)))}div(e){return F.from(e).isZero()&&fn("division-by-zero","div"),Qt(ge(this).div(ge(e)))}mul(e){return Qt(ge(this).mul(ge(e)))}mod(e){let t=ge(e);return t.isNeg()&&fn("division-by-zero","mod"),Qt(ge(this).umod(t))}pow(e){let t=ge(e);return t.isNeg()&&fn("negative-power","pow"),Qt(ge(this).pow(t))}and(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","and"),Qt(ge(this).and(t))}or(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","or"),Qt(ge(this).or(t))}xor(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&fn("unbound-bitwise-result","xor"),Qt(ge(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&fn("negative-width","mask"),Qt(ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&fn("negative-width","shl"),Qt(ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&fn("negative-width","shr"),Qt(ge(this).shrn(e))}eq(e){return ge(this).eq(ge(e))}lt(e){return ge(this).lt(ge(e))}lte(e){return ge(this).lte(ge(e))}gt(e){return ge(this).gt(ge(e))}gte(e){return ge(this).gte(ge(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ge(this).isZero()}toNumber(){try{return ge(this).toNumber()}catch{fn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return pa.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?yy||(yy=!0,pa.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?pa.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",E.errors.UNEXPECTED_ARGUMENT,{}):pa.throwError("BigNumber.toString does not accept parameters",E.errors.UNEXPECTED_ARGUMENT,{})),ge(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(vd,Jr(e)):e.match(/^-?[0-9]+$/)?new F(vd,Jr(new Kr(e))):pa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&fn("underflow","BigNumber.from",e),(e>=py||e<=-py)&&fn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(cn(t))return F.from(W(t));if(t)if(t.toHexString){let a=t.toHexString();if(typeof a=="string")return F.from(a)}else{let a=t._hex;if(a==null&&t.type==="BigNumber"&&(a=t.hex),typeof a=="string"&&(ie(a)||a[0]==="-"&&ie(a.substring(1))))return F.from(a)}return pa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Jr(n){if(typeof n!="string")return Jr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&pa.throwArgumentError("invalid hex","value",n),n=Jr(n),n==="0x00"?n:"-"+n;if(n.substring(0,2)!=="0x"&&(n="0x"+n),n==="0x")return"0x00";for(n.length%2&&(n="0x0"+n.substring(2));n.length>4&&n.substring(0,4)==="0x00";)n="0x"+n.substring(4);return n}function Qt(n){return F.from(Jr(n))}function ge(n){let e=F.from(n).toHexString();return e[0]==="-"?new Kr("-"+e.substring(3),16):new Kr(e.substring(2),16)}function fn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),pa.throwError(n,E.errors.NUMERIC_FAULT,a)}function wd(n){return new Kr(n,36).toString(16)}function _d(n){return new Kr(n,16).toString(36)}var Gt=new E(to),$r={},hy=F.from(0),xy=F.from(-1);function by(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Gt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Qr="0";for(;Qr.length<256;)Qr+=Qr;function kd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Qr.substring(0,n):Gt.throwArgumentError("invalid decimal size","decimals",n)}function Qi(n,e){e==null&&(e=0);let t=kd(e);n=F.from(n);let a=n.lt(hy);a&&(n=n.mul(xy));let i=n.mod(t).toString();for(;i.length2&&Gt.throwArgumentError("too many decimal points","value",n);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&by("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Gt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&Gt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Gt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ya($r,t,a,i)}},ht=class{constructor(e,t,a,i){e!==$r&&Gt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=a,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Gt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),a=mn(e._value,e.format.decimals);return ht.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),a=mn(e._value,e.format.decimals);return ht.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),a=mn(e._value,e.format.decimals);return ht.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=mn(this._value,this.format.decimals),a=mn(e._value,e.format.decimals);return ht.fromValue(t.mul(this.format._multiplier).div(a),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ht.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(my.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ht.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(my.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Gt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let a=ht.from("1"+Qr.substring(0,e),this.format),i=h6.toFormat(this.format);return this.mulUnsafe(a).addUnsafe(i).floor().divUnsafe(a)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Gt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return he(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ht.fromString(this._value,e)}static fromValue(e,t,a){return a==null&&t!=null&&!fy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ht.fromString(Qi(e,t),ya.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ya.from(t),i=mn(e,a.decimals);!a.signed&&i.lt(hy)&&by("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=he(r,a.width/8));let s=Qi(i,a.decimals);return new ht($r,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ya.from(t);if(j(e).length>a.width/8)throw new Error("overflow");let i=F.from(e);a.signed&&(i=i.fromTwos(a.width));let r=i.toTwos((a.signed?0:1)+a.width).toHexString(),s=Qi(i,a.decimals);return new ht($r,r,s,a)}static from(e,t){if(typeof e=="string")return ht.fromString(e,t);if(cn(e))return ht.fromBytes(e,t);try{return ht.fromValue(e,0,t)}catch(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return Gt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},my=ht.from(1),h6=ht.from("0.5");var gy="properties/5.7.0";var x6=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},no=new E(gy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function bt(n,e){for(let t=0;t<32;t++){if(n[e])return n[e];if(!n.prototype||typeof n.prototype!="object")break;n=Object.getPrototypeOf(n.prototype).constructor}return null}function Re(n){return x6(this,void 0,void 0,function*(){let e=Object.keys(n).map(a=>{let i=n[a];return Promise.resolve(i).then(r=>({key:a,value:r}))});return(yield Promise.all(e)).reduce((a,i)=>(a[i.key]=i.value,a),{})})}function Yi(n,e){(!n||typeof n!="object")&&no.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||no.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}function _e(n){let e={};for(let t in n)e[t]=n[t];return e}var b6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Ty(n){if(n==null||b6[typeof n])return!0;if(Array.isArray(n)||typeof n=="object"){if(!Object.isFrozen(n))return!1;let e=Object.keys(n);for(let t=0;txt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,xt(a))}return e}return no.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function xt(n){return g6(n)}var an=class{constructor(e){for(let t in e)this[t]=xt(e[t])}};var Wn="abi/5.7.0";var ve=new E(Wn),pi={},vy={calldata:!0,memory:!0,storage:!0},T6={calldata:!0,memory:!0};function ao(n,e){if(n==="bytes"||n==="string"){if(vy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&T6[e])return!0;return(vy[e]||e==="payable")&&ve.throwArgumentError("invalid modifier","name",e),!1}function v6(n,e){let t=n;function a(o){ve.throwArgumentError(`unexpected character at position ${o}`,"param",n)}n=n.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(a)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Te.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.format(e)).join(e===Te.full?", ":",")+")"):t+=this.type,e!==Te.sighash&&(this.indexed===!0&&(t+=" indexed"),e===Te.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?ft.fromString(e,t):ft.fromObject(e)}static fromObject(e){return ft.isParamType(e)?e:new ft(pi,{name:e.name||null,type:Xi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ft.fromObject):null})}static fromString(e,t){function a(i){return ft.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(v6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Yr(n,e){return k6(n).map(t=>ft.fromString(t,e))}var Kt=class{constructor(e,t){e!==pi&&ve.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),io(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Kt.isFragment(e)?e:typeof e=="string"?Kt.fromString(e):Kt.fromObject(e)}static fromObject(e){if(Kt.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Wt.fromObject(e);case"constructor":return Lt.fromObject(e);case"error":return rn.fromObject(e);case"fallback":case"receive":return null}return ve.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Wt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ut.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Lt.fromString(e.trim()):e.split(" ")[0]==="error"?rn.fromString(e.substring(5).trim()):ve.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Wt=class extends Kt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==Te.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===Te.full?", ":",")+") ",e!==Te.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Wt.fromString(e):Wt.fromObject(e)}static fromObject(e){if(Wt.isEventFragment(e))return e;e.type!=="event"&&ve.throwArgumentError("invalid event object","value",e);let t={name:Xr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ft.fromObject):[],type:"event"};return new Wt(pi,t)}static fromString(e){let t=e.match(Zr);t||ve.throwArgumentError("invalid event string","value",e);let a=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":a=!0;break;case"":break;default:ve.warn("unknown modifier: "+i)}}),Wt.fromObject({name:t[1].trim(),anonymous:a,inputs:Yr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function _y(n,e){e.gas=null;let t=n.split("@");return t.length!==1?(t.length>2&&ve.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||ve.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=F.from(t[1]),t[0]):n}function ky(n,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",n.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Ay(n){let e={constant:!1,payable:!0,stateMutability:"payable"};return n.stateMutability!=null?(e.stateMutability=n.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",n.constant!=null&&!!n.constant!==e.constant&&ve.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable=e.stateMutability==="payable",n.payable!=null&&!!n.payable!==e.payable&&ve.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",n)):n.payable!=null?(e.payable=!!n.payable,n.constant==null&&!e.payable&&n.type!=="constructor"&&ve.throwArgumentError("unable to determine stateMutability","value",n),e.constant=!!n.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ve.throwArgumentError("cannot have constant payable function","value",n)):n.constant!=null?(e.constant=!!n.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):n.type!=="constructor"&&ve.throwArgumentError("unable to determine stateMutability","value",n),e}var Lt=class extends Kt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});e===Te.sighash&&ve.throwError("cannot format a constructor for sighash",E.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(a=>a.format(e)).join(e===Te.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Lt.fromString(e):Lt.fromObject(e)}static fromObject(e){if(Lt.isConstructorFragment(e))return e;e.type!=="constructor"&&ve.throwArgumentError("invalid constructor object","value",e);let t=Ay(e);t.constant&&ve.throwArgumentError("constructor cannot be constant","value",e);let a={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ft.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Lt(pi,a)}static fromString(e){let t={type:"constructor"};e=_y(e,t);let a=e.match(Zr);return(!a||a[1].trim()!=="constructor")&&ve.throwArgumentError("invalid constructor string","value",e),t.inputs=Yr(a[2].trim(),!1),ky(a[3].trim(),t),Lt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ut=class extends Lt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==Te.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===Te.full?", ":",")+") ",e!==Te.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(a=>a.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;e.type!=="function"&&ve.throwArgumentError("invalid function object","value",e);let t=Ay(e),a={type:e.type,name:Xr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(ft.fromObject):[],outputs:e.outputs?e.outputs.map(ft.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ut(pi,a)}static fromString(e){let t={type:"function"};e=_y(e,t);let a=e.split(" returns ");a.length>2&&ve.throwArgumentError("invalid function string","value",e);let i=a[0].match(Zr);if(i||ve.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Xr(t.name),t.inputs=Yr(i[2],!1),ky(i[3].trim(),t),a.length>1){let r=a[1].match(Zr);(r[1].trim()!=""||r[3].trim()!="")&&ve.throwArgumentError("unexpected tokens","value",e),t.outputs=Yr(r[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function wy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ve.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}var rn=class extends Kt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==Te.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===Te.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?rn.fromString(e):rn.fromObject(e)}static fromObject(e){if(rn.isErrorFragment(e))return e;e.type!=="error"&&ve.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Xr(e.name),inputs:e.inputs?e.inputs.map(ft.fromObject):[]};return wy(new rn(pi,t))}static fromString(e){let t={type:"error"},a=e.match(Zr);return a||ve.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Xr(t.name),t.inputs=Yr(a[2],!1),wy(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Xi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var _6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Xr(n){return(!n||!n.match(_6))&&ve.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Zr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function k6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&Ad.throwError("value out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ce([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ci=class{constructor(e,t,a,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",a),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let a=e.match("^u?int([0-9]+)$");return a&&parseInt(a[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ci.coerce(e,t)}_peekBytes(e,t,a){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&a&&this._offset+t<=this._data.length?i=t:Ad.throwError("data out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new ci(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var My=Cn(Ey());function fe(n){return"0x"+My.default.keccak_256(j(n))}var so={};Ji(so,{decode:()=>es,encode:()=>ca});var Iy="rlp/5.7.0";var Kn=new E(Iy);function Cy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Sy(n,e,t){let a=0;for(let i=0;ie+1+a&&Kn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ny(n,e){if(n.length===0&&Kn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Kn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Sy(n,e+1,t);return e+1+t+a>n.length&&Kn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ry(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ry(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Sy(n,e+1,t);e+1+t+a>n.length&&Kn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=W(n.slice(e+1+t,e+1+t+a));return{consumed:1+t+a,result:i}}else if(n[e]>=128){let t=n[e]-128;e+1+t>n.length&&Kn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=W(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:W(n[e])}}function es(n){let e=j(n),t=Ny(e,0);return t.consumed!==e.length&&Kn.throwArgumentError("invalid rlp data","data",n),t.result}var Dy="address/5.7.0";var Na=new E(Dy);function Oy(n){ie(n,20)||Na.throwArgumentError("invalid address","address",n),n=n.toLowerCase();let e=n.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let a=j(fe(t));for(let i=0;i<40;i+=2)a[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(a[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var A6=9007199254740991;function E6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var Ed={};for(let n=0;n<10;n++)Ed[String(n)]=String(n);for(let n=0;n<26;n++)Ed[String.fromCharCode(65+n)]=String(10+n);var By=Math.floor(E6(A6));function Fy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>Ed[a]).join("");for(;e.length>=By;){let a=e.substring(0,By);e=parseInt(a,10)%97+e.substring(a.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function me(n){let e=null;if(typeof n!="string"&&Na.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Oy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Na.throwArgumentError("bad address checksum","address",n);else if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(n.substring(2,4)!==Fy(n)&&Na.throwArgumentError("bad icap checksum","address",n),e=wd(n.substring(4));e.length<40;)e="0"+e;e=Oy("0x"+e)}else Na.throwArgumentError("invalid address","address",n);return e}function Ly(n){try{return me(n),!0}catch{}return!1}function Uy(n){let e=_d(me(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Fy("XE00"+e)+e}function fi(n){let e=null;try{e=me(n.from)}catch{Na.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return me(Se(fe(ca([e,t])),12))}function Vy(n,e,t){return Ft(e)!==32&&Na.throwArgumentError("salt must be 32 bytes","salt",e),Ft(t)!==32&&Na.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),me(Se(fe(ce(["0xff",me(n),e,t])),12))}var oo=class extends Mt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=me(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return me(he(e.readValue().toHexString(),20))}};var uo=class extends Mt{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var er=new E(Wn);function Md(n,e,t){let a=null;if(Array.isArray(t))a=t;else if(t&&typeof t=="object"){let l={};a=e.map(p=>{let c=p.localName;return c||er.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[c]&&er.throwError("cannot encode object for signature with duplicate names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[c]=!0,t[c]})}else er.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&er.throwArgumentError("types/value length mismatch","tuple",t);let i=new yi(n.wordSize),r=new yi(n.wordSize),s=[];e.forEach((l,p)=>{let c=a[p];if(l.dynamic){let x=r.length;l.encode(r,c);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,c)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Id(n,e){let t=[],a=n.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=n.readValue(),l=a.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===E.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(n)}catch(o){if(o.code===E.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var lo=class extends Mt{constructor(e,t,a){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,a,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let a=0;ae._data.length&&er.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;imo,EtherSymbol:()=>Gy,HashZero:()=>nr,MaxInt256:()=>zy,MaxUint256:()=>bo,MinInt256:()=>qy,NegativeOne:()=>ho,One:()=>xo,Two:()=>jy,WeiPerEther:()=>Hy,Zero:()=>tr});var mo="0x0000000000000000000000000000000000000000";var ho=F.from(-1),tr=F.from(0),xo=F.from(1),jy=F.from(2),Hy=F.from("1000000000000000000"),bo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),qy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),zy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var nr="0x0000000000000000000000000000000000000000000000000000000000000000";var Gy="\u039E";var go=class extends Mt{constructor(e,t,a){let i=(t?"int":"uint")+e*8;super(i,i,a,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let a=F.from(t),i=bo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(xo).mul(ho)))&&this._throwError("value out-of-bounds",t)}else(a.lt(tr)||a.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return a=a.toTwos(this.size*8).mask(this.size*8),this.signed&&(a=a.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(a)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Wy="strings/5.7.0";var Ky=new E(Wy),Jt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Jt||(Jt={}));var Vt;(function(n){n.UNEXPECTED_CONTINUE="unexpected continuation byte",n.BAD_PREFIX="bad codepoint prefix",n.OVERRUN="string overrun",n.MISSING_CONTINUE="missing continuation byte",n.OUT_OF_RANGE="out of UTF-8 range",n.UTF16_SURROGATE="UTF-16 surrogate",n.OVERLONG="overlong representation"})(Vt||(Vt={}));function M6(n,e,t,a,i){return Ky.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Jy(n,e,t,a,i){if(n===Vt.BAD_PREFIX||n===Vt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Vt.OVERRUN?t.length-e-1:0}function I6(n,e,t,a,i){return n===Vt.OVERLONG?(a.push(i),0):(a.push(65533),Jy(n,e,t,a,i))}var To=Object.freeze({error:M6,ignore:Jy,replace:I6});function Sd(n,e){e==null&&(e=To.error),n=j(n);let t=[],a=0;for(;a>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?a+=e(Vt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Vt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Vt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Vt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Vt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Vt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function we(n,e=Jt.current){e!=Jt.current&&(Ky.checkNormalize(),n=n.normalize(e));let t=[];for(let a=0;a>6|192),t.push(i&63|128);else if((i&64512)==55296){a++;let r=n.charCodeAt(a);if(a>=n.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function Cd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Rd(n,e){return'"'+Sd(n,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Cd(t):(t-=65536,Cd((t>>10&1023)+55296)+Cd((t&1023)+56320))}).join("")+'"'}function vo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Yt(n,e){return vo(Sd(n,e))}function Da(n,e=Jt.current){return Sd(we(n,e))}function Pd(n){let e=we(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ce([e,nr]).slice(0,32))}function Nd(n){let e=j(n);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Yt(e.slice(0,t))}function C6(n){if(n.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),a[t]=e(r[1])}),a}function $y(n){let e=0;return n.split(",").map(t=>{let a=t.split("-");a.length===1?a[1]="0":a[1]===""&&(a[1]="1");let i=e+parseInt(a[0],16);return e=parseInt(a[1],16),{l:i,h:e}})}function Od(n,e){let t=0;for(let a=0;a=t&&n<=t+i.h&&(n-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(n-t)!==-1)continue;return i}}return null}var S6=$y("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),R6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),P6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],N6=Dd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),D6=Dd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),O6=Dd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",C6),B6=$y("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function F6(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function L6(n){return!!Od(n,S6)}function U6(n){let e=Od(n,P6);if(e)return[n+e.s];let t=N6[n];if(t)return t;let a=D6[n];if(a)return[n+a[0]];let i=O6[n];return i||null}function V6(n){return!!Od(n,B6)}function Bd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Da(n);e=F6(e.map(a=>{if(R6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=U6(a);return i||[a]})),e=Da(vo(e),Jt.NFKC),e.forEach(a=>{if(V6(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(L6(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=vo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var wo=class extends ts{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,we(t))}decode(e){return Yt(super.decode(e))}};var mi=class extends Mt{constructor(e,t){let a=!1,i=[];e.forEach(s=>{s.dynamic&&(a=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,a),this.coders=e}defaultValue(){let e=[];this.coders.forEach(a=>{e.push(a.defaultValue())});let t=this.coders.reduce((a,i)=>{let r=i.localName;return r&&(a[r]||(a[r]=0),a[r]++),a},{});return this.coders.forEach((a,i)=>{let r=a.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return Md(e,this.coders,t)}decode(e){return e.coerce(this.name,Id(e,this.coders))}};var _o=new E(Wn),j6=new RegExp(/^bytes([0-9]*)$/),H6=new RegExp(/^(u?int)([0-9]*)$/),ar=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new oo(e.name);case"bool":return new po(e.name);case"string":return new wo(e.name);case"bytes":return new yo(e.name);case"array":return new lo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new mi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new fo(e.name)}let t=e.type.match(H6);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&_o.throwArgumentError("invalid "+t[1]+" bit length","param",e),new go(a/8,t[1]==="int",e.name)}if(t=e.type.match(j6),t){let a=parseInt(t[1]);return(a===0||a>32)&&_o.throwArgumentError("invalid bytes length","param",e),new co(a,e.name)}return _o.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ci(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new yi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(ft.from(i)));return new mi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&_o.throwError("types/values length mismatch",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(ft.from(s))),i=new mi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(ft.from(s)));return new mi(i,"_").decode(this._getReader(j(t),a))}},ns=new ar;function sn(n){return fe(we(n))}var ko="hash/5.7.0";var Fd={};Ji(Fd,{decode:()=>ir,encode:()=>rr});function ir(n){n=atob(n);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(n,e),t}function q6(n){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let M=a-4;return O.map(J=>{switch(J-M){case 3:return M+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return M+256+(n[o++]<<8|n[o++]);case 1:return M+n[o++];default:return J-1}})}function G6(n){let e=0;return()=>n[e++]}function Xy(n){return G6(z6(n))}function W6(n){return n&1?~n>>1:n>>1}function K6(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Zy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Q6(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Y6(t,n))}return q6(Yy(e))}function $6(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function e0(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function Q6(n,e){let t=1+e(),a=e(),i=$6(e),r=e0(i.length,1+n,e);return Yy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((c,x)=>{let C=x*a;return[l+x*t,p.map(_=>_+C)]})}))}function Y6(n,e){let t=1+e();return e0(t,1+n,e).map(i=>[i[0],i.slice(1)])}function t0(n){let e=as(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=as(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,c)=>c.set.size-p.set.size);let i=n(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:a,valid:r,fe0f:s,save:o,check:l}}}function n0(){return Xy(ir("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var Ao=n0(),X6=new Set(as(Ao)),Z6=new Set(as(Ao)),e2=Zy(Ao),t2=t0(Ao),a0=45,i0=95;function r0(n){return Da(n)}function n2(n){return n.filter(e=>e!=65039)}function s0(n){for(let e of n.split(".")){let t=r0(e);try{for(let a=t.lastIndexOf(i0)-1;a>=0;a--)if(t[a]!==i0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===a0&&t[3]===a0)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function o0(n){return s0(a2(n,n2))}function a2(n,e){let t=r0(n).reverse(),a=[];for(;t.length;){let i=r2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(X6.has(r)){a.push(r);continue}if(Z6.has(r))continue;let s=e2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return s0(i2(String.fromCodePoint(...a)))}function i2(n){return n.normalize("NFC")}function r2(n,e){var t;let a=t2,i,r,s=[],o=n.length;for(e&&(e.length=0);o;){let l=n[--o];if(a=(t=a.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!a)break;if(a.save)r=l;else if(a.check&&l===r)break;s.push(l),a.fe0f&&(s.push(65039),o>0&&n[o-1]==65039&&o--),a.valid&&(i=s.slice(),a.valid==2&&i.splice(1,1),e&&e.push(...n.slice(o).reverse()),n.length=o)}return i}var s2=new E(ko),d0=new Uint8Array(32);d0.fill(0);function u0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ld(n){let e=we(o0(n)),t=[];if(n.length===0)return t;let a=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(u0(e.slice(a))),t}function Ud(n){try{return Ld(n).length!==0}catch{}return!1}function Oa(n){typeof n!="string"&&s2.throwArgumentError("invalid ENS name; not a string","name",n);let e=d0,t=Ld(n);for(;t.length;)e=fe(ce([e,fe(t.pop())]));return W(e)}function is(n){return W(ce(Ld(n).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var l0=`Ethereum Signed Message: +`;function sr(n){return typeof n=="string"&&(n=we(n)),fe(ce([we(l0),we(String(n.length)),n]))}var o2=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Tt=new E(ko),f0=new Uint8Array(32);f0.fill(0);var u2=F.from(-1),m0=F.from(0),h0=F.from(1),d2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function l2(n){let e=j(n),t=e.length%32;return t?Et([e,f0.slice(t)]):W(e)}var p2=he(h0.toHexString(),32),y2=he(m0.toHexString(),32),p0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Vd=["name","version","chainId","verifyingContract","salt"];function y0(n){return function(e){return typeof e!="string"&&Tt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var c2={name:y0("name"),version:y0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return Tt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return me(n).toLowerCase()}catch{}return Tt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{let e=j(n);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return Tt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function jd(n){{let e=n.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",a=parseInt(e[2]||"256");(a%8!==0||a>256||e[2]&&e[2]!==String(a))&&Tt.throwArgumentError("invalid numeric width","type",n);let i=d2.mask(t?a-1:a),r=t?i.add(h0).mul(u2):m0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&Tt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),he(o.toTwos(256).toHexString(),32)}}}{let e=n.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&Tt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&Tt.throwArgumentError(`invalid length for ${n}`,"value",a),l2(a)}}}switch(n){case"address":return function(e){return he(me(e),32)};case"bool":return function(e){return e?p2:y2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function c0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var vt=class{constructor(e){B(this,"types",Object.freeze(xt(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},a={},i={};Object.keys(e).forEach(o=>{t[o]={},a[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&Tt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&Tt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!jd(c)&&(a[c]||Tt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),a[c].push(o),t[o][c]=!0)})}let r=Object.keys(a).filter(o=>a[o].length===0);r.length===0?Tt.throwArgumentError("missing primary type","types",e):r.length>1&&Tt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&Tt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!a[p]||(s(p,l),Object.keys(l).forEach(c=>{i[c][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=c0(o,e[o])+l.map(p=>c0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=jd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&Tt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(Et(l))}}let a=this.types[e];if(a){let i=sn(this._types[e]);return r=>{let s=a.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),Et(s)}}return Tt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||Tt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,a){if(jd(e))return a(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&Tt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,a))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],a),s),{}):Tt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new vt(e)}static getPrimaryType(e){return vt.from(e).primaryType}static hashStruct(e,t,a){return vt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=p0[a];i||Tt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Vd.indexOf(a.name)-Vd.indexOf(i.name)),vt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return Et(["0x1901",vt.hashDomain(e),vt.from(t).hash(a)])}static hash(e,t,a){return fe(vt.encode(e,t,a))}static resolveNames(e,t,a,i){return o2(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=vt.from(t);s.visit(a,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){vt.hashDomain(e);let i={},r=[];Vd.forEach(l=>{let p=e[l];p!=null&&(i[l]=c2[l](p),r.push({name:l,type:p0[l]}))});let s=vt.from(t),o=_e(t);return o.EIP712Domain?Tt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(a),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(a,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&Tt.throwArgumentError("invalid string","value",p),p}return Tt.throwArgumentError("unsupported type","type",l)})}}};var wt=new E(Wn);var or=class extends an{},ur=class extends an{},Hd=class extends an{},fa=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},f2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function x0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}var Ba=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(a=>Kt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",bt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(a=>{let i=null;switch(a.type){case"constructor":if(this.deploy){wt.warn("duplicate definition - constructor");return}B(this,"deploy",a);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=a.format();if(i[r]){wt.warn("duplicate definition - "+r);return}i[r]=a}),this.deploy||B(this,"deploy",Lt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=Te.full),e===Te.sighash&&wt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(a=>a.format(e));return e===Te.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return ns}static getAddress(e){return me(e)}static getSighash(e){return Se(sn(e.format()),0,4)}static getEventTopic(e){return sn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];wt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===a);return i.length===0?wt.throwArgumentError("no matching function","name",a):i.length>1&&wt.throwArgumentError("multiple matching functions","name",a),this.functions[i[0]]}let t=this.functions[Ut.fromString(e).format()];return t||wt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];wt.throwArgumentError("no matching event","topichash",a)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===a);return i.length===0?wt.throwArgumentError("no matching event","name",a):i.length>1&&wt.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[Wt.fromString(e).format()];return t||wt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let a=bt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}wt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===a);return i.length===0?wt.throwArgumentError("no matching error","name",a):i.length>1&&wt.throwArgumentError("multiple matching errors","name",a),this.errors[i[0]]}let t=this.errors[Ut.fromString(e).format()];return t||wt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return bt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),bt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&wt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(a)),this._decodeParams(e.inputs,a.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ce([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&wt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(a)),this._decodeParams(e.inputs,a.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ce([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let a=j(t),i=null,r="",s=null,o=null,l=null;switch(a.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,a)}catch{}break;case 4:{let p=W(a.slice(0,4)),c=f2[p];if(c)s=this._abiCoder.decode(c.inputs,a.slice(4)),o=c.name,l=c.signature,c.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,a.slice(4)),o=x.name,l=x.format()}catch{}break}}return wt.throwError("call revert exception"+r,E.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&wt.throwError("too many arguments for "+e.format(),E.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let a=[];e.anonymous||a.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?sn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),he(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&&wt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?a.push(null):o.baseType==="array"||o.baseType==="tuple"?wt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?a.push(r.map(l=>i(o,l))):a.push(i(o,r))});a.length&&a[a.length-1]===null;)a.pop();return a}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let a=[],i=[],r=[];return e.anonymous||a.push(this.getEventTopic(e)),t.length!==e.inputs.length&&wt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")a.push(sn(l));else if(s.type==="bytes")a.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");a.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:a}}decodeEventLog(e,t,a){if(typeof e=="string"&&(e=this.getEvent(e)),a!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==C)&&wt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(ft.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ce(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],c=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new fa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new fa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[c++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw x0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw x0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ur({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new or({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Hd({args:this._abiCoder.decode(a.inputs,"0x"+t.substring(10)),errorFragment:a,name:a.name,signature:a.format(),sighash:this.getSighash(a)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var b0="abstract-provider/5.7.0";var m2=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},h2=new E(b0),Eo=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){h2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return m2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Re({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),a=null,i=null,r=null;return e&&e.baseFeePerGas&&(a=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:a,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var g0="abstract-signer/5.7.0";var Sn=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hn=new E(g0),x2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],b2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Nt=class{constructor(){hn.checkAbstract(new.target,Nt),B(this,"_isSigner",!0)}getBalance(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Sn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Re(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Sn(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Re(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return Sn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),a=yield this.signTransaction(t);return yield this.provider.sendTransaction(a)})}getChainId(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Sn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Sn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)x2.indexOf(a)===-1&&hn.throwArgumentError("invalid transaction key: "+a,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&hn.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return Sn(this,void 0,void 0,function*(){let t=yield Re(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Sn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&hn.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?hn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&hn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(a&&hn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):hn.throwError("failed to get consistent fee data",E.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(b2.indexOf(i.code)>=0)throw i;return hn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&hn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Re(t)})}_checkProvider(e){this.provider||hn.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ma=class extends Nt{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{hn.throwError(e,E.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ma(this.address,e)}};var pe=Cn(hd()),ea=Cn(Xd());function hr(n,e,t){return t={path:e,exports:{},require:function(a,i){return j5(a,i??t.path)}},n(t,t.exports),t.exports}function j5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var nl=ac;function ac(n,e){if(!n)throw new Error(e||"Assertion failed")}ac.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Dn=hr(function(n,e){"use strict";var t=e;function a(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=c&255;x?l.push(x,C):l.push(C)}return l}t.toArray=a;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var c=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return c}t.getJSF=i;function r(l,p,c){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=c.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),Ro=on.getNAF,H5=on.getJSF,Po=on.assert;function Ua(n,e){this.type=n,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var xi=Ua;Ua.prototype.point=function(){throw new Error("Not implemented")};Ua.prototype.validate=function(){throw new Error("Not implemented")};Ua.prototype._fixedNafMul=function(e,t){Po(e.precomputed);var a=e._getDoubles(),i=Ro(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var c=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var c=s[l];Po(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(r[c-1>>1]):o=o.mixedAdd(r[-c-1>>1].neg()):c>0?o=o.add(r[c-1>>1]):o=o.add(r[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Ua.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,c,x,C;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){l[v]=Ro(a[v],s[v],this._bitLength),l[S]=Ro(a[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=H5(a[v],a[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;c--){for(var de=0;c>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),c<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};bn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],i=this,r=0;r=0&&(_=p,v=c),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};gn.prototype._endoSplit=function(e){var t=this.endo.basis,a=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=a.b.neg().mul(e).divRound(this.n),o=r.mul(a.a),l=s.mul(i.a),p=r.mul(a.b),c=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(c).neg();return{k1:x,k2:C}};gn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var a=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=a.redSqrt();if(i.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};gn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,a=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return a.redSqr().redISub(r).cmpn(0)===0};gn.prototype._endoWnafMulAdd=function(e,t,a){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Ct.prototype.isInfinity=function(){return this.inf};Ct.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var a=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,i)};Ct.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,a=this.x.redSqr(),i=e.redInvm(),r=a.redAdd(a).redIAdd(a).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Ct.prototype.getX=function(){return this.x.fromRed()};Ct.prototype.getY=function(){return this.y.fromRed()};Ct.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Ct.prototype.mulAdd=function(e,t,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Ct.prototype.jmulAdd=function(e,t,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Ct.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Ct.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var a=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(i)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(i)}}}return t};Ct.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Ot(n,e,t,a){xi.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&a===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}al(Ot,xi.BasePoint);gn.prototype.jpoint=function(e,t,a){return new Ot(this,e,t,a)};Ot.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),a=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(a,i)};Ot.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Ot.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),a=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(a),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(a.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),x=c.redMul(l),C=i.redMul(c),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Ot.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=a.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),x=a.redMul(p),C=l.redSqr().redIAdd(c).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Ot.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Ot.prototype.inspect=function(){return this.isInfinity()?"":""};Ot.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Co=hr(function(n,e){"use strict";var t=e;t.base=xi,t.short=z5,t.mont=null,t.edwards=null}),So=hr(function(n,e){"use strict";var t=e,a=on.assert;function i(o){o.type==="short"?this.curve=new Co.short(o):o.type==="edwards"?this.curve=new Co.edwards(o):this.curve=new Co.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:ea.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:ea.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:ea.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:ea.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:ea.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ea.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ea.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:ea.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function La(n){if(!(this instanceof La))return new La(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Dn.toArray(n.entropy,n.entropyEnc||"hex"),t=Dn.toArray(n.nonce,n.nonceEnc||"hex"),a=Dn.toArray(n.pers,n.persEnc||"hex");nl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var ic=La;La.prototype._init=function(e,t,a){var i=e.concat(t).concat(a);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(a||[])),this._reseed=1};La.prototype.generate=function(e,t,a,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=a,a=t,t=null),a&&(a=Dn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var G5=on.assert;function No(n,e){if(n instanceof No)return n;this._importDER(n,e)||(G5(n.r&&n.s,"Signature without r or s"),this.r=new pe.default(n.r,16),this.s=new pe.default(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var Do=No;function W5(){this.place=0}function Zd(n,e){var t=n[e.place++];if(!(t&128))return t;var a=t&15;if(a===0||a>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function nc(n){for(var e=0,t=n.length-1;!n[e]&&!(n[e+1]&128)&&e>>3);for(n.push(t|128);--t;)n.push(e>>>(t<<3)&255);n.push(e)}No.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),a[0]&128&&(a=[0].concat(a)),t=nc(t),a=nc(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];el(i,t.length),i=i.concat(t),i.push(2),el(i,a.length);var r=i.concat(a),s=[48];return el(s,r.length),s=s.concat(r),on.encode(s,e)};var K5=function(){throw new Error("unsupported")},rc=on.assert;function xn(n){if(!(this instanceof xn))return new xn(n);typeof n=="string"&&(rc(Object.prototype.hasOwnProperty.call(So,n),"Unknown curve "+n),n=So[n]),n instanceof So.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var J5=xn;xn.prototype.keyPair=function(e){return new il(this,e)};xn.prototype.keyFromPrivate=function(e,t){return il.fromPrivate(this,e,t)};xn.prototype.keyFromPublic=function(e,t){return il.fromPublic(this,e,t)};xn.prototype.genKeyPair=function(e){e||(e={});for(var t=new ic({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(a));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};xn.prototype._truncateToN=function(e,t){var a=e.byteLength()*8-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};xn.prototype.sign=function(e,t,a,i){typeof a=="object"&&(i=a,a=null),i||(i={}),t=this.keyFromPrivate(t,a),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new ic({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var x=i.k?i.k(c):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Do({r:v,s:S,recoveryParam:L})}}}}}};xn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new Do(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,a.getPublic(),p),c.isInfinity()?!1:c.eqXToP(r)):(c=this.g.mulAdd(l,a.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(r)===0)};xn.prototype.recoverPubKey=function(n,e,t,a){rc((3&t)===t,"The recovery param is more than two bits"),e=new Do(e,a);var i=this.n,r=new pe.default(n),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var c=e.r.invm(i),x=i.sub(r).mul(c).umod(i),C=o.mul(c).umod(i);return this.g.mulAdd(x,s,C)};xn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Do(e,a),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(n,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var $5=hr(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=on,t.rand=function(){throw new Error("unsupported")},t.curve=Co,t.curves=So,t.ec=J5,t.eddsa=null}),sc=$5.ec;var oc="signing-key/5.7.0";var sl=new E(oc),rl=null;function ta(){return rl||(rl=new sc("secp256k1")),rl}var Tn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&sl.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=ta().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=ta().keyFromPublic(j(this.publicKey)),a=ta().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=ta().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&sl.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{canonical:!0});return Gn({recoveryParam:i.recoveryParam,r:he("0x"+i.r.toString(16),32),s:he("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=ta().keyFromPrivate(j(this.privateKey)),a=ta().keyFromPublic(j(os(e)));return he("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Oo(n,e){let t=Gn(e),a={r:j(t.r),s:j(t.s)};return"0x"+ta().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function os(n,e){let t=j(n);if(t.length===32){let a=new Tn(t);return e?"0x"+ta().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?W(t):"0x"+ta().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+ta().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return sl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var uc="transactions/5.7.0";var qt=new E(uc),Bo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Bo||(Bo={}));function ul(n){return n==="0x"?null:me(n)}function Ht(n){return n==="0x"?tr:F.from(n)}var Q5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Y5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function vn(n){let e=os(n);return me(Se(fe(Se(e,1)),12))}function bi(n,e){return vn(Oo(j(n),e))}function un(n,e){let t=nn(F.from(n).toHexString());return t.length>32&&qt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function ol(n,e){return{address:me(n),storageKeys:(e||[]).map((t,a)=>(Ft(t)!==32&&qt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function dn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&qt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),ol(t[0],t[1])):ol(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return ol(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function dc(n){return dn(n).map(e=>[e.address,e.storageKeys])}function lc(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||qt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[un(n.chainId||0,"chainId"),un(n.nonce||0,"nonce"),un(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(n.maxFeePerGas||0,"maxFeePerGas"),un(n.gasLimit||0,"gasLimit"),n.to!=null?me(n.to):"0x",un(n.value||0,"value"),n.data||"0x",dc(n.accessList||[])];if(e){let a=Gn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return Et(["0x02",ca(t)])}function pc(n,e){let t=[un(n.chainId||0,"chainId"),un(n.nonce||0,"nonce"),un(n.gasPrice||0,"gasPrice"),un(n.gasLimit||0,"gasLimit"),n.to!=null?me(n.to):"0x",un(n.value||0,"value"),n.data||"0x",dc(n.accessList||[])];if(e){let a=Gn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return Et(["0x01",ca(t)])}function X5(n,e){Yi(n,Y5);let t=[];Q5.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&qt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=nn(o),o.length>s.maxLength&&qt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&qt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!la(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(W(a)),t.push("0x"),t.push("0x")),!e)return ca(t);let i=Gn(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&qt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&qt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(nn(j(i.r))),t.push(nn(j(i.s))),ca(t)}function us(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&qt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),X5(n,e);switch(n.type){case 1:return pc(n,e);case 2:return lc(n,e);default:break}return qt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function yc(n,e,t){try{let a=Ht(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{qt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=he(e[1],32),n.s=he(e[2],32);try{let a=fe(t(n));n.from=bi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Z5(n){let e=es(n.slice(1));e.length!==9&&e.length!==12&&qt.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=Ht(e[2]),a=Ht(e[3]),i={type:2,chainId:Ht(e[0]).toNumber(),nonce:Ht(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ht(e[4]),to:ul(e[5]),value:Ht(e[6]),data:e[7],accessList:dn(e[8])};return e.length===9||(i.hash=fe(n),yc(i,e.slice(9),lc)),i}function ex(n){let e=es(n.slice(1));e.length!==8&&e.length!==11&&qt.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));let t={type:1,chainId:Ht(e[0]).toNumber(),nonce:Ht(e[1]).toNumber(),gasPrice:Ht(e[2]),gasLimit:Ht(e[3]),to:ul(e[4]),value:Ht(e[5]),data:e[6],accessList:dn(e[7])};return e.length===8||(t.hash=fe(n),yc(t,e.slice(8),pc)),t}function tx(n){let e=es(n);e.length!==9&&e.length!==6&&qt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ht(e[0]).toNumber(),gasPrice:Ht(e[1]),gasLimit:Ht(e[2]),to:ul(e[3]),value:Ht(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=he(e[7],32),t.s=he(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(ca(i));try{t.from=bi(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Fo(n){let e=j(n);if(e[0]>127)return tx(e);switch(e[0]){case 1:return ex(e);case 2:return Z5(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var cc="contracts/5.7.0";var Va=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Pe=new E(cc),nx={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Lo(n,e){return Va(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Pe.throwArgumentError("invalid address or ENS name","name",t);try{return me(t)}catch{}n||Pe.throwError("a provider or signer is needed to resolve ENS names",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Pe.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function ds(n,e,t){return Va(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>ds(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Lo(n,e):t.type==="tuple"?yield ds(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>ds(n,a,t.arrayChildren))):Promise.reject(Pe.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function jo(n,e,t){return Va(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=_e(t.pop())),Pe.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Re({override:Lo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>Va(this,void 0,void 0,function*(){return me(p.signer)!==p.override&&Pe.throwError("Contract with a Signer cannot override from",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=Lo(n.provider,a.from));let i=yield Re({args:ds(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Re(a)||{}}),r=n.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=dn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=j(r);for(let x=0;xa[p]!=null);return l.length&&Pe.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,E.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function ax(n,e){return function(...t){return jo(n,e,t)}}function ix(n,e){let t=n.signer||n.provider;return function(...a){return Va(this,void 0,void 0,function*(){t||Pe.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield jo(n,e,a);return yield t.estimateGas(i)})}}function mc(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=xt(r),o=null;try{o=n.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>n.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>n.provider,s.getBlock=()=>n.provider.getBlock(i.blockHash),s.getTransaction=()=>n.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function hc(n,e,t){let a=n.signer||n.provider;return function(...i){return Va(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}n.deployTransaction!=null&&(yield n._deployed(r));let s=yield jo(n,e,i),o=yield a.call(s,r);try{let l=n.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===E.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function rx(n,e){return function(...t){return Va(this,void 0,void 0,function*(){n.signer||Pe.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield jo(n,e,t),i=yield n.signer.sendTransaction(a);return mc(n,i),i})}}function fc(n,e,t){return e.constant?hc(n,e,t):rx(n,e)}function xc(n){return n.address&&(n.topics==null||n.topics.length===0)?"*":(n.address||"*")+"@"+(n.topics?n.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var gi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(a=>t||a.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(a=>{let i=e.slice();return setTimeout(()=>{a.listener.apply(this,i)},0),!a.once}),t}prepareEvent(e){}getEmit(e){return[e]}},dl=class extends gi{constructor(){super("error",null)}},Uo=class extends gi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Pe.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(xc(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",a)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,a)=>this.interface.decodeEventLog(this.fragment,t,a);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Zi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Vo=class extends gi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},xr=class{constructor(e,t,a){B(this,"interface",bt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):Nt.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):Xt.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Pe.throwArgumentError("invalid signer or provider","signerOrProvider",a),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Pe.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Pe.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Lo(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(me(e)))}catch{Pe.throwError("provider is required to use ENS name as contract address",E.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Pe.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,fc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,fc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,hc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,ax(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,ix(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return fi(e)}static getInterface(e){return Ba.isInterface(e)?e:new Ba(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Pe.throwError("contract not deployed",E.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Pe.throwError("sending a transactions require a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Pe.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ma(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return fa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new dl);if(e==="event")return this._normalizeRunningEvent(new gi("event",null));if(e==="*")return this._normalizeRunningEvent(new Vo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Uo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);return this._normalizeRunningEvent(new Uo(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new gi(xc(t),t))}return this._normalizeRunningEvent(new Vo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,a){let i=xt(t);return i.removeListener=()=>{!a||(e.removeListener(a),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,a){if(this.provider||Pe.throwError("events require a provider or a signer with a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,a),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,a){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Pe.throwArgumentError("cannot specify toBlock with blockhash","toBlock",a),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=a??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let a=this._getRunningEvent(e),i=a.run(t)>0;return this._checkRunningEvents(a),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,a)=>t+this._runningEvents[a].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let a in this._runningEvents)this._runningEvents[a].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let a in this._runningEvents){let i=this._runningEvents[a];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let a=this._getRunningEvent(e);return a.removeListener(t),this._checkRunningEvents(a),this}removeListener(e,t){return this.off(e,t)}},oe=class extends xr{},Ti=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:cn(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Pe.throwArgumentError("invalid bytecode","bytecode",t),a&&!Nt.isSigner(a)&&Pe.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",bt(new.target,"getInterface")(e)),B(this,"signer",a||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let a in t)if(!nx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Pe.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Pe.throwError("non-payable constructor cannot override value",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Pe.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ce([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Va(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Pe.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let a=yield ds(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=bt(this.constructor,"getContractAddress")(r),o=bt(this.constructor,"getContract")(s,this.interface,this.signer);return mc(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Pe.throwError("missing compiler output",E.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let a=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(a,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return fi(e)}static getContract(e,t,a){return new oe(e,t,a)}};var Ho=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)a.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[a[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let a=0;a>=8;for(;r>0;)t.push(r&255),r>>=8}for(let a=0;e[a]===this._leader&&a>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(Ta(i,n,l));r||(r=C.length,c=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),c.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return _c(ce([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,he(W(this.index),4),this.chainCode,this.privateKey!=null?ce(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new St(ga,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~Ta));let i=new Uint8Array(37);if(e&Ta){if(!this.privateKey)throw new Error("cannot derive child of neutered node");i.set(j(this.privateKey),1),t&&(t+="'")}else i.set(j(this.publicKey));for(let b=24;b>=0;b-=8)i[33+(b>>3)]=e>>24-b&255;let r=j(Ti(ni.sha512,this.chainCode,i)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Ho(F.from(a).add(this.privateKey).mod(l5)):d=new Tn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new St(ga,o,d,this.fingerprint,Ho(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let i=this;for(let r=0;r=Ta)throw new Error("invalid path index - "+a);i=i._derive(Ta+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=Ta)throw new Error("invalid path index - "+a);i=i._derive(s)}else throw new Error("invalid path component - "+a)}return i}static _fromSeed(e,t){let i=j(e);if(i.length<16||i.length>64)throw new Error("invalid seed");let r=j(Ti(ni.sha512,d5,i));return new St(ga,Ho(r.slice(0,32)),null,"0x00000000",Ho(r.slice(32)),0,0,t)}static fromMnemonic(e,t,i){return i=cd(i),e=_r(va(e,i),i),St._fromSeed(fd(e,t),{phrase:e,path:"m",locale:i.locale})}static fromSeed(e){return St._fromSeed(e,null)}static fromExtendedKey(e){let t=gi.decode(e);(t.length!==82||_c(t.slice(0,78))!==e)&&ys.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let i=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new St(ga,null,W(o),r,s,a,i,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new St(ga,W(o.slice(1)),null,r,s,a,i,null)}return ys.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function fd(n,e){e||(e="");let t=ve("mnemonic"+e,Jt.NFKD);return vr(ve(n,Jt.NFKD),t,2048,64,"sha512")}function va(n,e){e=cd(e),ys.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let i=j(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=kc(s);if((j(en(i.slice(0,a/8)))[0]&o)!==(i[i.length-1]&o))throw new Error("invalid checksum");return W(i.slice(0,a/8))}function _r(n,e){if(e=cd(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],i=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],i-=8):(t[t.length-1]<<=i,t[t.length-1]|=n[s]>>8-i,t.push(n[s]&p5(8-i)),i+=3);let r=n.length/4,a=j(en(n))[0]&kc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function Ac(n,e){try{return va(n,e),!0}catch{}return!1}function Ec(n){return(typeof n!="number"||n<0||n>=Ta||n%1)&&ys.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Mc="random/5.7.0";var md=new E(Mc);function y5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Cc=y5(),Go=Cc.crypto||Cc.msCrypto;(!Go||!Go.getRandomValues)&&(md.warn("WARNING: Missing strong random number source"),Go={getRandomValues:function(n){return md.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ii(n){(n<=0||n>1024||n%1||n!=n)&&md.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Go.getRandomValues(e),j(e)}function cs(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),i=n[e];n[e]=n[t],n[t]=i}return n}var xd=In(bd());var zo="json-wallets/5.7.0";function wi(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function wa(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),q=L.slice(32,64),M=new _i.default.Counter(b),J=new _i.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(r)),le=fe(ce([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Sc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=ii(16),N=new _i.default.Counter(R),H=new _i.default.ModeOfOperation.ctr(q,N),se=j(H.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+wa(C.getUTCMonth()+1,2)+"-"+wa(C.getUTCDate(),2)+"T"+wa(C.getUTCHours(),2)+"-"+wa(C.getUTCMinutes(),2)+"-"+wa(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Uc(n,e,t){if(Wo(n)){t&&t(0);let i=Td(n,e);return t&&t(1),Promise.resolve(i)}return Ko(n)?Lc(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Vc(n,e){if(Wo(n))return Td(n,e);if(Ko(n))return Fc(n,e);throw new Error("invalid JSON wallet")}var jc="wallet/5.7.0";var qc=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},_a=new E(jc);function b5(n){return n!=null&&re(n.privateKey,32)&&n.address!=null}function x5(n){let e=n.mnemonic;return e&&e.phrase}var dn=class extends Nt{constructor(e,t){if(super(),b5(e)){let i=new Tn(e.privateKey);if(B(this,"_signingKey",()=>i),B(this,"address",vn(this.publicKey)),this.address!==me(e.address)&&_a.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),x5(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||vi,locale:r.locale||"en"}));let a=this.mnemonic,s=St.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);vn(s.privateKey)!==this.address&&_a.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(Tn.isSigningKey(e))e.curve!=="secp256k1"&&_a.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let i=new Tn(e);B(this,"_signingKey",()=>i)}B(this,"_mnemonic",()=>null),B(this,"address",vn(this.publicKey))}t&&!Xt.isProvider(t)&&_a.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new dn(this,e)}signTransaction(e){return Se(e).then(t=>{t.from!=null&&(me(t.from)!==this.address&&_a.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let i=this._signingKey().signDigest(fe(us(t)));return us(t,i)})}signMessage(e){return qc(this,void 0,void 0,function*(){return Wa(this._signingKey().signDigest(sa(e)))})}_signTypedData(e,t,i){return qc(this,void 0,void 0,function*(){let r=yield Tt.resolveNames(e,t,i,a=>(this.provider==null&&_a.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Wa(this._signingKey().signDigest(Tt.hash(r.domain,t,r.value)))})}encrypt(e,t,i){if(typeof t=="function"&&!i&&(i=t,t={}),i&&typeof i!="function")throw new Error("invalid callback");return t||(t={}),Ad(this,e,t,i)}static createRandom(e){let t=ii(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ce([t,e.extraEntropy])),0,16)));let i=_r(t,e.locale);return dn.fromMnemonic(i,e.path,e.locale)}static fromEncryptedJson(e,t,i){return Uc(e,t,i).then(r=>new dn(r))}static fromEncryptedJsonSync(e,t){return new dn(Vc(e,t))}static fromMnemonic(e,t,i){return t||(t=vi),new dn(St.fromMnemonic(e,null,i).derivePath(t))}};function Hc(n,e){return xr(sa(n),e)}function Gc(n,e,t,i){return xr(Tt.hash(n,e,t),i)}var si={};Jr(si,{AlchemyProvider:()=>Ia,AlchemyWebSocketProvider:()=>As,AnkrProvider:()=>Es,BaseProvider:()=>ai,CloudflareProvider:()=>Ms,EtherscanProvider:()=>Cs,FallbackProvider:()=>Ss,Formatter:()=>X,InfuraProvider:()=>Ra,InfuraWebSocketProvider:()=>Ps,IpcProvider:()=>Ld,JsonRpcBatchProvider:()=>lu,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Ma,NodesmithProvider:()=>Ns,PocketProvider:()=>Ds,Provider:()=>Xt,Resolver:()=>Ea,StaticJsonRpcProvider:()=>ks,UrlJsonRpcProvider:()=>Rt,Web3Provider:()=>Os,WebSocketProvider:()=>Ei,getDefaultProvider:()=>du,getNetwork:()=>ms,isCommunityResourcable:()=>Cd,isCommunityResource:()=>xs,showThrottleMessage:()=>ri});var zc="networks/5.7.1";var Wc=new E(zc);function g5(n){return n&&typeof n.renetwork=="function"}function ki(n){let e=function(t,i){i==null&&(i={});let r=[];if(t.InfuraProvider&&i.infura!=="-")try{r.push(new t.InfuraProvider(n,i.infura))}catch{}if(t.EtherscanProvider&&i.etherscan!=="-")try{r.push(new t.EtherscanProvider(n,i.etherscan))}catch{}if(t.AlchemyProvider&&i.alchemy!=="-")try{r.push(new t.AlchemyProvider(n,i.alchemy))}catch{}if(t.PocketProvider&&i.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,i.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&i.cloudflare!=="-")try{r.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&i.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(n,i.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return i.quorum!=null?a=i.quorum:n==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return ki(t)},e}function Qo(n,e){let t=function(i,r){return i.JsonRpcProvider?new i.JsonRpcProvider(n,e):null};return t.renetwork=function(i){return Qo(n,i)},t}var Kc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ki("homestead")},Jc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ki("ropsten")},$c={chainId:63,name:"classicMordor",_defaultProvider:Qo("https://www.ethercluster.com/mordor","classicMordor")},$o={unspecified:{chainId:0,name:"unspecified"},homestead:Kc,mainnet:Kc,morden:{chainId:2,name:"morden"},ropsten:Jc,testnet:Jc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ki("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ki("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ki("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ki("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:$c,classicTestnet:$c,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ki("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ki("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ms(n){if(n==null)return null;if(typeof n=="number"){for(let i in $o){let r=$o[i];if(r.chainId===n)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let i=$o[n];return i==null?null:{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress,_defaultProvider:i._defaultProvider||null}}let e=$o[n.name];if(!e)return typeof n.chainId!="number"&&Wc.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Wc.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(g5(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Qc="web/5.7.1";var T5=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})};function Yc(n,e){return T5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let i=yield fetch(n,t),r=yield i.arrayBuffer(),a={};return i.headers.forEach?i.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):i.headers.keys().forEach(s=>{a[s.toLowerCase()]=i.headers.get(s)}),{headers:a,statusCode:i.status,statusMessage:i.statusText,body:j(new Uint8Array(r))}})}var v5=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},On=new E(Qc);function Xc(n){return new Promise(e=>{setTimeout(e,n)})}function ji(n,e){if(n==null)return null;if(typeof n=="string")return n;if(di(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function w5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Ed(n,e,t){let i=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;On.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);let r=typeof n=="object"?n.throttleCallback:null,a=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;On.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof n=="string")d=n;else if(typeof n=="object"){if((n==null||n.url==null)&&On.throwArgumentError("missing URL","connection.url",n),d=n.url,typeof n.timeout=="number"&&n.timeout>0&&(b=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){d.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&On.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+aa(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ra(_[3]):w5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){On.throwError("processing response error",E.errors.SERVER_ERROR,{body:ji(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(On.makeError("timeout",E.errors.TIMEOUT,{requestBody:ji(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return v5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),On.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:ji(q,U.headers?U.headers["content-type"]:null),requestBody:ji(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let M=yield t(q,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Yt(a))}catch(d){On.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=ve(e);let a=typeof n=="string"?{url:n}:we(n);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},n=a}return Ed(n,r,i)}function Fn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,i){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&i(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return n().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&i(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&i(c)})}p()})}var Pd=In(nf());var Ae="providers/5.7.2";var bs=new E(Ae),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),i=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(d,null),transactionIndex:X.allowNull(d,null),confirmations:X.allowNull(d,null),from:t,gasPrice:X.allowNull(i),maxPriorityFeePerGas:X.allowNull(i),maxFeePerGas:X.allowNull(i),gasLimit:i,to:X.allowNull(t,null),value:i,nonce:d,data:a,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(d),creates:X.allowNull(t,null),raw:X.allowNull(a)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(d),gasLimit:X.allowNull(i),gasPrice:X.allowNull(i),maxPriorityFeePerGas:X.allowNull(i),maxFeePerGas:X.allowNull(i),to:X.allowNull(t),value:X.allowNull(i),data:X.allowNull(c),type:X.allowNull(d),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:X.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:d,root:X.allowNull(o),gasUsed:i,logsBloom:X.allowNull(a),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:X.allowNull(d,null),cumulativeGasUsed:i,effectiveGasPrice:X.allowNull(i),status:X.allowNull(d),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:i,gasUsed:i,miner:X.allowNull(t),extraData:a,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(i)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(r,void 0),toBlock:X.allowNull(r,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(d),blockHash:X.allowNull(s),transactionIndex:d,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(a,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return ln(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():bs.throwArgumentError("invalid hash","value",e)}data(e,t){let i=this.hex(e,t);if(i.length%2!==0)throw new Error("invalid data; odd-length - "+e);return i}address(e){return me(e)}callAddress(e){if(!re(e,32))return null;let t=me(Ie(e,12));return t===mo?null:t}contractAddress(e){return fr(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Gn(e);throw new Error("invalid blockTag")}hash(e,t){let i=this.hex(e,t);return Ft(i)!==32?bs.throwArgumentError("invalid hash","value",e):i}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return he(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let i=e._difficulty!=null?e._difficulty:e.difficulty,r=X.check(t,e);return r._difficulty=i==null?null:F.from(i),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let i=e.chainId;re(i)&&(i=F.from(i).toNumber()),t.chainId=i}else{let i=e.networkId;i==null&&t.v==null&&(i=e.chainId),re(i)&&(i=F.from(i).toNumber()),typeof i!="number"&&t.v!=null&&(i=(t.v-35)/2,i<0&&(i=0),i=parseInt(i)),typeof i!="number"&&(i=0),t.chainId=i}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Fo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let i=F.from(t.root).toNumber();i===0||i===1?(t.status!=null&&t.status!==i&&bs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=i,delete t.root):bs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&bs.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let i={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(i[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return i}static allowNull(e,t){return function(i){return i==null?t:e(i)}}static allowFalsish(e,t){return function(i){return i?e(i):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let i=[];return t.forEach(function(r){i.push(e(r))}),i}}};function Cd(n){return n&&typeof n.isCommunityResource=="function"}function xs(n){return Cd(n)&&n.isCommunityResource()}var rf=!1;function ri(){rf||(rf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},be=new E(Ae),S5=10;function af(n){return n==null?"null":(Ft(n)!==32&&be.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function sf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[af(r)]=!0});let i=Object.keys(t);return i.sort(),i.join("|")}else return af(e)}).join("&")}function R5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(i=>i==="null"?null:i);return t.length===1?t[0]:t})}function Aa(n){if(typeof n=="string"){if(n=n.toLowerCase(),Ft(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+sf(n);if(Eo.isForkEvent(n))throw be.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+sf(n.topics||[])}throw new Error("invalid event - "+n)}function gs(){return new Date().getTime()}function of(n){return new Promise(e=>{setTimeout(e,n)})}var P5=["block","network","pending","poll"],Nd=class{constructor(e,t,i){B(this,"tag",e),B(this,"listener",t),B(this,"once",i),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],i=R5(e[2]),r={};return i.length>0&&(r.topics=i),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||P5.indexOf(this.tag)>=0}},N5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Id(n){return he(F.from(n).toHexString(),32)}function uf(n){return gi.encode(ce([n,Ie(en(en(n)),0,4)]))}var pf=new RegExp("^(ipfs)://(.*)$","i"),lf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eu(n,e){try{return Yt(Ts(n,e))}catch{}return null}function Ts(n,e){if(n==="0x")return null;let t=F.from(Ie(n,e,e+32)).toNumber(),i=F.from(Ie(n,t,t+32)).toNumber();return Ie(n,t+32,t+32+i)}function Sd(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):be.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function df(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function D5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function yf(n){let e=[],t=0;for(let i=0;iF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let i={to:this.address,ccipReadEnabled:!0,data:At([e,Oi(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,i.data=At(["0x9061b923",yf([rs(this.name),i.data])]));try{let a=yield this.provider.call(i);return j(a).length%32===4&&be.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:i,data:a}),r&&(a=Ts(a,0)),a}catch(a){if(a.code===E.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let i=yield this._fetch(e,t);return i!=null?Ts(i,0):null})}_getAddress(e,t){let i=N5[String(e)];if(i==null&&be.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),i.ilk==="eth")return this.provider.formatter.address(t);let r=j(t);if(i.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return uf(ce([[i.p2pkh],"0x"+a[2]]))}}if(i.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return uf(ce([[i.p2sh],"0x"+a[2]]))}}if(i.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=Pd.default.toWords(r.slice(2));return o.unshift(s),Pd.default.encode(i.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===na?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",Id(e));if(t==null||t==="0x")return null;let i=this._getAddress(e,t);return i==null&&be.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),i})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let i=0;is[d]);return"sia://"+o}return be.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ce([Id(64),Id(t.length),t]),t.length%32!==0&&(t=ce([t,he("0x",32-e.length%32)]));let i=yield this._fetchBytes("0x59d1d43c",W(t));return i==null||i==="0x"?null:Yt(i)})}},Rd=null,O5=1,ai=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=bt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):be.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||be.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Fn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Rd==null&&(Rd=new X),Rd}static getNetwork(e){return ms(e??"homestead")}ccipReadFetch(e,t,i){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||i.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Bn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return be.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return be.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:i,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(gs()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=gs(),i=Se({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===i&&(this._internalBlockNumber=null),a;let s=gs();return r=F.from(r).toNumber(),r{this._internalBlockNumber===i&&(this._internalBlockNumber=null)}),(yield i).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=O5++,t=[],i=null;try{i=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(i),this.emit("poll",e,i),i===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=i-1),Math.abs(this._emitted.block-i)>1e3)be.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${i})`),this.emit("error",be.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:i,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",i);else for(let r=this._emitted.block+1;r<=i;r++)this.emit("block",r);this._emitted.block!==i&&(this._emitted.block=i,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&i-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=i-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=i-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=i;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=i,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return be.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield of(0),this._network;let i=be.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",i),i}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=gs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,i){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,i||0,null)})}_waitForTransaction(e,t,i,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield of(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof i=="number"&&i>0){let I=setTimeout(()=>{c()||o(be.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:i}))},i);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return be.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",i);try{return F.from(r)}catch(a){return be.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:i,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",i);try{return F.from(r).toNumber()}catch(a){return be.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:i,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",i);try{return W(r)}catch(a){return be.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:i,result:r,error:a})}})}getStorageAt(e,t,i){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(i),position:Promise.resolve(t).then(s=>Gn(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return be.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,i){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&be.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&i!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:i});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&be.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),i=this.formatter.transaction(e);i.confirmations==null&&(i.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(i,a,r)}catch(a){throw a.transaction=i,a.transactionHash=i.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,i={};return["from","to"].forEach(r=>{t[r]!=null&&(i[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(i[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(i[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(i.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(i[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Se(i))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(i=>{e[i]!=null&&(t[i]=e[i])}),["fromBlock","toBlock"].forEach(i=>{e[i]!=null&&(t[i]=this._getBlockTag(e[i]))}),this.formatter.filter(yield Se(t))})}_call(e,t,i){return ue(this,void 0,void 0,function*(){i>=S5&&be.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:i,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(i>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Ft(a)%32===4)try{let s=Ie(a,4),o=Ie(s,0,32);F.from(o).eq(r)||be.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ie(s,32,64)).toNumber(),c=F.from(Ie(s,p,p+32)).toNumber(),b=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&i>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Fn(()=>ue(this,void 0,void 0,function*(){let i=yield this.perform("getTransaction",t);if(i==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(i);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Fn(()=>ue(this,void 0,void 0,function*(){let i=yield this.perform("getTransactionReceipt",t);if(i==null)return this._emitted["t:"+e]==null?null:void 0;if(i.blockHash==null)return;let r=this.formatter.receipt(i);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Se({filter:this._getFilter(e)}),i=yield this.perform("getLogs",t);return i.forEach(r=>{r.removed==null&&(r.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(i)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&be.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let i=yield this._getResolver(t,"getResolver");if(i!=null){let r=new Ea(this,i,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let i=yield this.getNetwork();i.ensAddress||be.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:i.name});try{let r=yield this.call({to:i.ensAddress,data:"0x0178b8bf"+Oi(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(i){if(re(e))throw i}typeof e!="string"&&be.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(t,"lookupAddress");if(i==null)return null;let r=eu(yield this.call({to:i,data:"0x691f3431"+Oi(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new Ea(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=eu(yield this.call({to:s,data:"0x691f3431"+Oi(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let i=yield t.getAvatar();return i==null?null:i.url})}perform(e,t){return be.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,i){let r=new Nd(Aa(e),t,i);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let i=!1,r=[],a=Aa(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),i=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),i}listenerCount(e){if(!e)return this._events.length;let t=Aa(e);return this._events.filter(i=>i.tag===t).length}listeners(e){if(e==null)return this._events.map(i=>i.listener);let t=Aa(e);return this._events.filter(i=>i.tag===t).map(i=>i.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let i=[],r=!1,a=Aa(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,i.push(s),!1)),i.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let i=Aa(e);this._events=this._events.filter(r=>r.tag!==i?!0:(t.push(r),!1))}return t.forEach(i=>{this._stopEvent(i)}),this}};var Ai=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},Mt=new E(Ae),B5=["call","estimateGas"];function ws(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=re(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let i=ws(n[t],e);if(i)return i}return null}if(typeof n=="string")try{return ws(JSON.parse(n),e)}catch{}return null}function ff(n,e,t){let i=t.transaction||t.signedTransaction;if(n==="call"){let a=ws(e,!0);if(a)return a.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:i,error:e})}if(n==="estimateGas"){let a=ws(e.body,!1);a==null&&(a=ws(e,!1)),a&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:n,transaction:i,error:e})}let r=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:i}),r.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:i}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:i}),r.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:i}),B5.indexOf(n)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:i}),e}function cf(n){return new Promise(function(e){setTimeout(e,n)})}function F5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function vs(n){return n&&n.toLowerCase()}var Dd={},Ma=class extends Nt{constructor(e,t,i){if(super(),e!==Dd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),i==null&&(i=0),typeof i=="string"?(B(this,"_address",this.provider.formatter.address(i)),B(this,"_index",null)):typeof i=="number"?(B(this,"_index",i),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",i)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Od(Dd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(i=>(i&&(i=i.toLowerCase()),i));if(e.gasLimit==null){let i=we(e);i.from=t,e.gasLimit=this.provider.estimateGas(i)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(i=>Ai(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.provider.resolveName(i);return r==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",i),r}))),Se({tx:Se(e),sender:t}).then(({tx:i,sender:r})=>{i.from!=null?i.from.toLowerCase()!==r&&Mt.throwArgumentError("from address mismatch","transaction",e):i.from=r;let a=this.provider.constructor.hexlifyTransaction(i,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:i}),ff("sendTransaction",s,a)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ai(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),i=yield this.sendUncheckedTransaction(e);try{return yield Fn(()=>Ai(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(i);if(r!==null)return this.provider._wrapTransaction(r,i,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=i,r}})}signMessage(e){return Ai(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,i=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),i.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:i,messageData:e}),r}})}_legacySignMessage(e){return Ai(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,i=yield this.getAddress();try{return yield this.provider.send("eth_sign",[i.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:i,messageData:e}),r}})}_signTypedData(e,t,i){return Ai(this,void 0,void 0,function*(){let r=yield Tt.resolveNames(e,t,i,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(Tt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return Ai(this,void 0,void 0,function*(){let t=this.provider,i=yield this.getAddress();return t.send("personal_unlockAccount",[i.toLowerCase(),e,null])})}},Od=class extends Ma{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:i=>this.provider.waitForTransaction(t,i)}))}},L5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends ai{constructor(e,t){let i=t;i==null&&(i=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(i),e||(e=bt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ai(this,void 0,void 0,function*(){yield cf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=bt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(i){return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:i})}}return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Ma(Dd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let i={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ht(i),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Bn(this.connection,JSON.stringify(i),F5).then(s=>(this.emit("debug",{action:"response",request:i,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:i,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[vs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[vs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[vs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[vs(t.address),he(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let i=bt(this.constructor,"hexlifyTransaction");return["eth_call",[i(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let i=bt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[i(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=vs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return Ai(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let i=this.prepareRequest(e,t);i==null&&Mt.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(i[0],i[1])}catch(r){return ff(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(i){function r(){e.send("eth_getFilterChanges",[i]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return cf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[i]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),i}).catch(i=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let i=we(L5);if(t)for(let a in t)t[a]&&(i[a]=!0);Yr(e,i);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Gn(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=ln(e.accessList)),r}};var Ca=null;try{if(Ca=WebSocket,Ca==null)throw new Error("inject please")}catch{let e=new E(Ae);Ca=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Bd=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},tu=new E(Ae),U5=1,Ei=class extends tn{constructor(e,t){t==="any"&&tu.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Ca(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let i=setInterval(()=>{this.emit("poll")},1e3);i.unref&&i.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){tu.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){tu.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Bd(this,void 0,void 0,function*(){return null})}set polling(e){!e||tu.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let i=U5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:i,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(i)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,i){return Bd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:i}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let i=F.from(t.number).toNumber();this._emitted.block=i,this.emit("block",i)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=i=>{let r=i.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],i=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let i=this._subIds[t];!i||(delete this._subIds[t],i.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return Bd(this,void 0,void 0,function*(){this.websocket.readyState===Ca.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var V5=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},_s=new E(Ae),ks=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return V5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||_s.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Rt=class extends ks{constructor(e,t){_s.checkAbstract(new.target,Rt),e=bt(new.target,"getNetwork")(e),t=bt(new.target,"getApiKey")(t);let i=bt(new.target,"getUrl")(e,t);super(i,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){_s.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return _s.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return _s.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var mf=new E(Ae),nu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",As=class extends Ei{constructor(e,t){let i=new Ia(e,t),r=i.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,i.network),B(this,"apiKey",i.apiKey)}isCommunityResource(){return this.apiKey===nu}},Ia=class extends Rt{static getWebSocketProvider(e,t){return new As(e,t)}static getApiKey(e){return e==null?nu:(e&&typeof e!="string"&&mf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let i=null;switch(e.name){case"homestead":i="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":i="eth-goerli.g.alchemy.com/v2/";break;case"matic":i="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":i="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":i="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":i="arb-goerli.g.alchemy.com/v2/";break;case"optimism":i="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":i="opt-goerli.g.alchemy.com/v2/";break;default:mf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+i+t,throttleCallback:(r,a)=>(t===nu&&ri(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nu}};var j5=new E(Ae),iu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function q5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return j5.throwArgumentError("unsupported network","name",n)}var Es=class extends Rt{isCommunityResource(){return this.apiKey===iu}static getApiKey(e){return e??iu}static getUrl(e,t){t==null&&(t=iu);let i={allowGzip:!0,url:"https://"+q5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===iu&&ri(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}};var H5=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},hf=new E(Ae),Ms=class extends Rt{static getApiKey(e){return e!=null&&hf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let i=null;switch(e.name){case"homestead":i="https://cloudflare-eth.com/";break;default:hf.throwArgumentError("unsupported network","network",arguments[0])}return i}perform(e,t){let i=Object.create(null,{perform:{get:()=>super.perform}});return H5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield i.perform.call(this,"getBlock",{blockTag:"latest"})).number:i.perform.call(this,e,t)})}};var ru=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},qi=new E(Ae);function bf(n){let e={};for(let t in n){if(n[t]==null)continue;let i=n[t];t==="type"&&i===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?i=Gn(W(i)):t==="accessList"?i="["+ln(i).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":i=W(i),e[t]=i)}return e}function G5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function xf(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function gf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Fd(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;qi.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText)),i=(i||"").toLowerCase(),i.match(/insufficient funds/)&&qi.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&qi.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),i.match(/another transaction with same nonce/)&&qi.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),i.match(/execution failed due to an exception|execution reverted/)&&qi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var Cs=class extends ai{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return qi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let i=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${i}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,i){return ru(this,void 0,void 0,function*(){let r=i?this.getPostUrl():this.getUrl(e,t),a=i?this.getPostData(e,t):null,s=e==="proxy"?xf:G5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&ri(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Bn(o,d,s||xf);return this.emit("debug",{action:"response",request:r,response:ht(p),provider:this}),p})}detectNetwork(){return ru(this,void 0,void 0,function*(){return this.network})}perform(e,t){let i=Object.create(null,{perform:{get:()=>super.perform}});return ru(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Fd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=bf(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Fd("call",a,t.transaction)}}case"estimateGas":{let r=bf(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Fd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=gf(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=gf(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&qi.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&qi.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var ou=function(n,e,t,i){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(i.next(c))}catch(b){s(b)}}function d(c){try{p(i.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((i=i.apply(n,e||[])).next())})},kr=new E(Ae);function au(){return new Date().getTime()}function Tf(n){let e=null;for(let t=0;te?null:(i+r)/2}function Sa(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Sa(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let i=n[t];return typeof i=="function"?i="[function]":i=Sa(i),JSON.stringify(t)+":"+i}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var z5=1;function wf(n){let e=null,t=null,i=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),r=s=>(i=i.then(s),i);function a(){return i}return{cancel:e,getPromise:a,wait:r}}var W5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],K5=["address","args","errorArgs","errorSignature","method","transaction"];function su(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function J5(n,e){return function(t){let i={};t.forEach(a=>{let s=n(a.result);i[s]||(i[s]={count:0,result:a.result}),i[s].count++});let r=Object.keys(i);for(let a=0;a=e)return s.result}}}function $5(n,e,t){let i=Sa;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=vf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return vf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":i=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Sa(r))};break;case"getBlock":t.includeTransactions?i=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Sa(r))}:i=function(r){return r==null?null:Sa(r)};break;default:throw new Error("unknown method: "+e)}return J5(i,n.quorum)}function Is(n,e){return ou(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Fn(()=>new Promise((i,r)=>{setTimeout(function(){return t.blockNumber>=e?i(t):n.cancelled?i(null):i(void 0)},0)}),{oncePoll:t})})}function Q5(n,e,t,i){return ou(this,void 0,void 0,function*(){let r=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return i.blockTag&&re(i.blockTag)&&(r=yield Is(n,e)),r[t](i.address,i.blockTag||"latest");case"getStorageAt":return i.blockTag&&re(i.blockTag)&&(r=yield Is(n,e)),r.getStorageAt(i.address,i.position,i.blockTag||"latest");case"getBlock":return i.blockTag&&re(i.blockTag)&&(r=yield Is(n,e)),r[i.includeTransactions?"getBlockWithTransactions":"getBlock"](i.blockTag||i.blockHash);case"call":case"estimateGas":return i.blockTag&&re(i.blockTag)&&(r=yield Is(n,e)),t==="call"&&i.blockTag?r[t](i.transaction,i.blockTag):r[t](i.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](i.transactionHash);case"getLogs":{let a=i.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield Is(n,e)),r.getLogs(a)}}return kr.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:i})})}var Ss=class extends ai{constructor(e,t){e.length===0&&kr.throwArgumentError("missing providers","providers",e);let i=e.map((s,o)=>{if(Xt.isProvider(s)){let c=xs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=xs(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&kr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=i.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&kr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=Tf(i.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(i)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return ou(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return Tf(e)})}perform(e,t){return ou(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=au(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Q5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,au()),request:{method:e,params:ht(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,au()),request:{method:e,params:ht(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,null),request:{method:e,params:ht(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=i(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield wf(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return W5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};K5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),kr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),kr.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>su(d)),provider:this})})}};var Ld=null;var uu=new E(Ae),Rs="84842078b09946638c03157f83405213",Ps=class extends Ei{constructor(e,t){let i=new Ra(e,t),r=i.connection;r.password&&uu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",i.projectId),B(this,"projectId",i.projectId),B(this,"projectSecret",i.projectSecret)}isCommunityResource(){return this.projectId===Rs}},Ra=class extends Rt{static getWebSocketProvider(e,t){return new Ps(e,t)}static getApiKey(e){let t={apiKey:Rs,projectId:Rs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(uu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),uu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let i=null;switch(e?e.name:"unknown"){case"homestead":i="mainnet.infura.io";break;case"goerli":i="goerli.infura.io";break;case"sepolia":i="sepolia.infura.io";break;case"matic":i="polygon-mainnet.infura.io";break;case"maticmum":i="polygon-mumbai.infura.io";break;case"optimism":i="optimism-mainnet.infura.io";break;case"optimism-goerli":i="optimism-goerli.infura.io";break;case"arbitrum":i="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":i="arbitrum-goerli.infura.io";break;default:uu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+i+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===Rs&&ri(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===Rs}};var lu=class extends tn{send(e,t){let i={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:i,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ht(o),provider:this}),Bn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Ud=new E(Ae),Y5="ETHERS_JS_SHARED",Ns=class extends Rt{static getApiKey(e){return e&&typeof e!="string"&&Ud.throwArgumentError("invalid apiKey","apiKey",e),e||Y5}static getUrl(e,t){Ud.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let i=null;switch(e.name){case"homestead":i="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":i="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":i="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":i="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":i="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ud.throwArgumentError("unsupported network","network",arguments[0])}return i+"?apiKey="+t}};var _f=new E(Ae),kf="62e1ad51b37b8e00394bda3b",Ds=class extends Rt{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=kf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:_f.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let i=null;switch(e?e.name:"unknown"){case"goerli":i="eth-goerli.gateway.pokt.network";break;case"homestead":i="eth-mainnet.gateway.pokt.network";break;case"kovan":i="poa-kovan.gateway.pokt.network";break;case"matic":i="poly-mainnet.gateway.pokt.network";break;case"maticmum":i="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":i="eth-rinkeby.gateway.pokt.network";break;case"ropsten":i="eth-ropsten.gateway.pokt.network";break;default:_f.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${i}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===kf}};var Af=new E(Ae),X5=1;function Ef(n,e){let t="Web3LegacyFetcher";return function(i,r){let a={method:i,params:r,id:X5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ht(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function Z5(n){return function(e,t){t==null&&(t=[]);let i={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ht(i),provider:this}),n.request(i).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:r,provider:this}),r})}}var Os=class extends tn{constructor(e,t){e==null&&Af.throwArgumentError("missing provider","provider",e);let i=null,r=null,a=null;typeof e=="function"?(i="unknown:",r=e):(i=e.host||e.path||"",!i&&e.isMetaMask&&(i="metamask"),a=e,e.request?(i===""&&(i="eip-1193:"),r=Z5(e)):e.sendAsync?r=Ef(e,e.sendAsync.bind(e)):e.send?r=Ef(e,e.send.bind(e)):Af.throwArgumentError("unsupported provider","provider",e),i||(i="unknown:")),super(i,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Mf=new E(Ae);function du(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let i=n.match(/^(ws|http)s?:/i);if(i)switch(i[1].toLowerCase()){case"http":case"https":return new tn(n);case"ws":case"wss":return new Ei(n);default:Mf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ms(n);return(!t||!t._defaultProvider)&&Mf.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ss,AlchemyProvider:Ia,AnkrProvider:Es,CloudflareProvider:Ms,EtherscanProvider:Cs,InfuraProvider:Ra,JsonRpcProvider:tn,NodesmithProvider:Ns,PocketProvider:Ds,Web3Provider:Os,IpcProvider:null},e)}var te={};Jr(te,{AbiCoder:()=>ia,ConstructorFragment:()=>Lt,ErrorFragment:()=>an,EventFragment:()=>Wt,FormatTypes:()=>ge,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>St,Indexed:()=>fi,Interface:()=>Bi,LogDescription:()=>oa,Logger:()=>E,ParamType:()=>ct,RLP:()=>so,SigningKey:()=>Tn,SupportedAlgorithm:()=>ni,TransactionDescription:()=>ua,TransactionTypes:()=>Bo,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>To,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>Tt,_fetchData:()=>Ed,_toEscapedUtf8String:()=>Rl,accessListify:()=>ln,arrayify:()=>j,base58:()=>gi,base64:()=>Fl,checkProperties:()=>Yr,checkResultErrors:()=>Zr,commify:()=>Of,computeAddress:()=>vn,computeHmac:()=>Ti,computePublicKey:()=>os,concat:()=>ce,deepCopy:()=>ht,defaultAbiCoder:()=>ns,defaultPath:()=>vi,defineReadOnly:()=>B,dnsEncode:()=>rs,entropyToMnemonic:()=>_r,fetchJson:()=>Bn,formatBytes32String:()=>Pl,formatEther:()=>Bf,formatUnits:()=>Vd,getAccountPath:()=>Ec,getAddress:()=>me,getContractAddress:()=>fr,getCreate2Address:()=>V0,getIcapAddress:()=>U0,getJsonWalletAddress:()=>vd,getStatic:()=>bt,hashMessage:()=>sa,hexConcat:()=>At,hexDataLength:()=>Ft,hexDataSlice:()=>Ie,hexStripZeros:()=>Tl,hexValue:()=>Gn,hexZeroPad:()=>he,hexlify:()=>W,id:()=>sn,isAddress:()=>L0,isBytes:()=>cn,isBytesLike:()=>di,isHexString:()=>re,isValidMnemonic:()=>Ac,isValidName:()=>Ul,joinSignature:()=>Wa,keccak256:()=>fe,mnemonicToEntropy:()=>va,mnemonicToSeed:()=>fd,namehash:()=>Oi,nameprep:()=>Bl,parseBytes32String:()=>Nl,parseEther:()=>Ff,parseTransaction:()=>Fo,parseUnits:()=>jd,poll:()=>Fn,randomBytes:()=>ii,recoverAddress:()=>xr,recoverPublicKey:()=>Oo,resolveProperties:()=>Se,ripemd160:()=>ds,serializeTransaction:()=>us,sha256:()=>en,sha512:()=>dd,shallowCopy:()=>we,shuffled:()=>cs,solidityKeccak256:()=>Sf,solidityPack:()=>pu,soliditySha256:()=>Rf,splitSignature:()=>zn,stripZeros:()=>nn,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Di,toUtf8String:()=>Yt,verifyMessage:()=>Hc,verifyTypedData:()=>Gc,zeroPad:()=>dr});var Cf="solidity/5.7.0";var e1=new RegExp("^bytes([0-9]+)$"),t1=new RegExp("^(u?int)([0-9]*)$"),n1=new RegExp("^(.*)\\[([0-9]*)\\]$"),i1="0000000000000000000000000000000000000000000000000000000000000000",Pa=new E(Cf);function If(n,e,t){switch(n){case"address":return t?dr(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?dr(e,32):j(e)}let i=n.match(t1);if(i){let r=parseInt(i[2]||"256");return(i[2]&&String(r)!==i[2]||r%8!==0||r===0||r>256)&&Pa.throwArgumentError("invalid number type","type",n),t&&(r=256),e=F.from(e).toTwos(r),dr(e,r/8)}if(i=n.match(e1),i){let r=parseInt(i[1]);return(String(r)!==i[1]||r===0||r>32)&&Pa.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==r&&Pa.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+i1).substring(0,66)):e}if(i=n.match(n1),i&&Array.isArray(e)){let r=i[1];parseInt(i[2]||String(e.length))!=e.length&&Pa.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(If(r,o,!0))}),ce(s)}return Pa.throwArgumentError("invalid type","type",n)}function pu(n,e){n.length!=e.length&&Pa.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(i,r){t.push(If(i,e[r]))}),W(ce(t))}function Sf(n,e){return fe(pu(n,e))}function Rf(n,e){return en(pu(n,e))}var Pf="units/5.7.0";var Nf=new E(Pf),Df=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Of(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Nf.throwArgumentError("invalid value","value",n);let t=e[0],i="";for(t.substring(0,1)==="-"&&(i="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return i+a.join(",")+r}function Vd(n,e){if(typeof e=="string"){let t=Df.indexOf(e);t!==-1&&(e=3*t)}return Qr(n,e??18)}function jd(n,e){if(typeof n!="string"&&Nf.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Df.indexOf(e);t!==-1&&(e=3*t)}return mn(n,e??18)}function Bf(n){return Vd(n,18)}function Ff(n){return jd(n,18)}var yu="ethers/5.7.2";var Lf=new E(yu);try{let n=window;n._ethers==null&&(n._ethers=qd)}catch{}var Ln;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa"})(Ln||(Ln={}));var cu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom=""})(cu||(cu={}));var Na;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000"})(Na||(Na={}));var fu;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom=""})(fu||(fu={}));var Hd;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom=""})(Hd||(Hd={}));var Bs;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test"})(Bs||(Bs={}));var Fs;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test"})(Fs||(Fs={}));var Gd;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=n.Gnosis||(n.Gnosis={}))})(Gd||(Gd={}));var ke;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var Bt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(Bt||(Bt={}));var Wd="0x12345678",zd;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(zd||(zd={}));var Ee;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(Ee||(Ee={}));var ye;(function(n){n.CoinMachine="CoinMachine",n.EvaluatedExpenditure="EvaluatedExpenditure",n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation",n.Whitelist="Whitelist"})(ye||(ye={}));var Kd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ar=class{static createInterface(){return new te.Interface(Kd)}static connect(e,t){return new oe(e,Kd,t)}};Ct(Ar,"abi",Kd);var Jd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Er=class{static createInterface(){return new te.Interface(Jd)}static connect(e,t){return new oe(e,Jd,t)}};Ct(Er,"abi",Jd);var Uf=(n,e)=>{throw new Error(`${e}: ${n}`)},$d=n=>n!=null;var{keccak256:a1,toUtf8Bytes:s1}=te,{MaxUint256:o1}=xt;var Da=n=>te.formatEther(n),Oa=n=>te.parseEther(n),pn=n=>Oa(n[0]),Qd=n=>{let e=n.reduce((t,i)=>t|1<{let e=F.from(n);return[...Array(Ee.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter($d)},Mr=async(n,e,t,i)=>{if(F.from(t).eq(F.from(i)))return o1;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(i),{children:s}=await n.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${i} as a child of ${t}`);return F.from(o)},Hi=n=>a1(s1(n));var Ba=async(n,e)=>(await Er.connect(n,e).version()).toNumber(),Yd=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter($d);var{hexDataSlice:Xd}=te,{MaxUint256:u1}=xt,Vf=n=>{let e=Xd(n,0,3),t=F.from(Xd(n,4,35)),i=F.from(Xd(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:i}},jf=async(n,e,t,i,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,i))return[F.from(t),u1,a];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(a,o,i))throw new Error(`${a} does not have the permission ${i} in any parent domain`);let p=await Mr(n,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${i} in any parent domain`);return[o,p,a]},l1=async(n,e,t,i,r)=>{let a=await Promise.all(i.map(s=>jf(n,e,t,s,r)));for(let s=0;sArray.isArray(i)?i.length===1?oi(n,e,t,i[0],r):l1(n,e,t,i,r):jf(n,e,t,i,r);var{MaxUint256:qf}=xt,{AddressZero:d1}=xt;async function p1(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),mu(t)}catch{return[]}}async function Ls(n,e,t,i,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Vf(s),I=Ar.connect(a,i.signer||i.provider),_=await p1(I,p);if(_.includes(Ee.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=qf}else{let{skillId:U}=await e.getDomain(c),q=await n.getChildSkillId(U,b);if(q.eq(d))o=qf;else{let{children:M}=await n.getSkill(d),J=M.findIndex($=>$.eq(q));if(J<0)throw new Error(`Could not find ${q} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,d1);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:y1}=xt,ui=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,i){this.colony=t,this.network=e;let r=i?.network||Ln.Gnosis;this.endpointUrl=i?.customEndpointUrl||Na[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,i){let r=await this.getBaseEndpoint(i),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ui.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,i){let r=await this.getBaseEndpoint(i),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ui.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ui.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let i=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${i}/${r}`;return ui.fetchReputation(a)}async getTotalReputation(e,t){let i=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${i}/${r}/${y1}/noProof`,s=await ui.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,i,r=3){let{reputationAmount:a}=await this.getReputation(e,t,i),{reputationAmount:s}=await this.getTotalReputation(e,i);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var kt=n=>Array.from(Array(n-1)).map(e=>e+1);var Hf=10,Jk=kt(Hf),Gf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},zf=Hf-1;var Wf=6,Yk=kt(Wf),Kf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Jf=Wf-1;var $f=7,eA=kt($f),Qf={1:[],2:[],3:[],4:[],5:[],6:[]},Yf=$f-1;var Xf=7,iA=kt(Xf),Zf={1:[],2:[],3:[],4:[],5:[],6:[]},em=Xf-1;var tm=4,sA=kt(tm),nm={1:[],2:[],3:[]},im=tm-1;var rm=5,lA=kt(rm),am={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},sm=rm-1;var om=2,yA=kt(om),um={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},lm=om-1;var dm=4,mA=kt(dm),pm={1:[1,2,3],2:[1,2,3],3:[1,2,3]},ym=dm-1;var cm=7,xA=kt(cm),fm={1:[],2:[],3:[],4:[],5:[],6:[]},mm=cm-1;var hm=11,vA=kt(hm),Zd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},ep=hm-1;var bm=6,kA=kt(bm),xm={1:[],2:[],3:[],4:[],5:[]},gm=bm-1;var Un=(n,e,t)=>{switch(n){case ye.CoinMachine:{let i=Gf[e];return!!i&&!i.includes(t)}case ye.EvaluatedExpenditure:{let i=Kf[e];return!!i&&!i.includes(t)}case ye.FundingQueue:{let i=Qf[e];return!!i&&!i.includes(t)}case ye.IVotingReputation:{let i=Zd[e];return!!i&&!i.includes(t)}case ye.OneTxPayment:{let i=Zf[e];return!!i&&!i.includes(t)}case ye.ReputationBootstrapper:{let i=nm[e];return!!i&&!i.includes(t)}case ye.StagedExpenditure:{let i=um[e];return!!i&&!i.includes(t)}case ye.StakedExpenditure:{let i=am[e];return!!i&&!i.includes(t)}case ye.StreamingPayments:{let i=pm[e];return!!i&&!i.includes(t)}case ye.TokenSupplier:{let i=fm[e];return!!i&&!i.includes(t)}case ye.VotingReputation:{let i=Zd[e];return!!i&&!i.includes(t)}case ye.Whitelist:{let i=xm[e];return!!i&&!i.includes(t)}default:return Uf(n,"Could not find extension with name")}};var Fa={[ye.CoinMachine]:zf,[ye.EvaluatedExpenditure]:Jf,[ye.FundingQueue]:Yf,[ye.IVotingReputation]:ep,[ye.OneTxPayment]:em,[ye.ReputationBootstrapper]:im,[ye.StagedExpenditure]:lm,[ye.StakedExpenditure]:sm,[ye.StreamingPayments]:ym,[ye.TokenSupplier]:mm,[ye.VotingReputation]:ep,[ye.Whitelist]:gm};var jh=In(Tm(),1);var wp=In(Lh(),1);var Pe;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Pe||(Pe={}));var vp=2,Tp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(Tp||(Tp={}));var Uh=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),ox)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var ux="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ps=null;function vc(n){if(ps==null&&(ps=ux.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),wn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ps=null,new Error("BIP39 Wordlist for en (English) FAILED")}var pl=class extends wn{constructor(){super("en")}getWord(e){return vc(this),ps[e]}getWordIndex(e){return vc(this),ps.indexOf(e)}},yl=new pl;wn.register(yl);var wi={en:yl};var wc="hdnode/5.7.0";var ys=new E(wc),dx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),lx=we("Bitcoin seed"),Tr=2147483648;function kc(n){return(1<=256)throw new Error("Depth too large!");return _c(ce([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,he(W(this.index),4),this.chainCode,this.privateKey!=null?ce(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new St(gr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~Tr));let a=new Uint8Array(37);if(e&Tr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(Ta(na.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=qo(F.from(r).add(this.privateKey).mod(dx)):l=new Tn(W(r))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new St(gr,o,l,this.fingerprint,qo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=Tr)throw new Error("invalid path index - "+r);a=a._derive(Tr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=Tr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(Ta(na.sha512,lx,a));return new St(gr,qo(i.slice(0,32)),null,"0x00000000",qo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=cl(a),e=_i(vr(e,a),a),St._fromSeed(fl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return St._fromSeed(e,null)}static fromExtendedKey(e){let t=ga.decode(e);(t.length!==82||_c(t.slice(0,78))!==e)&&ys.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new St(gr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new St(gr,W(o.slice(1)),null,i,s,r,a,null)}return ys.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function fl(n,e){e||(e="");let t=we("mnemonic"+e,Jt.NFKD);return vi(we(n,Jt.NFKD),t,2048,64,"sha512")}function vr(n,e){e=cl(e),ys.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=kc(s);if((j(en(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return W(a.slice(0,r/8))}function _i(n,e){if(e=cl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&px(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&kc(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Ac(n,e){try{return vr(n,e),!0}catch{}return!1}function Ec(n){return(typeof n!="number"||n<0||n>=Tr||n%1)&&ys.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Mc="random/5.7.0";var ml=new E(Mc);function yx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Ic=yx(),zo=Ic.crypto||Ic.msCrypto;(!zo||!zo.getRandomValues)&&(ml.warn("WARNING: Missing strong random number source"),zo={getRandomValues:function(n){return ml.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function aa(n){(n<=0||n>1024||n%1||n!=n)&&ml.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return zo.getRandomValues(e),j(e)}function cs(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var bl=Cn(xl());var Go="json-wallets/5.7.0";function wa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function wr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new _a.default.Counter(x),J=new _a.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ce([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Sc(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=aa(16),N=new _a.default.Counter(R),q=new _a.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+wr(I.getUTCMonth()+1,2)+"-"+wr(I.getUTCDate(),2)+"T"+wr(I.getUTCHours(),2)+"-"+wr(I.getUTCMinutes(),2)+"-"+wr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Uc(n,e,t){if(Wo(n)){t&&t(0);let a=Tl(n,e);return t&&t(1),Promise.resolve(a)}return Ko(n)?Lc(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Vc(n,e){if(Wo(n))return Tl(n,e);if(Ko(n))return Fc(n,e);throw new Error("invalid JSON wallet")}var jc="wallet/5.7.0";var Hc=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},_r=new E(jc);function xx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function bx(n){let e=n.mnemonic;return e&&e.phrase}var ln=class extends Nt{constructor(e,t){if(super(),xx(e)){let a=new Tn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",vn(this.publicKey)),this.address!==me(e.address)&&_r.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),bx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||va,locale:i.locale||"en"}));let r=this.mnemonic,s=St.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);vn(s.privateKey)!==this.address&&_r.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(Tn.isSigningKey(e))e.curve!=="secp256k1"&&_r.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new Tn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",vn(this.publicKey))}t&&!Xt.isProvider(t)&&_r.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new ln(this,e)}signTransaction(e){return Re(e).then(t=>{t.from!=null&&(me(t.from)!==this.address&&_r.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(us(t)));return us(t,a)})}signMessage(e){return Hc(this,void 0,void 0,function*(){return Wr(this._signingKey().signDigest(sr(e)))})}_signTypedData(e,t,a){return Hc(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,r=>(this.provider==null&&_r.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Wr(this._signingKey().signDigest(vt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),Al(this,e,t,a)}static createRandom(e){let t=aa(16);e||(e={}),e.extraEntropy&&(t=j(Se(fe(ce([t,e.extraEntropy])),0,16)));let a=_i(t,e.locale);return ln.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Uc(e,t,a).then(i=>new ln(i))}static fromEncryptedJsonSync(e,t){return new ln(Vc(e,t))}static fromMnemonic(e,t,a){return t||(t=va),new ln(St.fromMnemonic(e,null,a).derivePath(t))}};function qc(n,e){return bi(sr(n),e)}function zc(n,e,t,a){return bi(vt.hash(n,e,t),a)}var sa={};Ji(sa,{AlchemyProvider:()=>Cr,AlchemyWebSocketProvider:()=>As,AnkrProvider:()=>Es,BaseProvider:()=>ra,CloudflareProvider:()=>Ms,EtherscanProvider:()=>Is,FallbackProvider:()=>Ss,Formatter:()=>X,InfuraProvider:()=>Rr,InfuraWebSocketProvider:()=>Ps,IpcProvider:()=>Ll,JsonRpcBatchProvider:()=>du,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Mr,NodesmithProvider:()=>Ns,PocketProvider:()=>Ds,Provider:()=>Xt,Resolver:()=>Er,StaticJsonRpcProvider:()=>ks,UrlJsonRpcProvider:()=>Rt,Web3Provider:()=>Os,WebSocketProvider:()=>Ea,getDefaultProvider:()=>lu,getNetwork:()=>ms,isCommunityResourcable:()=>Il,isCommunityResource:()=>bs,showThrottleMessage:()=>ia});var Gc="networks/5.7.1";var Wc=new E(Gc);function gx(n){return n&&typeof n.renetwork=="function"}function ka(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ka(t)},e}function Qo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Qo(n,a)},t}var Kc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ka("homestead")},Jc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ka("ropsten")},$c={chainId:63,name:"classicMordor",_defaultProvider:Qo("https://www.ethercluster.com/mordor","classicMordor")},$o={unspecified:{chainId:0,name:"unspecified"},homestead:Kc,mainnet:Kc,morden:{chainId:2,name:"morden"},ropsten:Jc,testnet:Jc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ka("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ka("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ka("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ka("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:$c,classicTestnet:$c,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ka("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ka("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ms(n){if(n==null)return null;if(typeof n=="number"){for(let a in $o){let i=$o[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=$o[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=$o[n.name];if(!e)return typeof n.chainId!="number"&&Wc.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Wc.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(gx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Qc="web/5.7.1";var Tx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Yc(n,e){return Tx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var vx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},On=new E(Qc);function Xc(n){return new Promise(e=>{setTimeout(e,n)})}function ja(n,e){if(n==null)return null;if(typeof n=="string")return n;if(la(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function wx(n){return we(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function El(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;On.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;On.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},c=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&On.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&On.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+rr(we(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ir(_[3]):wx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){On.throwError("processing response error",E.errors.SERVER_ERROR,{body:ja(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(On.makeError("timeout",E.errors.TIMEOUT,{requestBody:ja(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return vx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),On.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:ja(H,U.headers?U.headers["content-type"]:null),requestBody:ja(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Yt(r))}catch(l){On.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=we(e);let r=typeof n=="string"?{url:n}:_e(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return El(n,i,a)}function Fn(n,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(c){s()&&a(c)})}p()})}var Pl=Cn(nf());var Ee="providers/5.7.2";var xs=new E(Ee),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),c=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(c),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return dn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():xs.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return me(e)}callAddress(e){if(!ie(e,32))return null;let t=me(Se(e,12));return t===mo?null:t}contractAddress(e){return fi(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return zn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?xs.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return he(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Fo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&xs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):xs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&xs.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function Il(n){return n&&typeof n.isCommunityResource=="function"}function bs(n){return Il(n)&&n.isCommunityResource()}var af=!1;function ia(){af||(af=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xe=new E(Ee),Sx=10;function rf(n){return n==null?"null":(Ft(n)!==32&&xe.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function sf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[rf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return rf(e)}).join("&")}function Rx(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function Ar(n){if(typeof n=="string"){if(n=n.toLowerCase(),Ft(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+sf(n);if(Eo.isForkEvent(n))throw xe.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+sf(n.topics||[])}throw new Error("invalid event - "+n)}function gs(){return new Date().getTime()}function of(n){return new Promise(e=>{setTimeout(e,n)})}var Px=["block","network","pending","poll"],Nl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=Rx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Px.indexOf(this.tag)>=0}},Nx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Cl(n){return he(F.from(n).toHexString(),32)}function uf(n){return ga.encode(ce([n,Se(en(en(n)),0,4)]))}var pf=new RegExp("^(ipfs)://(.*)$","i"),df=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eu(n,e){try{return Yt(Ts(n,e))}catch{}return null}function Ts(n,e){if(n==="0x")return null;let t=F.from(Se(n,e,e+32)).toNumber(),a=F.from(Se(n,t,t+32)).toNumber();return Se(n,t+32,t+32+a)}function Sl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):xe.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function lf(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Dx(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function yf(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:Et([e,Oa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=Et(["0x9061b923",yf([is(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&xe.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=Ts(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?Ts(a,0):null})}_getAddress(e,t){let a=Nx[String(e)];if(a==null&&xe.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return uf(ce([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return uf(ce([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Pl.default.toWords(i.slice(2));return o.unshift(s),Pl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===nr?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Cl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&xe.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return xe.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=we(e);t=ce([Cl(64),Cl(t.length),t]),t.length%32!==0&&(t=ce([t,he("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Rl=null,Ox=1,ra=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=bt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):xe.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||xe.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Fn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Rl==null&&(Rl=new X),Rl}static getNetwork(e){return ms(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Bn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return xe.throwError(`response not found during CCIP fetch: ${C}`,E.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return xe.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(gs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=gs(),a=Re({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=gs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=Ox++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)xe.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",xe.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return xe.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield of(0),this._network;let a=xe.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=gs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,c=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield of(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let C=setTimeout(()=>{c()||o(xe.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>zn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&xe.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&xe.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Re(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Re(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Sx&&xe.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Ft(r)%32===4)try{let s=Se(r,4),o=Se(s,0,32);F.from(o).eq(i)||xe.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Se(s,32,64)).toNumber(),c=F.from(Se(s,p,p+32)).toNumber(),x=Se(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Fn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Fn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Re({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&xe.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new Er(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||xe.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Oa(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&xe.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=eu(yield this.call({to:a,data:"0x691f3431"+Oa(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Er(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=eu(yield this.call({to:s,data:"0x691f3431"+Oa(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return xe.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new Nl(Ar(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=Ar(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=Ar(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=Ar(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=Ar(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=Ar(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var Aa=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},It=new E(Ee),Bx=["call","estimateGas"];function ws(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ws(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ws(JSON.parse(n),e)}catch{}return null}function ff(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ws(e,!0);if(r)return r.data;It.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ws(e.body,!1);r==null&&(r=ws(e,!1)),r&&It.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&It.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&It.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&It.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&It.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),Bx.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&It.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function cf(n){return new Promise(function(e){setTimeout(e,n)})}function Fx(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function vs(n){return n&&n.toLowerCase()}var Dl={},Mr=class extends Nt{constructor(e,t,a){if(super(),e!==Dl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):It.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return It.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ol(Dl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&It.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=_e(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>Aa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&It.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Re({tx:Re(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&It.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&It.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),ff("sendTransaction",s,r)))})}signTransaction(e){return It.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Aa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Fn(()=>Aa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return Aa(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&It.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return Aa(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&It.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return Aa(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(vt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&It.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return Aa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Ol=class extends Mr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},Lx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends ra{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=bt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Aa(this,void 0,void 0,function*(){yield cf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=bt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return It.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return It.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Mr(Dl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:xt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Bn(this.connection,JSON.stringify(a),Fx).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[vs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[vs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[vs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[vs(t.address),he(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=bt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=bt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=vs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return Aa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&It.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return ff(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return cf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=_e(Lx);if(t)for(let r in t)t[r]&&(a[r]=!0);Yi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=zn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=dn(e.accessList)),i}};var Ir=null;try{if(Ir=WebSocket,Ir==null)throw new Error("inject please")}catch{let e=new E(Ee);Ir=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Bl=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tu=new E(Ee),Ux=1,Ea=class extends tn{constructor(e,t){t==="any"&&tu.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Ir(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){tu.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){tu.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Bl(this,void 0,void 0,function*(){return null})}set polling(e){!e||tu.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=Ux++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Bl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Bl(this,void 0,void 0,function*(){this.websocket.readyState===Ir.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var Vx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},_s=new E(Ee),ks=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Vx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||_s.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Rt=class extends ks{constructor(e,t){_s.checkAbstract(new.target,Rt),e=bt(new.target,"getNetwork")(e),t=bt(new.target,"getApiKey")(t);let a=bt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){_s.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return _s.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return _s.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var mf=new E(Ee),nu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",As=class extends Ea{constructor(e,t){let a=new Cr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===nu}},Cr=class extends Rt{static getWebSocketProvider(e,t){return new As(e,t)}static getApiKey(e){return e==null?nu:(e&&typeof e!="string"&&mf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:mf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===nu&&ia(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nu}};var jx=new E(Ee),au="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Hx(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return jx.throwArgumentError("unsupported network","name",n)}var Es=class extends Rt{isCommunityResource(){return this.apiKey===au}static getApiKey(e){return e??au}static getUrl(e,t){t==null&&(t=au);let a={allowGzip:!0,url:"https://"+Hx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===au&&ia(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var qx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hf=new E(Ee),Ms=class extends Rt{static getApiKey(e){return e!=null&&hf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:hf.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return qx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var iu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ha=new E(Ee);function xf(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=zn(W(a)):t==="accessList"?a="["+dn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function zx(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function bf(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function gf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Fl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Ha.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Ha.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ha.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Ha.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Ha.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var Is=class extends ra{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Ha.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return iu(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?bf:zx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(c,x)=>(this.isCommunityResource()&&ia(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(c=>`${c}=${r[c]}`).join("&"));let p=yield Bn(o,l,s||bf);return this.emit("debug",{action:"response",request:i,response:xt(p),provider:this}),p})}detectNetwork(){return iu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return iu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Fl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=xf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Fl("call",r,t.transaction)}}case"estimateGas":{let i=xf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Fl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=gf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=gf(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ha.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ha.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var ou=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(a.next(c))}catch(x){s(x)}}function l(c){try{p(a.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ki=new E(Ee);function ru(){return new Date().getTime()}function Tf(n){let e=null;for(let t=0;te?null:(a+i)/2}function Sr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Sr(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Sr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var Gx=1;function wf(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var Wx=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],Kx=["address","args","errorArgs","errorSignature","method","transaction"];function su(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function Jx(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function $x(n,e,t){let a=Sr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=vf(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return vf(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Sr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Sr(i))}:a=function(i){return i==null?null:Sr(i)};break;default:throw new Error("unknown method: "+e)}return Jx(a,n.quorum)}function Cs(n,e){return ou(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Fn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function Qx(n,e,t,a){return ou(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Cs(n,e)),i.getLogs(r)}}return ki.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ss=class extends ra{constructor(e,t){e.length===0&&ki.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let c=bs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=bs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&ki.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&ki.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=Tf(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return ou(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return Tf(e)})}perform(e,t){return ou(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=ru(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Qx(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,ru()),request:{method:e,params:xt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,ru()),request:{method:e,params:xt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,null),request:{method:e,params:xt(t)},provider:this}),p+=_.weight}let c=[];i.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield wf(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return Wx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};Kx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),ki.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),ki.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>su(l)),provider:this})})}};var Ll=null;var uu=new E(Ee),Rs="84842078b09946638c03157f83405213",Ps=class extends Ea{constructor(e,t){let a=new Rr(e,t),i=a.connection;i.password&&uu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Rs}},Rr=class extends Rt{static getWebSocketProvider(e,t){return new Ps(e,t)}static getApiKey(e){let t={apiKey:Rs,projectId:Rs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(uu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),uu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:uu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Rs&&ia(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Rs}};var du=class extends tn{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:xt(o),provider:this}),Bn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,c)=>{let x=l[c];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ul=new E(Ee),Yx="ETHERS_JS_SHARED",Ns=class extends Rt{static getApiKey(e){return e&&typeof e!="string"&&Ul.throwArgumentError("invalid apiKey","apiKey",e),e||Yx}static getUrl(e,t){Ul.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ul.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var _f=new E(Ee),kf="62e1ad51b37b8e00394bda3b",Ds=class extends Rt{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=kf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:_f.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:_f.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===kf}};var Af=new E(Ee),Xx=1;function Ef(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:Xx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:xt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function Zx(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:xt(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var Os=class extends tn{constructor(e,t){e==null&&Af.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=Zx(e)):e.sendAsync?i=Ef(e,e.sendAsync.bind(e)):e.send?i=Ef(e,e.send.bind(e)):Af.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Mf=new E(Ee);function lu(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new tn(n);case"ws":case"wss":return new Ea(n);default:Mf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ms(n);return(!t||!t._defaultProvider)&&Mf.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ss,AlchemyProvider:Cr,AnkrProvider:Es,CloudflareProvider:Ms,EtherscanProvider:Is,InfuraProvider:Rr,JsonRpcProvider:tn,NodesmithProvider:Ns,PocketProvider:Ds,Web3Provider:Os,IpcProvider:null},e)}var te={};Ji(te,{AbiCoder:()=>ar,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>Te,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>St,Indexed:()=>fa,Interface:()=>Ba,LogDescription:()=>or,Logger:()=>E,ParamType:()=>ft,RLP:()=>so,SigningKey:()=>Tn,SupportedAlgorithm:()=>na,TransactionDescription:()=>ur,TransactionTypes:()=>Bo,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>To,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>vt,_fetchData:()=>El,_toEscapedUtf8String:()=>Rd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ga,base64:()=>Fd,checkProperties:()=>Yi,checkResultErrors:()=>Zi,commify:()=>Of,computeAddress:()=>vn,computeHmac:()=>Ta,computePublicKey:()=>os,concat:()=>ce,deepCopy:()=>xt,defaultAbiCoder:()=>ns,defaultPath:()=>va,defineReadOnly:()=>B,dnsEncode:()=>is,entropyToMnemonic:()=>_i,fetchJson:()=>Bn,formatBytes32String:()=>Pd,formatEther:()=>Bf,formatUnits:()=>Vl,getAccountPath:()=>Ec,getAddress:()=>me,getContractAddress:()=>fi,getCreate2Address:()=>Vy,getIcapAddress:()=>Uy,getJsonWalletAddress:()=>vl,getStatic:()=>bt,hashMessage:()=>sr,hexConcat:()=>Et,hexDataLength:()=>Ft,hexDataSlice:()=>Se,hexStripZeros:()=>Td,hexValue:()=>zn,hexZeroPad:()=>he,hexlify:()=>W,id:()=>sn,isAddress:()=>Ly,isBytes:()=>cn,isBytesLike:()=>la,isHexString:()=>ie,isValidMnemonic:()=>Ac,isValidName:()=>Ud,joinSignature:()=>Wr,keccak256:()=>fe,mnemonicToEntropy:()=>vr,mnemonicToSeed:()=>fl,namehash:()=>Oa,nameprep:()=>Bd,parseBytes32String:()=>Nd,parseEther:()=>Ff,parseTransaction:()=>Fo,parseUnits:()=>jl,poll:()=>Fn,randomBytes:()=>aa,recoverAddress:()=>bi,recoverPublicKey:()=>Oo,resolveProperties:()=>Re,ripemd160:()=>ls,serializeTransaction:()=>us,sha256:()=>en,sha512:()=>ll,shallowCopy:()=>_e,shuffled:()=>cs,solidityKeccak256:()=>Sf,solidityPack:()=>pu,soliditySha256:()=>Rf,splitSignature:()=>Gn,stripZeros:()=>nn,toUtf8Bytes:()=>we,toUtf8CodePoints:()=>Da,toUtf8String:()=>Yt,verifyMessage:()=>qc,verifyTypedData:()=>zc,zeroPad:()=>li});var If="solidity/5.7.0";var eb=new RegExp("^bytes([0-9]+)$"),tb=new RegExp("^(u?int)([0-9]*)$"),nb=new RegExp("^(.*)\\[([0-9]*)\\]$"),ab="0000000000000000000000000000000000000000000000000000000000000000",Pr=new E(If);function Cf(n,e,t){switch(n){case"address":return t?li(e,32):j(e);case"string":return we(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?li(e,32):j(e)}let a=n.match(tb);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Pr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),li(e,i/8)}if(a=n.match(eb),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Pr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Pr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+ab).substring(0,66)):e}if(a=n.match(nb),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Pr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Cf(i,o,!0))}),ce(s)}return Pr.throwArgumentError("invalid type","type",n)}function pu(n,e){n.length!=e.length&&Pr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Cf(a,e[i]))}),W(ce(t))}function Sf(n,e){return fe(pu(n,e))}function Rf(n,e){return en(pu(n,e))}var Pf="units/5.7.0";var Nf=new E(Pf),Df=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Of(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Nf.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Vl(n,e){if(typeof e=="string"){let t=Df.indexOf(e);t!==-1&&(e=3*t)}return Qi(n,e??18)}function jl(n,e){if(typeof n!="string"&&Nf.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Df.indexOf(e);t!==-1&&(e=3*t)}return mn(n,e??18)}function Bf(n){return Vl(n,18)}function Ff(n){return jl(n,18)}var yu="ethers/5.7.2";var Lf=new E(yu);try{let n=window;n._ethers==null&&(n._ethers=Hl)}catch{}var Ln;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa"})(Ln||(Ln={}));var cu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom=""})(cu||(cu={}));var Nr;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000"})(Nr||(Nr={}));var fu;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom=""})(fu||(fu={}));var ql;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom=""})(ql||(ql={}));var Bs;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test"})(Bs||(Bs={}));var Fs;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test"})(Fs||(Fs={}));var zl;(function(n){let e;(function(a){a.ETH="0x0000000000000000000000000000000000000000",a.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(a){a.XDAI="0x0000000000000000000000000000000000000000",a.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=n.Gnosis||(n.Gnosis={}))})(zl||(zl={}));var Ae;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(Ae||(Ae={}));var Bt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(Bt||(Bt={}));var Wl="0x12345678",Gl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Gl||(Gl={}));var Me;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(Me||(Me={}));var ye;(function(n){n.CoinMachine="CoinMachine",n.EvaluatedExpenditure="EvaluatedExpenditure",n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation",n.Whitelist="Whitelist"})(ye||(ye={}));var Kl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ai=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};be(Ai,"abi",Kl);var Jl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ei=class{static createInterface(){return new te.Interface(Jl)}static connect(e,t){return new oe(e,Jl,t)}};be(Ei,"abi",Jl);var Uf=(n,e)=>{throw new Error(`${e}: ${n}`)},$l=n=>n!=null;var{keccak256:rb,toUtf8Bytes:sb}=te,{MaxUint256:ob}=gt;var Dr=n=>te.formatEther(n),Or=n=>te.parseEther(n),pn=n=>Or(n[0]),Ql=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(Me.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter($l)},Mi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return ob;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},qa=n=>rb(sb(n));var Br=async(n,e)=>(await Ei.connect(n,e).version()).toNumber(),Yl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter($l);var{hexDataSlice:Xl}=te,{MaxUint256:ub}=gt,Vf=n=>{let e=Xl(n,0,3),t=F.from(Xl(n,4,35)),a=F.from(Xl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},jf=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),ub,r];let o=F.from(Ae.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await Mi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},db=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>jf(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?oa(n,e,t,a[0],i):db(n,e,t,a,i):jf(n,e,t,a,i);var{MaxUint256:Hf}=gt,{AddressZero:lb}=gt;async function pb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),mu(t)}catch{return[]}}async function Ls(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:c,childSkillIndex:x}=Vf(s),C=Ai.connect(r,a.signer||a.provider),_=await pb(C,p);if(_.includes(Me.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${Ae.RootDomain}`);o=Hf}else{let{skillId:U}=await e.getDomain(c),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Hf;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,lb);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:yb}=gt,ua=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Ln.Gnosis;this.endpointUrl=a?.customEndpointUrl||Nr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ua.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ua.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ua.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let c=p+1,x=await this.colony.getDomain(c);return{domainId:c,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,c=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return c&&(p=c?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return ua.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${yb}/noProof`,s=await ua.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var At=n=>Array.from(Array(n-1)).map(e=>e+1);var qf=10,cA=At(qf),zf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Gf=qf-1;var Wf=6,hA=At(Wf),Kf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Jf=Wf-1;var $f=7,gA=At($f),Qf={1:[],2:[],3:[],4:[],5:[],6:[]},Yf=$f-1;var Xf=7,wA=At(Xf),Zf={1:[],2:[],3:[],4:[],5:[],6:[]},em=Xf-1;var tm=4,AA=At(tm),nm={1:[],2:[],3:[]},am=tm-1;var im=5,IA=At(im),rm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},sm=im-1;var om=2,RA=At(om),um={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},dm=om-1;var lm=4,DA=At(lm),pm={1:[1,2,3],2:[1,2,3],3:[1,2,3]},ym=lm-1;var cm=7,FA=At(cm),fm={1:[],2:[],3:[],4:[],5:[],6:[]},mm=cm-1;var hm=11,VA=At(hm),Zl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},ep=hm-1;var xm=6,qA=At(xm),bm={1:[],2:[],3:[],4:[],5:[]},gm=xm-1;var Un=(n,e,t)=>{switch(n){case ye.CoinMachine:{let a=zf[e];return!!a&&!a.includes(t)}case ye.EvaluatedExpenditure:{let a=Kf[e];return!!a&&!a.includes(t)}case ye.FundingQueue:{let a=Qf[e];return!!a&&!a.includes(t)}case ye.IVotingReputation:{let a=Zl[e];return!!a&&!a.includes(t)}case ye.OneTxPayment:{let a=Zf[e];return!!a&&!a.includes(t)}case ye.ReputationBootstrapper:{let a=nm[e];return!!a&&!a.includes(t)}case ye.StagedExpenditure:{let a=um[e];return!!a&&!a.includes(t)}case ye.StakedExpenditure:{let a=rm[e];return!!a&&!a.includes(t)}case ye.StreamingPayments:{let a=pm[e];return!!a&&!a.includes(t)}case ye.TokenSupplier:{let a=fm[e];return!!a&&!a.includes(t)}case ye.VotingReputation:{let a=Zl[e];return!!a&&!a.includes(t)}case ye.Whitelist:{let a=bm[e];return!!a&&!a.includes(t)}default:return Uf(n,"Could not find extension with name")}};var Fr={[ye.CoinMachine]:Gf,[ye.EvaluatedExpenditure]:Jf,[ye.FundingQueue]:Yf,[ye.IVotingReputation]:ep,[ye.OneTxPayment]:em,[ye.ReputationBootstrapper]:am,[ye.StagedExpenditure]:dm,[ye.StakedExpenditure]:sm,[ye.StreamingPayments]:ym,[ye.TokenSupplier]:mm,[ye.VotingReputation]:ep,[ye.Whitelist]:gm};var jh=Cn(Tm(),1);var wp=Cn(Lh(),1);var Ne;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Ne||(Ne={}));var vp=2,Tp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(Tp||(Tp={}));var Uh=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Ax=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),_p=(n,e)=>{let t=(r=>{let a=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&b(M.data)&&typeof M.version=="number",b=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(n);if(t.success){if(t.data.version!==vp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Pe.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let i=Uh(t.errors);throw new Error(i)};var Vh=(n,e)=>{let t=n===Pe.Colony?Ax(e):e,i=(r=>{let a=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&b(M.data)&&typeof M.version=="number",b=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:n,data:t,version:vp});if(!i.success){let r=Uh(i.errors);throw new Error(r)}return i.data};var kp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},Ap=kp;var Ep=(0,jh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ws={[Pe.Annotation]:"Annotation(address,bytes32,string)",[Pe.Colony]:"ColonyMetadata(address,string)",[Pe.Decision]:"Annotation(address,bytes32,string)",[Pe.Domain]:"DomainMetadata(address,uint256,string)",[Pe.Misc]:"",[Pe.DEFAULT]:""},qa=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(Ws).includes(e)}async getMetadata(e,t){let i=this.adapter.getIpfsUrl(e),a=await(await Ep(i)).json();return _p(a,t)}async getMetadataForEvent(e,t){let i=this.adapter.getIpfsUrl(t),a=await(await Ep(i)).json(),s=Object.entries(Ws).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return _p(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),i=await Ep(t);try{return await i.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let i=Vh(e,t),r=JSON.stringify(i);return this.adapter.uploadJson(r)}};var YE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],En=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Ct(En,"abi",Mp);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Mn=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ct(Mn,"abi",Cp);var Ip=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Nr=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Ct(Nr,"abi",Ip);var $u=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],qh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",Ix=n=>n.length>1,Vn=class extends Tr{constructor(...e){Ix(e)?super(...e):super($u,qh,e[0])}deploy(e,t,i,r){return super.deploy(e,t,i,r||{})}getDeployTransaction(e,t,i,r){return super.getDeployTransaction(e,t,i,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface($u)}static connect(e,t){return new oe(e,$u,t)}};Ct(Vn,"bytecode",qh),Ct(Vn,"abi",$u);var Sp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Dr=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Ct(Dr,"abi",Sp);var Rp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Ct(Or,"abi",Rp);var Br;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Br||(Br={}));var Cn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Cn||(Cn={}));var{AddressZero:Hh}=xt;async function Px(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Nx=async(n,e)=>{let t,i=!0,r=!0,a=!0;t=Vn.connect(n,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await Px(t)}catch{i=!1}try{await t.getMetatransactionNonce(Hh)}catch{r=!1}try{await t.nonces(Hh)}catch{a=!1}return i?r?t.tokenClientType=Cn.Colony:(t=Dr.connect(n,e),t.tokenClientType=Cn.ColonyLegacy):a?(t=Mn.connect(n,e),t.tokenClientType=Cn.Erc2612):(t=En.connect(n,e),t.tokenClientType=Cn.Erc20),t.clientType=Br.TokenClient,t},Pp=Nx;var Dx=(n,e)=>{let t=Or.connect(n,e);return t.clientType=Br.TokenLockingClient,t},Np=Dx;var{AddressZero:Dp}=xt,Ox=En.connect(Dp,new si.BaseProvider(3656691)).interface,Bx=Nr.connect(Dp,new si.BaseProvider(3656691)).interface,Fx=Mn.connect(Dp,new si.BaseProvider(3656691)).interface;var Op=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ks=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ks.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Js=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Js.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Fr=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Fr.abi=Fp;var Mi=class{constructor({colonyNetwork:e,contract:t,method:i,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=i,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let i=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Ws[this.txConfig.metadataType],t.metadata);return[t,e,i]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:i}=t;if(!i)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return i.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Ux,solidityKeccak256:Vx,splitSignature:jx}=te,Lr=class extends Mi{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Ln.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await i.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=Vx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=Ux(d),c=await i.signMessage(p),{r:b,s:I,v:_}=jx(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(i=>i.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(i=>i.name===n);if(t?.args)return t.args}},Qu=(n,e,t)=>{let i;"events"in e&&e.events?i=e.events:"logs"in e&&e.logs?i=e.logs:i=[];for(let r=0;r{let i=await this.getMotionTx(t);return[i,this.getMotionMined.bind(this,i)]},mined:async()=>{let i=await this.getMotionTx(t);return this.getMotionMined(i)},encode:async()=>{let[i]=await this.getEncodedMotionTx(t);return i}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let i=await this.getMetaMotionTx(t);return[i,this.getMetaMotionMinded.bind(this,i)]},mined:async()=>{let i=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(i)}}}};var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ur=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Ur.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Vr.abi=Up;var Vp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],jr=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};jr.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qr=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};qr.abi=jp;var qp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hr=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Hr.abi=qp;var Hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Gr=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Gr.abi=Hp;var{AddressZero:Jx}=xt,jn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Hi(jn.extensionType),e.address);if(t===Jx)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let i=await Ba(t,e.colonyNetwork.signerOrProvider);if(!Un(jn.extensionType,i,e.version))throw new Error(`Version ${i} of the ${jn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=jn.supportedVersions.find(s=>s.version===i)?.factory;if(!r)throw new Error(`Version ${i} of the ${jn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new jn(e,a,i)}static getLatestSupportedVersion(){return jn.supportedVersions[jn.supportedVersions.length-1]?.version}constructor(e,t,i){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=i}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,i,r){let a=[].concat(e),s=i||ke.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await oi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ee.Administration,Ee.Funding],this.oneTxPaymentContract.address),[S,L]=await oi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ee.Administration,Ee.Funding]);return[_,v,S,L,c,I,b,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Hi(ye.OneTxPayment),t],async i=>({...ne("ExtensionUpgraded",i)}))}},Wi=jn;Wi.supportedVersions=[{version:3,factory:qr},{version:4,factory:Hr},{version:5,factory:Gr}],Wi.extensionType=ye.OneTxPayment;var qn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async i=>({...ne("Transfer",i)}))}transferFrom(e,t,i){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,i],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[t||i.address,e]},async i=>({...ne("Approval",i)}))}};var $s=class extends qn{constructor(t,i){super(t,i);typeof i=="string"?this.tokenClient=Vn.connect(i,t.signerOrProvider):this.tokenClient=i,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async i=>({...ne("LogSetAuthority",i)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async i=>({...ne("LogSetOwner",i)}))}};var Qs=class extends qn{constructor(t,i){super(t,i);typeof i=="string"?this.tokenClient=Mn.connect(i,t.signerOrProvider):this.tokenClient=i,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,i){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[i||r.address,t]},async r=>({...ne("Approval",r)}))}};var Gh=async(n,e)=>{let t=await Pp(e,n.signerOrProvider);switch(t.tokenClientType){case Cn.Colony:return new $s(n,t);case Cn.Erc20:return new qn(n,t);case Cn.Erc2612:return new Qs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zr=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};zr.abi=Gp;var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wr=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Wr.abi=zp;var Wp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Kr=class{static createInterface(){return new te.Interface(Wp)}static connect(e,t){return new oe(e,Wp,t)}};Kr.abi=Wp;var{AddressZero:Kp}=xt;var Yu=F.from(10).pow(18),Hn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Hi(Hn.extensionType),e.address);if(t===Kp)throw new Error(`${Hn.extensionType} extension is not installed for this Colony`);let i=await Ba(t,e.colonyNetwork.signerOrProvider);if(!Un(Hn.extensionType,i,e.version))throw new Error(`Version ${i} of the ${Hn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Hn.supportedVersions.find(s=>s.version===i)?.factory;if(!r)throw new Error(`Version ${i} of the ${Hn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Hn(e,a,i)}static getLatestSupportedVersion(){return Hn.supportedVersions[Hn.supportedVersions.length-1]?.version}constructor(e,t,i){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=i}async createMotionSalt(e){let{address:t}=this.votingReputationContract,i=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${i}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,i){let{key:r,value:a,branchMask:s,siblings:o}=i,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,i,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,i,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:i,value:r,branchMask:a,siblings:s}=await Ls(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Kp,Wd);return[e,t,Kp,Wd,i,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let i;return typeof t=="string"?i=t:i=await this.colony.colonyNetwork.ipfs.uploadMetadata(Pe.Decision,t),[e,i]},async i=>({...ne("Annotation",i)}),{metadataType:Pe.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async i=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Qu("UserTokenApproved",i,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,i){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Bt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Bt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(i))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(i))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(i))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(i).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Da(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await oi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Ee.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:q,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),i,U,q,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let i=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Bt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Bt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",i,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let i=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Bt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Bt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",i,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let i=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Bt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Bt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Mr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",i,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Bt[i]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async i=>({...ne("MotionFinalized",i)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Hi(ye.VotingReputation),t],async i=>({...ne("ExtensionUpgraded",i)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,i,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:i,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Ki=Hn;Ki.supportedVersions=[{version:7,factory:zr},{version:8,factory:Wr},{version:9,factory:Kr}],Ki.extensionType=ye.VotingReputation;var Xx={["motion"]:Ki,["oneTx"]:Wi},Ga=class{static async connect(e,t){let i=await Ba(t,e.signerOrProvider),r=Ga.supportedVersions.find(p=>p.version===i)?.factory;if(!r)throw new Error(`Version ${i} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await Gh(e,s),d=new Ga(e,a,o,i);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return Ga.supportedVersions[Ga.supportedVersions.length-1].version}constructor(e,t,i,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ui(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=i,this.version=r}createColonyTxCreator(e,t,i,r,a){return new Ha({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:i,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,i,r,a,s){return new Ha({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:i,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ki.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Wi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new qn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Pe.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Domain,e),[ke.RootDomain,t]},{roles:Ee.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:Ee.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Domain,e),[ke.RootDomain,t]},{roles:Ee.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Pe.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Ee.Architecture,domain:e},async i=>({...ne("DomainDeprecated",i)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async i=>({...ne("ColonyFundsClaimed",i)}))}moveFundsToTeam(e,t,i,r){let a=ke.RootDomain,s=i||ke.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await oi(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Ee.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await Mr(b,this.colony,a,s),_=await Mr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=ke.RootDomain,i=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,i)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:i}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(i,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async i=>({...ne("ArbitraryTransaction",i)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let i;return typeof t=="string"?i=t:i=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Annotation,t),[e,i]},async i=>({...ne("Annotation",i)}),{metadataType:Pe.Annotation})}installExtension(e){let t=Xx[e],i=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Un(r,i,this.version))throw new Error(`v${i} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Hi(r),t.getLatestSupportedVersion()],async s=>({...Qu("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=ke.RootDomain){let i=await this.colony.getUserRoles(e,t);return mu(i)}setRoles(e,t,i=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,i),a=Array.from(new Set([...r,...[].concat(t)])),s=Qd(a);return[e,i,s]},{roles:Ee.Architecture,domain:i},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,i=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,i)).filter(o=>![].concat(t).includes(o)),s=Qd(a);return[e,i,s]},{roles:Ee.Architecture,domain:i},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let i=[],r=await t.getTokenLocking();return e?i=[...e,r]:i=[r],[this.token.address,this.address,i]},async i=>({...ne("TokenAuthorityDeployed",i)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async i=>({...ne("ColonyUpgraded",i)}))}awardReputation(e,t,i=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[i,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,i=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[i,e,F.from(0).sub(t)],{domain:i,roles:Ee.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},za=Ga;za.supportedVersions=[{version:11,factory:Ur},{version:12,factory:Vr},{version:13,factory:jr}];var{splitSignature:Zx}=te,Xu=class extends Mi{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,i]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Ln.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:i,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Zx(b),S={target:e,owner:o,spender:t,value:i.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ys=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Np(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async i=>({...ne("UserTokenDeposited",i)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async i=>({...ne("UserTokenWithdrawn",i)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,i){return this.tokenLockingContract.getApproval(t,e,i)}};var{namehash:zh}=te,{AddressZero:Jp}=xt,Xs=class{constructor(e,t){this.network=t?.network||Ln.Gnosis,this.ipfs=new qa(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||fu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Na[this.network]},this.networkContract=Fr.connect(t?.customNetworkAddress||cu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Ys(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,i,r,a){return new Mi({colonyNetwork:this,contract:e,method:t,args:i,eventData:r,txConfig:a})}createMetaTxCreator(e,t,i,r,a){return new Lr({colonyNetwork:this,contract:e,method:t,args:i,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,i,r,a){return new Xu({colonyNetwork:this,contract:e,method:t,args:i,eventData:r,txConfig:a})}createColony(e,t,i){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Jp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return i?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof i=="string"?a[6]=i:a[6]=await this.ipfs.uploadMetadata(Pe.Colony,i),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return za.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.network],""):null}async getColonyAddress(e){let t=zh(`${e}${Bs[this.network]}`),i=await this.networkContract.addr(t);return i!==Jp?i:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Fs[this.network],""):null}async getUserAddress(e){let t=zh(`${e}${Fs[this.network]}`),i=await this.networkContract.addr(t);return i!==Jp?i:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async i=>({...ne("UserLabelRegistered",i)}))}deployToken(e,t,i=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,i],async r=>({...ne("TokenDeployed",r)}))}};var Wh=async n=>{if(!n.ext.oneTx){if(!Un(ye.OneTxPayment,Fa[ye.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Fa[ye.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Ee.Administration,Ee.Funding]).tx().mined()}},Kh=async n=>{if(!n.ext.motions){if(!Un(ye.VotingReputation,Fa[ye.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Fa[ye.VotingReputation]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("motion").tx().mined(),await n.updateExtensions(),!n.ext.motions)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.motions;await n.setRoles(e.address,[Ee.Recovery,Ee.Root,Ee.Arbitration,Ee.Architecture,Ee.Funding,Ee.Administration]).tx().mined(),await(await e.getInternalVotingReputationContract().initialise(pn`0.01`,pn`0.2`,pn`0.01`,pn`0.7`,6*60,6*60,6*60,6*60)).wait()}};var{isAddress:ng}=te,$p=new si.JsonRpcProvider("http://127.0.0.1:8545"),el,De,yn,ig=()=>new dn("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",$p),rg=async n=>{let e=ig();el=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),De=await el.getMetaColony()},ag=async()=>{if(await Wh(De),await Kh(De),De=await el.getMetaColony(),!De.ext.oneTx)throw new Error("OneTxPayment extension not installed");await De.mint(pn`500`).tx().mined(),await De.claimFunds().tx().mined(),await De.ext.oneTx.pay("0xb77D57F4959eAfA0339424b83FcFaf9c15407461",pn`100`).tx().mined(),await De.ext.oneTx.pay("0x9df24e73f40b2a911eb254a8825103723e13209c",pn`20`).tx().mined()},sg=async n=>{if(!De.ext.motions)throw new Error("VotingReputation extension not installed");if(!De.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[{motionId:e}]=await De.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Oa(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},og=async n=>{if(!De.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await De.ext.motions.getMotion(n);yn=F.from(n);let t=await De.ext.motions?.getRemainingStakes(n),i=await De.ext.motions.getMotionState(n);return{...e,motionState:Bt[i],remainingStakes:t}},ug=async()=>{await De.token.approve(pn`20`).tx().mined(),await(await el.getTokenLocking()).deposit(De.token.address,pn`20`).tx().mined(),await De.ext.motions?.approveStake(pn`20`).tx().mined()},lg=async n=>{await De.ext.motions?.stakeMotion(yn,1,n).tx().mined()},dg=async n=>{await De.ext.motions?.stakeMotion(yn,0,n).tx().mined()},pg=async()=>{await De.ext.motions?.submitVote(yn,1).tx().mined()},yg=async()=>{await De.ext.motions?.submitVote(yn,0).tx().mined()},cg=async()=>{await Yp(7*60),await De.ext.motions?.revealVote(yn).tx().mined()},fg=async()=>{await Yp(7*60),await De.ext.motions?.finalizeMotion(yn).tx().mined()},Yp=async n=>{await $p.send("evm_increaseTime",[n]),await $p.send("evm_mine",[])},Zu=document.querySelector("#address"),Qp=document.querySelector("#payment_amount"),Xp=document.querySelector("#stake_amount"),Jh=document.querySelector("#button_create_motion"),$h=document.querySelector("#motion_id"),Qh=document.querySelector("#button_connect"),Yh=document.querySelector("#button_bootstrap"),Xh=document.querySelector("#button_stake_clny"),Zh=document.querySelector("#button_get_motion"),e6=document.querySelector("#button_jump"),t6=document.querySelector("#button_stake_yay"),n6=document.querySelector("#button_stake_nay"),i6=document.querySelector("#button_vote_yay"),r6=document.querySelector("#button_vote_nay"),a6=document.querySelector("#button_reveal"),s6=document.querySelector("#button_finalize"),Zp=document.querySelector("#error"),o6=document.querySelector("#result");if(!Zu||!Qp||!$h||!Xp||!Zp||!o6||!Qh||!Yh||!Xh||!Jh||!Zh||!e6||!t6||!n6||!i6||!r6||!a6||!s6)throw new Error("Could not find all required HTML elements");var Pt=n=>{Zp.innerText=`Found an error: ${n.message}`,console.error(n)},li=()=>{Zp.innerText=""},_e=n=>{o6.innerText=n};Qh.addEventListener("click",async()=>{li();let n=Zu.value;if(!ng(n))return Pt(new Error("This is not a valid address"));_e("Processing...");try{await rg(Zu.value),_e(` - Connected to Colony with address: ${De.address}. - Colony version: ${De.version}. - `)}catch(e){Pt(e),_e("")}finally{Zu.value=""}return null});Yh.addEventListener("click",async()=>{li(),_e("Processing...");try{await ag()}catch(n){Pt(n),_e("")}_e("Everything was set up successfully. You may now proceed. Remember, this is only necessary once for this example (even after reload)")});Xh.addEventListener("click",async()=>{li(),_e("Processing...");try{await ug()}catch(n){Pt(n),_e("")}_e("Successfully approved tokens for use in staking")});Jh.addEventListener("click",async()=>{li(),_e("Processing...");try{let n=Qp.value,e=await sg(n);_e(`Motion created! Motion ID is: ${e}`)}catch(n){Pt(n),_e("")}finally{Qp.value=""}return null});Zh.addEventListener("click",async()=>{let n=$h.value;_e("Processing...");try{let{domainId:e,altTarget:t,action:i,motionState:r,remainingStakes:a}=await og(n),s={domainId:e.toString(),altTarget:t,action:i,motionState:r,remainingYayStakes:Da(a.remainingToFullyYayStaked),remainingNayStakes:Da(a.remainingToFullyNayStaked)};_e(JSON.stringify(s))}catch(e){Pt(e),_e("")}});e6.addEventListener("click",async()=>{await Yp(3600),_e("Whooo that was a hell of a ride. Welcome to the future")});t6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");let n=Oa(Xp.value);try{await lg(n)}catch(e){Pt(e),_e("");return}_e("Staked! Feel free to refresh the motion to see the new values")});n6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");let n=Oa(Xp.value);try{await dg(n)}catch(e){Pt(e),_e("");return}_e("Staked! Feel free to refresh the motion to see the new values")});i6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");try{await pg()}catch(n){Pt(n),_e("");return}_e("Voted yay!")});r6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");try{await yg()}catch(n){Pt(n),_e("");return}_e("Voted nay!")});a6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");try{await cg()}catch(n){Pt(n),_e("");return}_e("Vote successfully revealed!")});s6.addEventListener("click",async()=>{if(li(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}_e("Processing...");try{await fg()}catch(n){Pt(n),_e("");return}_e("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); +`)}`,A1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),_p=(n,e)=>{let t=(i=>{let r=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,c,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==vp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Ne.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=Uh(t.errors);throw new Error(a)};var Vh=(n,e)=>{let t=n===Ne.Colony?A1(e):e,a=(i=>{let r=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,c,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:n,data:t,version:vp});if(!a.success){let i=Uh(a.errors);throw new Error(i)}return a.data};var kp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},Ap=kp;var Ep=(0,jh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ws={[Ne.Annotation]:"Annotation(address,bytes32,string)",[Ne.Colony]:"ColonyMetadata(address,string)",[Ne.Decision]:"Annotation(address,bytes32,string)",[Ne.Domain]:"DomainMetadata(address,uint256,string)",[Ne.Misc]:"",[Ne.DEFAULT]:""},Hr=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(Ws).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ep(a)).json();return _p(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ep(a)).json(),s=Object.entries(Ws).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return _p(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await Ep(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=Vh(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var hM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],En=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};be(En,"abi",Mp);var Ip=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Mn=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Mn,"abi",Ip);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};be(Ni,"abi",Cp);var $u=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Hh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",J1=n=>n.length>1,Vn=class extends Ti{constructor(...e){J1(e)?super(...e):super($u,Hh,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface($u)}static connect(e,t){return new oe(e,$u,t)}};be(Vn,"bytecode",Hh),be(Vn,"abi",$u);var Sp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Di,"abi",Sp);var Rp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};be(Oi,"abi",Rp);var Bi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Bi||(Bi={}));var In;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(In||(In={}));var{AddressZero:qh}=gt;async function Y1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var X1=async(n,e)=>{let t,a=!0,i=!0,r=!0;t=Vn.connect(n,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await Y1(t)}catch{a=!1}try{await t.getMetatransactionNonce(qh)}catch{i=!1}try{await t.nonces(qh)}catch{r=!1}return a?i?t.tokenClientType=In.Colony:(t=Di.connect(n,e),t.tokenClientType=In.ColonyLegacy):r?(t=Mn.connect(n,e),t.tokenClientType=In.Erc2612):(t=En.connect(n,e),t.tokenClientType=In.Erc20),t.clientType=Bi.TokenClient,t},Pp=X1;var Z1=(n,e)=>{let t=Oi.connect(n,e);return t.clientType=Bi.TokenLockingClient,t},Np=Z1;var{AddressZero:Dp}=gt,eg=En.connect(Dp,new sa.BaseProvider(3656691)).interface,tg=Ni.connect(Dp,new sa.BaseProvider(3656691)).interface,ng=Mn.connect(Dp,new sa.BaseProvider(3656691)).interface;var Op=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ks=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ks.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Js=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Js.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Fi.abi=Fp;var Ma=class{constructor({colonyNetwork:e,contract:t,method:a,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Ws[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:a}=t;if(!a)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return a.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:ig,solidityKeccak256:rg,splitSignature:sg}=te,Li=class extends Ma{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let a=this.colonyNetwork.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Ln.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=rg(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=ig(l),c=await a.signMessage(p),{r:x,s:C,v:_}=sg(c),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Qu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=Ae.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Ui.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Vi.abi=Up;var Vp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],ji=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};ji.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Hi.abi=jp;var Hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};qi.abi=Hp;var qp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};zi.abi=qp;var{AddressZero:cg}=gt,jn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(jn.extensionType),e.address);if(t===cg)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let a=await Br(t,e.colonyNetwork.signerOrProvider);if(!Un(jn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${jn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=jn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${jn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new jn(e,r,a)}static getLatestSupportedVersion(){return jn.supportedVersions[jn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||Ae.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let c=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await oa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding],this.oneTxPaymentContract.address),[S,L]=await oa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding]);return[_,v,S,L,c,C,x,s,Ae.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(ye.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Wa=jn;Wa.supportedVersions=[{version:3,factory:Hi},{version:4,factory:qi},{version:5,factory:zi}],Wa.extensionType=ye.OneTxPayment;var Hn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var $s=class extends Hn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Vn.connect(a,t.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var Qs=class extends Hn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Mn.connect(a,t.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var zh=async(n,e)=>{let t=await Pp(e,n.signerOrProvider);switch(t.tokenClientType){case In.Colony:return new $s(n,t);case In.Erc20:return new Hn(n,t);case In.Erc2612:return new Qs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Gi.abi=zp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};Wi.abi=Gp;var Wp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ki=class{static createInterface(){return new te.Interface(Wp)}static connect(e,t){return new oe(e,Wp,t)}};Ki.abi=Wp;var{AddressZero:Kp}=gt;var Yu=F.from(10).pow(18),qn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(qn.extensionType),e.address);if(t===Kp)throw new Error(`${qn.extensionType} extension is not installed for this Colony`);let a=await Br(t,e.colonyNetwork.signerOrProvider);if(!Un(qn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${qn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=qn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${qn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new qn(e,r,a)}static getLatestSupportedVersion(){return qn.supportedVersions[qn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ls(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Kp,Wl);return[e,t,Kp,Wl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.colonyNetwork.ipfs.uploadMetadata(Ne.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Decision})}approveStake(e,t=Ae.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Qu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Bt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Bt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(a).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Dr(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await oa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Me.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),c=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,c,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Mi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:c,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,c,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==Bt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Bt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(ye.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ka=qn;Ka.supportedVersions=[{version:7,factory:Gi},{version:8,factory:Wi},{version:9,factory:Ki}],Ka.extensionType=ye.VotingReputation;var xg={["motion"]:Ka,["oneTx"]:Wa},zr=class{static async connect(e,t){let a=await Br(t,e.signerOrProvider),i=zr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await zh(e,s),l=new zr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return zr.supportedVersions[zr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ua(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new qr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new qr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ka.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Hn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Ne.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Ne.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Ne.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[Ae.RootDomain],{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Ne.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Me.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=Ae.RootDomain,s=a||Ae.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await oa(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Me.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await Mi(x,this.colony,r,s),_=await Mi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=Ae.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=Ae.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colonyNetwork.ipfs.uploadMetadata(Ne.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Annotation})}installExtension(e){let t=xg[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Un(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[qa(i),t.getLatestSupportedVersion()],async s=>({...Qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=Ae.RootDomain){let a=await this.colony.getUserRoles(e,t);return mu(a)}setRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:Me.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Gr=zr;Gr.supportedVersions=[{version:11,factory:Ui},{version:12,factory:Vi},{version:13,factory:ji}];var{splitSignature:bg}=te,Xu=class extends Ma{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Ln.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:c}),{r:C,s:_,v}=bg(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:c,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ys=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Np(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var{namehash:Gh}=te,{AddressZero:Jp}=gt,Xs=class{constructor(e,t){this.network=t?.network||Ln.Gnosis,this.ipfs=new Hr(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||fu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Nr[this.network]},this.networkContract=Fi.connect(t?.customNetworkAddress||cu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Ys(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,a,i,r){return new Ma({colonyNetwork:this,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Li({colonyNetwork:this,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Xu({colonyNetwork:this,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Jp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.ipfs.uploadMetadata(Ne.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Ne.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Gr.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.network],""):null}async getColonyAddress(e){let t=Gh(`${e}${Bs[this.network]}`),a=await this.networkContract.addr(t);return a!==Jp?a:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Fs[this.network],""):null}async getUserAddress(e){let t=Gh(`${e}${Fs[this.network]}`),a=await this.networkContract.addr(t);return a!==Jp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var Wh=async n=>{if(!n.ext.oneTx){if(!Un(ye.OneTxPayment,Fr[ye.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Fr[ye.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Me.Administration,Me.Funding]).tx().mined()}},Kh=async n=>{if(!n.ext.motions){if(!Un(ye.VotingReputation,Fr[ye.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Fr[ye.VotingReputation]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("motion").tx().mined(),await n.updateExtensions(),!n.ext.motions)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.motions;await n.setRoles(e.address,[Me.Recovery,Me.Root,Me.Arbitration,Me.Architecture,Me.Funding,Me.Administration]).tx().mined(),await(await e.getInternalVotingReputationContract().initialise(pn`0.01`,pn`0.2`,pn`0.01`,pn`0.7`,6*60,6*60,6*60,6*60)).wait()}};var{isAddress:vg}=te,$p=new sa.JsonRpcProvider("http://127.0.0.1:8545"),ed,Oe,yn,wg=()=>new ln("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",$p),_g=async n=>{let e=wg();ed=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),Oe=await ed.getMetaColony()},kg=async()=>{if(await Wh(Oe),await Kh(Oe),Oe=await ed.getMetaColony(),!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");await Oe.mint(pn`500`).tx().mined(),await Oe.claimFunds().tx().mined(),await Oe.ext.oneTx.pay("0xb77D57F4959eAfA0339424b83FcFaf9c15407461",pn`100`).tx().mined(),await Oe.ext.oneTx.pay("0x9df24e73f40b2a911eb254a8825103723e13209c",pn`20`).tx().mined()},Ag=async n=>{if(!Oe.ext.motions)throw new Error("VotingReputation extension not installed");if(!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[{motionId:e}]=await Oe.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Or(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},Eg=async n=>{if(!Oe.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Oe.ext.motions.getMotion(n);yn=F.from(n);let t=await Oe.ext.motions?.getRemainingStakes(n),a=await Oe.ext.motions.getMotionState(n);return{...e,motionState:Bt[a],remainingStakes:t}},Mg=async()=>{await Oe.token.approve(pn`20`).tx().mined(),await(await ed.getTokenLocking()).deposit(Oe.token.address,pn`20`).tx().mined(),await Oe.ext.motions?.approveStake(pn`20`).tx().mined()},Ig=async n=>{await Oe.ext.motions?.stakeMotion(yn,1,n).tx().mined()},Cg=async n=>{await Oe.ext.motions?.stakeMotion(yn,0,n).tx().mined()},Sg=async()=>{await Oe.ext.motions?.submitVote(yn,1).tx().mined()},Rg=async()=>{await Oe.ext.motions?.submitVote(yn,0).tx().mined()},Pg=async()=>{await Yp(7*60),await Oe.ext.motions?.revealVote(yn).tx().mined()},Ng=async()=>{await Yp(7*60),await Oe.ext.motions?.finalizeMotion(yn).tx().mined()},Yp=async n=>{await $p.send("evm_increaseTime",[n]),await $p.send("evm_mine",[])},Zu=document.querySelector("#address"),Qp=document.querySelector("#payment_amount"),Xp=document.querySelector("#stake_amount"),Jh=document.querySelector("#button_create_motion"),$h=document.querySelector("#motion_id"),Qh=document.querySelector("#button_connect"),Yh=document.querySelector("#button_bootstrap"),Xh=document.querySelector("#button_stake_clny"),Zh=document.querySelector("#button_get_motion"),e6=document.querySelector("#button_jump"),t6=document.querySelector("#button_stake_yay"),n6=document.querySelector("#button_stake_nay"),a6=document.querySelector("#button_vote_yay"),i6=document.querySelector("#button_vote_nay"),r6=document.querySelector("#button_reveal"),s6=document.querySelector("#button_finalize"),Zp=document.querySelector("#error"),o6=document.querySelector("#result");if(!Zu||!Qp||!$h||!Xp||!Zp||!o6||!Qh||!Yh||!Xh||!Jh||!Zh||!e6||!t6||!n6||!a6||!i6||!r6||!s6)throw new Error("Could not find all required HTML elements");var Pt=n=>{Zp.innerText=`Found an error: ${n.message}`,console.error(n)},da=()=>{Zp.innerText=""},ke=n=>{o6.innerText=n};Qh.addEventListener("click",async()=>{da();let n=Zu.value;if(!vg(n))return Pt(new Error("This is not a valid address"));ke("Processing...");try{await _g(Zu.value),ke(` + Connected to Colony with address: ${Oe.address}. + Colony version: ${Oe.version}. + `)}catch(e){Pt(e),ke("")}finally{Zu.value=""}return null});Yh.addEventListener("click",async()=>{da(),ke("Processing...");try{await kg()}catch(n){Pt(n),ke("")}ke("Everything was set up successfully. You may now proceed. Remember, this is only necessary once for this example (even after reload)")});Xh.addEventListener("click",async()=>{da(),ke("Processing...");try{await Mg()}catch(n){Pt(n),ke("")}ke("Successfully approved tokens for use in staking")});Jh.addEventListener("click",async()=>{da(),ke("Processing...");try{let n=Qp.value,e=await Ag(n);ke(`Motion created! Motion ID is: ${e}`)}catch(n){Pt(n),ke("")}finally{Qp.value=""}return null});Zh.addEventListener("click",async()=>{let n=$h.value;ke("Processing...");try{let{domainId:e,altTarget:t,action:a,motionState:i,remainingStakes:r}=await Eg(n),s={domainId:e.toString(),altTarget:t,action:a,motionState:i,remainingYayStakes:Dr(r.remainingToFullyYayStaked),remainingNayStakes:Dr(r.remainingToFullyNayStaked)};ke(JSON.stringify(s))}catch(e){Pt(e),ke("")}});e6.addEventListener("click",async()=>{await Yp(3600),ke("Whooo that was a hell of a ride. Welcome to the future")});t6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");let n=Or(Xp.value);try{await Ig(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});n6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");let n=Or(Xp.value);try{await Cg(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});a6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await Sg()}catch(n){Pt(n),ke("");return}ke("Voted yay!")});i6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await Rg()}catch(n){Pt(n),ke("");return}ke("Voted nay!")});r6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await Pg()}catch(n){Pt(n),ke("");return}ke("Vote successfully revealed!")});s6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await Ng()}catch(n){Pt(n),ke("");return}ke("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-reputation.js b/local-reputation.js index ef73eb9bd..c6beae64e 100644 --- a/local-reputation.js +++ b/local-reputation.js @@ -1,12 +1,12 @@ -"use strict";(()=>{var Xh=Object.create;var Js=Object.defineProperty;var Yh=Object.getOwnPropertyDescriptor;var Zh=Object.getOwnPropertyNames;var e6=Object.getPrototypeOf,t6=Object.prototype.hasOwnProperty;var n6=(i,e,t)=>e in i?Js(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Gr=(i,e)=>{for(var t in e)Js(i,t,{get:e[t],enumerable:!0})},i6=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Zh(e))!t6.call(i,r)&&r!==t&&Js(i,r,{get:()=>e[r],enumerable:!(n=Yh(e,r))||n.enumerable});return i};var An=(i,e,t)=>(t=i!=null?Xh(e6(i)):{},i6(e||!i||!i.__esModule?Js(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(n6(i,typeof e!="symbol"?e+"":e,t),t);var Qp=ie(()=>{});var ml=ie((Xp,fl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Qp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[k]|=h<>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);else if(x==="le")for(w=0,k=0;w>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)A=o(u,y,w)<=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8}this._strip()};function d(C,u,y,x){for(var w=0,k=0,h=Math.min(C.length,y),A=u;A=49?k=g-49+10:g>=17?k=g-17+10:k=g,t(g>=0&&k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,k=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),k!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(k!==0&&(x=k.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),k=x||Math.max(1,w);t(w<=k,"byte array longer than desired length"),t(k>0,"Requested array length <= 0");var h=v(u,k),A=y==="le"?"LE":"BE";return this["_toArrayLike"+A](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,k=0,h=0;k>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x=0&&(u[x--]=A>>8&255),x>=0&&(u[x--]=A>>16&255),h===6?(x>=0&&(u[x--]=A>>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var k=0,h=0;h>>26;for(;k!==0&&h>>26;if(this.length=x.length,k!==0)this.words[this.length]=k,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,k;x>0?(w=this,k=u):(w=u,k=this);for(var h=0,A=0;A>26,this.words[A]=y&67108863;for(;h!==0&&A>26,this.words[A]=y&67108863;if(h===0&&A>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,k=u.words[P]|0,h=w*k+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,k=y.words,h=x.words,A=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,de=yt>>>13,Hi=w[4]|0,Ne=Hi&8191,De=Hi>>>13,Gi=w[5]|0,Oe=Gi&8191,Be=Gi>>>13,zi=w[6]|0,Fe=zi&8191,Le=zi>>>13,Wi=w[7]|0,Ue=Wi&8191,je=Wi>>>13,Ki=w[8]|0,Ve=Ki&8191,qe=Ki>>>13,Ji=w[9]|0,He=Ji&8191,Ge=Ji>>>13,$i=k[0]|0,ze=$i&8191,We=$i>>>13,Qi=k[1]|0,Ke=Qi&8191,Je=Qi>>>13,Xi=k[2]|0,$e=Xi&8191,Qe=Xi>>>13,Yi=k[3]|0,Xe=Yi&8191,Ye=Yi>>>13,Zi=k[4]|0,Ze=Zi&8191,et=Zi>>>13,er=k[5]|0,tt=er&8191,nt=er>>>13,tr=k[6]|0,it=tr&8191,rt=tr>>>13,nr=k[7]|0,at=nr&8191,st=nr>>>13,ir=k[8]|0,ot=ir&8191,ut=ir>>>13,rr=k[9]|0,lt=rr&8191,dt=rr>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,ze),l=Math.imul(f,We),l=l+Math.imul(P,ze)|0,m=Math.imul(P,We);var _i=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(j,ze),l=Math.imul(j,We),l=l+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(f,Ke)|0,l=l+Math.imul(f,Je)|0,l=l+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var Ai=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,g=Math.imul(X,ze),l=Math.imul(X,We),l=l+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(j,Ke)|0,l=l+Math.imul(j,Je)|0,l=l+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(f,$e)|0,l=l+Math.imul(f,Qe)|0,l=l+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var ki=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,g=Math.imul(Z,ze),l=Math.imul(Z,We),l=l+Math.imul(de,ze)|0,m=Math.imul(de,We),g=g+Math.imul(X,Ke)|0,l=l+Math.imul(X,Je)|0,l=l+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(j,$e)|0,l=l+Math.imul(j,Qe)|0,l=l+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(f,Xe)|0,l=l+Math.imul(f,Ye)|0,l=l+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var Mi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,g=Math.imul(Ne,ze),l=Math.imul(Ne,We),l=l+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,l=l+Math.imul(Z,Je)|0,l=l+Math.imul(de,Ke)|0,m=m+Math.imul(de,Je)|0,g=g+Math.imul(X,$e)|0,l=l+Math.imul(X,Qe)|0,l=l+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(j,Xe)|0,l=l+Math.imul(j,Ye)|0,l=l+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(f,Ze)|0,l=l+Math.imul(f,et)|0,l=l+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Ei=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,g=Math.imul(Oe,ze),l=Math.imul(Oe,We),l=l+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,l=l+Math.imul(Ne,Je)|0,l=l+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,l=l+Math.imul(Z,Qe)|0,l=l+Math.imul(de,$e)|0,m=m+Math.imul(de,Qe)|0,g=g+Math.imul(X,Xe)|0,l=l+Math.imul(X,Ye)|0,l=l+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(j,Ze)|0,l=l+Math.imul(j,et)|0,l=l+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(f,tt)|0,l=l+Math.imul(f,nt)|0,l=l+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var el=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(Fe,ze),l=Math.imul(Fe,We),l=l+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,l=l+Math.imul(Oe,Je)|0,l=l+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,l=l+Math.imul(Ne,Qe)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,l=l+Math.imul(Z,Ye)|0,l=l+Math.imul(de,Xe)|0,m=m+Math.imul(de,Ye)|0,g=g+Math.imul(X,Ze)|0,l=l+Math.imul(X,et)|0,l=l+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(j,tt)|0,l=l+Math.imul(j,nt)|0,l=l+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(f,it)|0,l=l+Math.imul(f,rt)|0,l=l+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var tl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(Ue,ze),l=Math.imul(Ue,We),l=l+Math.imul(je,ze)|0,m=Math.imul(je,We),g=g+Math.imul(Fe,Ke)|0,l=l+Math.imul(Fe,Je)|0,l=l+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,l=l+Math.imul(Oe,Qe)|0,l=l+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,l=l+Math.imul(Ne,Ye)|0,l=l+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,l=l+Math.imul(Z,et)|0,l=l+Math.imul(de,Ze)|0,m=m+Math.imul(de,et)|0,g=g+Math.imul(X,tt)|0,l=l+Math.imul(X,nt)|0,l=l+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(j,it)|0,l=l+Math.imul(j,rt)|0,l=l+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(f,at)|0,l=l+Math.imul(f,st)|0,l=l+Math.imul(P,at)|0,m=m+Math.imul(P,st)|0;var nl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(Ve,ze),l=Math.imul(Ve,We),l=l+Math.imul(qe,ze)|0,m=Math.imul(qe,We),g=g+Math.imul(Ue,Ke)|0,l=l+Math.imul(Ue,Je)|0,l=l+Math.imul(je,Ke)|0,m=m+Math.imul(je,Je)|0,g=g+Math.imul(Fe,$e)|0,l=l+Math.imul(Fe,Qe)|0,l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,l=l+Math.imul(Oe,Ye)|0,l=l+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,l=l+Math.imul(Ne,et)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,l=l+Math.imul(Z,nt)|0,l=l+Math.imul(de,tt)|0,m=m+Math.imul(de,nt)|0,g=g+Math.imul(X,it)|0,l=l+Math.imul(X,rt)|0,l=l+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(j,at)|0,l=l+Math.imul(j,st)|0,l=l+Math.imul(K,at)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(f,ot)|0,l=l+Math.imul(f,ut)|0,l=l+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var il=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,g=Math.imul(He,ze),l=Math.imul(He,We),l=l+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(Ve,Ke)|0,l=l+Math.imul(Ve,Je)|0,l=l+Math.imul(qe,Ke)|0,m=m+Math.imul(qe,Je)|0,g=g+Math.imul(Ue,$e)|0,l=l+Math.imul(Ue,Qe)|0,l=l+Math.imul(je,$e)|0,m=m+Math.imul(je,Qe)|0,g=g+Math.imul(Fe,Xe)|0,l=l+Math.imul(Fe,Ye)|0,l=l+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,l=l+Math.imul(Oe,et)|0,l=l+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,l=l+Math.imul(Ne,nt)|0,l=l+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,it)|0,l=l+Math.imul(Z,rt)|0,l=l+Math.imul(de,it)|0,m=m+Math.imul(de,rt)|0,g=g+Math.imul(X,at)|0,l=l+Math.imul(X,st)|0,l=l+Math.imul(Q,at)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(j,ot)|0,l=l+Math.imul(j,ut)|0,l=l+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(f,lt)|0,l=l+Math.imul(f,dt)|0,l=l+Math.imul(P,lt)|0,m=m+Math.imul(P,dt)|0;var rl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(rl>>>26)|0,rl&=67108863,g=Math.imul(He,Ke),l=Math.imul(He,Je),l=l+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(Ve,$e)|0,l=l+Math.imul(Ve,Qe)|0,l=l+Math.imul(qe,$e)|0,m=m+Math.imul(qe,Qe)|0,g=g+Math.imul(Ue,Xe)|0,l=l+Math.imul(Ue,Ye)|0,l=l+Math.imul(je,Xe)|0,m=m+Math.imul(je,Ye)|0,g=g+Math.imul(Fe,Ze)|0,l=l+Math.imul(Fe,et)|0,l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,l=l+Math.imul(Oe,nt)|0,l=l+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,it)|0,l=l+Math.imul(Ne,rt)|0,l=l+Math.imul(De,it)|0,m=m+Math.imul(De,rt)|0,g=g+Math.imul(Z,at)|0,l=l+Math.imul(Z,st)|0,l=l+Math.imul(de,at)|0,m=m+Math.imul(de,st)|0,g=g+Math.imul(X,ot)|0,l=l+Math.imul(X,ut)|0,l=l+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(j,lt)|0,l=l+Math.imul(j,dt)|0,l=l+Math.imul(K,lt)|0,m=m+Math.imul(K,dt)|0;var al=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(al>>>26)|0,al&=67108863,g=Math.imul(He,$e),l=Math.imul(He,Qe),l=l+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(Ve,Xe)|0,l=l+Math.imul(Ve,Ye)|0,l=l+Math.imul(qe,Xe)|0,m=m+Math.imul(qe,Ye)|0,g=g+Math.imul(Ue,Ze)|0,l=l+Math.imul(Ue,et)|0,l=l+Math.imul(je,Ze)|0,m=m+Math.imul(je,et)|0,g=g+Math.imul(Fe,tt)|0,l=l+Math.imul(Fe,nt)|0,l=l+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,it)|0,l=l+Math.imul(Oe,rt)|0,l=l+Math.imul(Be,it)|0,m=m+Math.imul(Be,rt)|0,g=g+Math.imul(Ne,at)|0,l=l+Math.imul(Ne,st)|0,l=l+Math.imul(De,at)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,l=l+Math.imul(Z,ut)|0,l=l+Math.imul(de,ot)|0,m=m+Math.imul(de,ut)|0,g=g+Math.imul(X,lt)|0,l=l+Math.imul(X,dt)|0,l=l+Math.imul(Q,lt)|0,m=m+Math.imul(Q,dt)|0;var sl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(sl>>>26)|0,sl&=67108863,g=Math.imul(He,Xe),l=Math.imul(He,Ye),l=l+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(Ve,Ze)|0,l=l+Math.imul(Ve,et)|0,l=l+Math.imul(qe,Ze)|0,m=m+Math.imul(qe,et)|0,g=g+Math.imul(Ue,tt)|0,l=l+Math.imul(Ue,nt)|0,l=l+Math.imul(je,tt)|0,m=m+Math.imul(je,nt)|0,g=g+Math.imul(Fe,it)|0,l=l+Math.imul(Fe,rt)|0,l=l+Math.imul(Le,it)|0,m=m+Math.imul(Le,rt)|0,g=g+Math.imul(Oe,at)|0,l=l+Math.imul(Oe,st)|0,l=l+Math.imul(Be,at)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,l=l+Math.imul(Ne,ut)|0,l=l+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,lt)|0,l=l+Math.imul(Z,dt)|0,l=l+Math.imul(de,lt)|0,m=m+Math.imul(de,dt)|0;var ol=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ol>>>26)|0,ol&=67108863,g=Math.imul(He,Ze),l=Math.imul(He,et),l=l+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(Ve,tt)|0,l=l+Math.imul(Ve,nt)|0,l=l+Math.imul(qe,tt)|0,m=m+Math.imul(qe,nt)|0,g=g+Math.imul(Ue,it)|0,l=l+Math.imul(Ue,rt)|0,l=l+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Fe,at)|0,l=l+Math.imul(Fe,st)|0,l=l+Math.imul(Le,at)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,l=l+Math.imul(Oe,ut)|0,l=l+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,lt)|0,l=l+Math.imul(Ne,dt)|0,l=l+Math.imul(De,lt)|0,m=m+Math.imul(De,dt)|0;var ul=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ul>>>26)|0,ul&=67108863,g=Math.imul(He,tt),l=Math.imul(He,nt),l=l+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(Ve,it)|0,l=l+Math.imul(Ve,rt)|0,l=l+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ue,at)|0,l=l+Math.imul(Ue,st)|0,l=l+Math.imul(je,at)|0,m=m+Math.imul(je,st)|0,g=g+Math.imul(Fe,ot)|0,l=l+Math.imul(Fe,ut)|0,l=l+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,lt)|0,l=l+Math.imul(Oe,dt)|0,l=l+Math.imul(Be,lt)|0,m=m+Math.imul(Be,dt)|0;var ll=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ll>>>26)|0,ll&=67108863,g=Math.imul(He,it),l=Math.imul(He,rt),l=l+Math.imul(Ge,it)|0,m=Math.imul(Ge,rt),g=g+Math.imul(Ve,at)|0,l=l+Math.imul(Ve,st)|0,l=l+Math.imul(qe,at)|0,m=m+Math.imul(qe,st)|0,g=g+Math.imul(Ue,ot)|0,l=l+Math.imul(Ue,ut)|0,l=l+Math.imul(je,ot)|0,m=m+Math.imul(je,ut)|0,g=g+Math.imul(Fe,lt)|0,l=l+Math.imul(Fe,dt)|0,l=l+Math.imul(Le,lt)|0,m=m+Math.imul(Le,dt)|0;var dl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(dl>>>26)|0,dl&=67108863,g=Math.imul(He,at),l=Math.imul(He,st),l=l+Math.imul(Ge,at)|0,m=Math.imul(Ge,st),g=g+Math.imul(Ve,ot)|0,l=l+Math.imul(Ve,ut)|0,l=l+Math.imul(qe,ot)|0,m=m+Math.imul(qe,ut)|0,g=g+Math.imul(Ue,lt)|0,l=l+Math.imul(Ue,dt)|0,l=l+Math.imul(je,lt)|0,m=m+Math.imul(je,dt)|0;var pl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(pl>>>26)|0,pl&=67108863,g=Math.imul(He,ot),l=Math.imul(He,ut),l=l+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(Ve,lt)|0,l=l+Math.imul(Ve,dt)|0,l=l+Math.imul(qe,lt)|0,m=m+Math.imul(qe,dt)|0;var yl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(yl>>>26)|0,yl&=67108863,g=Math.imul(He,lt),l=Math.imul(He,dt),l=l+Math.imul(Ge,lt)|0,m=Math.imul(Ge,dt);var cl=(A+g|0)+((l&8191)<<13)|0;return A=(m+(l>>>13)|0)+(cl>>>26)|0,cl&=67108863,h[0]=_i,h[1]=Ai,h[2]=ki,h[3]=Mi,h[4]=Ei,h[5]=el,h[6]=tl,h[7]=nl,h[8]=il,h[9]=rl,h[10]=al,h[11]=sl,h[12]=ol,h[13]=ul,h[14]=ll,h[15]=dl,h[16]=pl,h[17]=yl,h[18]=cl,A!==0&&(h[19]=A,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,k=0;k>>26)|0,w+=h>>>26,h&=67108863}y.words[k]=A,x=h,h=w}return x!==0?y.words[k]=x:y.length--,y._strip()}function q(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=q(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,k,h){for(var A=0;A>>1)k++;return 1<>>13,x[2*h+1]=k&8191,k=k>>>13;for(h=2*y;h>=26,x+=k/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,k;if(y!==0){var h=0;for(k=0;k>>26-y}h&&(this.words[k]=h,this.length++)}if(x!==0){for(k=this.length-1;k>=0;k--)this.words[k+x]=this.words[k];for(k=0;k=0);var w;y?w=(y-y%26)/26:w=0;var k=u%26,h=Math.min((u-k)/26,this.length),A=67108863^67108863>>>k<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-k|G>>>k,m=G&A}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[k+x]=h&67108863}for(;k>26,this.words[k+x]=h&67108863;if(A===0)return this._strip();for(t(A===-1),A=0,k=0;k>26,this.words[k]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),k=u,h=k.words[k.length-1]|0,A=this._countBits(h);x=26-A,x!==0&&(k=k.ushln(x),w.iushln(x),h=k.words[k.length-1]|0);var g=w.length-k.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[k.length+f]|0)*67108864+(w.words[k.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(k,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(k,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,k,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.iadd(u)),{div:w,mod:k}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.isub(u)),{div:h.div,mod:k}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),k=u.andln(1),h=x.cmp(w);return h<0||k===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,k=this.length-1;k>=0;k--)w=(x*w+(this.words[k]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var k=(this.words[w]|0)+x*67108864;this.words[w]=k/u|0,x=k%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=new r(0),A=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(l),k.isub(m)),w.iushrn(1),k.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||A.isOdd())&&(h.iadd(l),A.isub(m)),h.iushrn(1),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),k.isub(A)):(x.isub(y),h.isub(w),A.isub(k))}return{a:h,b:A,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,g=1;(y.words[0]&g)===0&&A<26;++A,g<<=1);if(A>0)for(y.iushrn(A);A-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)k.isOdd()&&k.iadd(h),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(k)):(x.isub(y),k.isub(w))}var G;return y.cmpn(1)===0?G=w:G=k,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var k=y.cmp(x);if(k<0){var h=y;y=x,x=h}else if(k===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,A&=67108863,this.words[h]=A}return k!==0&&(this.words[h]=k,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,k=u.words[x]|0;if(w!==k){wk&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new H(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),k=0;k>>22,h=A}h>>>=22,u.words[k-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=k,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function H(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}H.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},H.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},H.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},H.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},H.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},H.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},H.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},H.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},H.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},H.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},H.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},H.prototype.isqr=function(u){return this.imul(u,u.clone())},H.prototype.sqr=function(u){return this.mul(u,u)},H.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),k=0;!w.isZero()&&w.andln(1)===0;)k++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),A=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(A)!==0;)l.redIAdd(A);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=k;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;k--){for(var m=y.words[k],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&A===0){g=0;continue}A<<=1,A|=f,g++,!(g!==x&&(k!==0||G!==0))&&(h=this.mul(h,w[A]),g=0,A=0)}l=26}return h},H.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},H.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,H),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof fl>"u"||fl,Xp)});var w0=ie((Fg,eo)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof eo=="object"&&eo.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],q={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,K){return new l(f,P,K).update(j)[D]()}},$=function(f,P,D){return function(j,K,ee,X){return u["cshake"+f].update(j,K,ee,X)[D]()}},le=function(f,P,D){return function(j,K,ee,X){return u["kmac"+f].update(j,K,ee,X)[D]()}},T=function(f,P,D,j){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,K=this.byteCount,ee=f.length,X=this.blockCount,Q=0,yt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=j[X],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++j;return P?K.push(j):K.unshift(j),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,K=f.length;if(P)j=K;else for(var ee=0;ee=57344?j+=3:(X=65536+((X&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return j&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],j>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var yt=new Uint32Array(Q);ee>8&255,X[Q+2]=yt>>16&255,X[Q+3]=yt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,yt=P[K],X[Q]=yt&255,j>1&&(X[Q+1]=yt>>8&255),j>2&&(X[Q+2]=yt>>16&255)),X};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,K,ee,X,Q,yt,Z,de,Hi,Ne,De,Gi,Oe,Be,zi,Fe,Le,Wi,Ue,je,Ki,Ve,qe,Ji,He,Ge,$i,ze,We,Qi,Ke,Je,Xi,$e,Qe,Yi,Xe,Ye,Zi,Ze,et,er,tt,nt,tr,it,rt,nr,at,st,ir,ot,ut,rr,lt,dt,_i,Ai,ki,Mi,Ei;for(j=0;j<48;j+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],X=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],yt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Hi=f[7]^f[17]^f[27]^f[37]^f[47],Ne=f[8]^f[18]^f[28]^f[38]^f[48],De=f[9]^f[19]^f[29]^f[39]^f[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=X^(de<<1|Hi>>>31),D=Q^(Hi<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Hi^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,Gi=f[0],Oe=f[1],nt=f[11]<<4|f[10]>>>28,tr=f[10]<<4|f[11]>>>28,Ge=f[20]<<3|f[21]>>>29,$i=f[21]<<3|f[20]>>>29,Ai=f[31]<<9|f[30]>>>23,ki=f[30]<<9|f[31]>>>23,Ze=f[40]<<18|f[41]>>>14,et=f[41]<<18|f[40]>>>14,Je=f[2]<<1|f[3]>>>31,Xi=f[3]<<1|f[2]>>>31,Be=f[13]<<12|f[12]>>>20,zi=f[12]<<12|f[13]>>>20,it=f[22]<<10|f[23]>>>22,rt=f[23]<<10|f[22]>>>22,ze=f[33]<<13|f[32]>>>19,We=f[32]<<13|f[33]>>>19,Mi=f[42]<<2|f[43]>>>30,Ei=f[43]<<2|f[42]>>>30,ot=f[5]<<30|f[4]>>>2,ut=f[4]<<30|f[5]>>>2,$e=f[14]<<6|f[15]>>>26,Qe=f[15]<<6|f[14]>>>26,Fe=f[25]<<11|f[24]>>>21,Le=f[24]<<11|f[25]>>>21,nr=f[34]<<15|f[35]>>>17,at=f[35]<<15|f[34]>>>17,Qi=f[45]<<29|f[44]>>>3,Ke=f[44]<<29|f[45]>>>3,Ve=f[6]<<28|f[7]>>>4,qe=f[7]<<28|f[6]>>>4,rr=f[17]<<23|f[16]>>>9,lt=f[16]<<23|f[17]>>>9,Yi=f[26]<<25|f[27]>>>7,Xe=f[27]<<25|f[26]>>>7,Wi=f[36]<<21|f[37]>>>11,Ue=f[37]<<21|f[36]>>>11,st=f[47]<<24|f[46]>>>8,ir=f[46]<<24|f[47]>>>8,er=f[8]<<27|f[9]>>>5,tt=f[9]<<27|f[8]>>>5,Ji=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,dt=f[29]<<7|f[28]>>>25,_i=f[28]<<7|f[29]>>>25,Ye=f[38]<<8|f[39]>>>24,Zi=f[39]<<8|f[38]>>>24,je=f[48]<<14|f[49]>>>18,Ki=f[49]<<14|f[48]>>>18,f[0]=Gi^~Be&Fe,f[1]=Oe^~zi&Le,f[10]=Ve^~Ji&Ge,f[11]=qe^~He&$i,f[20]=Je^~$e&Yi,f[21]=Xi^~Qe&Xe,f[30]=er^~nt&it,f[31]=tt^~tr&rt,f[40]=ot^~rr&dt,f[41]=ut^~lt&_i,f[2]=Be^~Fe&Wi,f[3]=zi^~Le&Ue,f[12]=Ji^~Ge&ze,f[13]=He^~$i&We,f[22]=$e^~Yi&Ye,f[23]=Qe^~Xe&Zi,f[32]=nt^~it&nr,f[33]=tr^~rt&at,f[42]=rr^~dt&Ai,f[43]=lt^~_i&ki,f[4]=Fe^~Wi&je,f[5]=Le^~Ue&Ki,f[14]=Ge^~ze&Qi,f[15]=$i^~We&Ke,f[24]=Yi^~Ye&Ze,f[25]=Xe^~Zi&et,f[34]=it^~nr&st,f[35]=rt^~at&ir,f[44]=dt^~Ai&Mi,f[45]=_i^~ki&Ei,f[6]=Wi^~je&Gi,f[7]=Ue^~Ki&Oe,f[16]=ze^~Qi&Ve,f[17]=We^~Ke&qe,f[26]=Ye^~Ze&Je,f[27]=Zi^~et&Xi,f[36]=nr^~st&er,f[37]=at^~ir&tt,f[46]=Ai^~Mi&ot,f[47]=ki^~Ei&ut,f[8]=je^~Gi&Be,f[9]=Ki^~Oe&zi,f[18]=Qi^~Ve&Ji,f[19]=Ke^~qe&He,f[28]=Ze^~Je&$e,f[29]=et^~Xi&Qe,f[38]=st^~er&nt,f[39]=ir^~tt&tr,f[48]=Mi^~ot&rr,f[49]=Ei^~ut<,f[0]^=S[j],f[1]^=S[j+1]};if(s)eo.exports=u;else{for(x=0;x{by.exports=hy;function hy(i,e){if(!i)throw new Error(e||"Assertion failed")}hy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var xy=ie((I3,ql)=>{typeof Object.create=="function"?ql.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ql.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Mn=ie(Re=>{"use strict";var u2=aa(),l2=xy();Re.inherits=l2;function d2(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function p2(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):d2(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Re.htonl=gy;function c2(i,e){for(var t="",n=0;n>>0}return a}Re.join32=f2;function m2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Re.split32=m2;function h2(i,e){return i>>>e|i<<32-e}Re.rotr32=h2;function b2(i,e){return i<>>32-e}Re.rotl32=b2;function x2(i,e){return i+e>>>0}Re.sum32=x2;function g2(i,e,t){return i+e+t>>>0}Re.sum32_3=g2;function T2(i,e,t,n){return i+e+t+n>>>0}Re.sum32_4=T2;function v2(i,e,t,n,r){return i+e+t+n+r>>>0}Re.sum32_5=v2;function w2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Re.sum64=w2;function _2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Re.sum64_hi=_2;function A2(i,e,t,n){var r=e+n;return r>>>0}Re.sum64_lo=A2;function k2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Re.sum64_4_hi=k2;function M2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Re.sum64_4_lo=M2;function E2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Re.sum64_5_hi=E2;function C2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Re.sum64_5_lo=C2;function I2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Re.rotr64_hi=I2;function S2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.rotr64_lo=S2;function R2(i,e,t){return i>>>t}Re.shr64_hi=R2;function P2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.shr64_lo=P2});var sa=ie(_y=>{"use strict";var wy=Mn(),N2=aa();function wo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}_y.BlockHash=wo;wo.prototype.update=function(e,t){if(e=wy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=wy.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var D2=Mn(),Hn=D2.rotr32;function O2(i,e,t,n){if(i===0)return Ay(e,t,n);if(i===1||i===3)return My(e,t,n);if(i===2)return ky(e,t,n)}pi.ft_1=O2;function Ay(i,e,t){return i&e^~i&t}pi.ch32=Ay;function ky(i,e,t){return i&e^i&t^e&t}pi.maj32=ky;function My(i,e,t){return i^e^t}pi.p32=My;function B2(i){return Hn(i,2)^Hn(i,13)^Hn(i,22)}pi.s0_256=B2;function F2(i){return Hn(i,6)^Hn(i,11)^Hn(i,25)}pi.s1_256=F2;function L2(i){return Hn(i,7)^Hn(i,18)^i>>>3}pi.g0_256=L2;function U2(i){return Hn(i,17)^Hn(i,19)^i>>>10}pi.g1_256=U2});var Iy=ie((N3,Cy)=>{"use strict";var oa=Mn(),j2=sa(),V2=Hl(),Gl=oa.rotl32,Za=oa.sum32,q2=oa.sum32_5,H2=V2.ft_1,Ey=j2.BlockHash,G2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;Ey.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}oa.inherits(Gn,Ey);Cy.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var ua=Mn(),z2=sa(),la=Hl(),W2=aa(),En=ua.sum32,K2=ua.sum32_4,J2=ua.sum32_5,$2=la.ch32,Q2=la.maj32,X2=la.s0_256,Y2=la.s1_256,Z2=la.g0_256,eb=la.g1_256,Sy=z2.BlockHash,tb=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function zn(){if(!(this instanceof zn))return new zn;Sy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=tb,this.W=new Array(64)}ua.inherits(zn,Sy);Ry.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var Wl=Mn(),Py=zl();function yi(){if(!(this instanceof yi))return new yi;Py.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Wl.inherits(yi,Py);Ny.exports=yi;yi.blockSize=512;yi.outSize=224;yi.hmacStrength=192;yi.padLength=64;yi.prototype._digest=function(e){return e==="hex"?Wl.toHex32(this.h.slice(0,7),"big"):Wl.split32(this.h.slice(0,7),"big")}});var $l=ie((B3,Ly)=>{"use strict";var Qt=Mn(),nb=sa(),ib=aa(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,Oy=Qt.shr64_hi,By=Qt.shr64_lo,Pi=Qt.sum64,Kl=Qt.sum64_hi,Jl=Qt.sum64_lo,rb=Qt.sum64_4_hi,ab=Qt.sum64_4_lo,sb=Qt.sum64_5_hi,ob=Qt.sum64_5_lo,Fy=nb.BlockHash,ub=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Cn(){if(!(this instanceof Cn))return new Cn;Fy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=ub,this.W=new Array(160)}Qt.inherits(Cn,Fy);Ly.exports=Cn;Cn.blockSize=1024;Cn.outSize=512;Cn.hmacStrength=192;Cn.padLength=128;Cn.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var Ql=Mn(),Uy=$l();function ci(){if(!(this instanceof ci))return new ci;Uy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ql.inherits(ci,Uy);jy.exports=ci;ci.blockSize=1024;ci.outSize=384;ci.hmacStrength=192;ci.padLength=128;ci.prototype._digest=function(e){return e==="hex"?Ql.toHex32(this.h.slice(0,12),"big"):Ql.split32(this.h.slice(0,12),"big")}});var qy=ie(da=>{"use strict";da.sha1=Iy();da.sha224=Dy();da.sha256=zl();da.sha384=Vy();da.sha512=$l()});var Jy=ie(Ky=>{"use strict";var pr=Mn(),vb=sa(),_o=pr.rotl32,Hy=pr.sum32,es=pr.sum32_3,Gy=pr.sum32_4,Wy=vb.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;Wy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pr.inherits(Jn,Wy);Ky.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Hy(_o(Gy(n,zy(_,r,a,s),e[Ab[_]+t],wb(_)),Mb[_]),o);n=o,o=s,s=_o(a,10),a=r,r=v,v=Hy(_o(Gy(d,zy(79-_,p,c,b),e[kb[_]+t],_b(_)),Eb[_]),I),d=I,I=b,b=_o(c,10),c=p,p=v}v=es(this.h[1],a,b),this.h[1]=es(this.h[2],s,I),this.h[2]=es(this.h[3],o,d),this.h[3]=es(this.h[4],n,p),this.h[4]=es(this.h[0],r,c),this.h[0]=v};Jn.prototype._digest=function(e){return e==="hex"?pr.toHex32(this.h,"little"):pr.split32(this.h,"little")};function zy(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function wb(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function _b(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var Ab=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],kb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Mb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Eb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Qy=ie((j3,$y)=>{"use strict";var Cb=Mn(),Ib=aa();function pa(i,e,t){if(!(this instanceof pa))return new pa(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(Cb.toArray(e,t))}$y.exports=pa;pa.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Ib(e.length<=this.blockSize);for(var t=e.length;t{var Rt=Xy;Rt.utils=Mn();Rt.common=sa();Rt.sha=qy();Rt.ripemd=Jy();Rt.hmac=Qy();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var hd=ie((md,kc)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var A=0;A255)return!1;return!0}function n(h,A){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return A&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,A,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),A.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:A}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+A[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],q=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var A=[],g=0;g>2,this._Ke[G][A%4]=m[A],this._Kd[h-G][A%4]=m[A];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var A=1;A>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var A=l/2+1;A>2,K=P%4,this._Ke[j][K]=m[A],this._Kd[h-j][K]=m[A++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var A=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[A][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var A=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^q[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[A][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var A=r(h.length),g=r(16),l=0;l=0;--A)this._counter[A]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,A){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",A instanceof u||(A=new u(A)),this._counter=A,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var A=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-A,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,q=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let k=S,h=L,A=O,g=U,l=q,m=E,G=J,f=$,P,D,j,K,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((k>>>2|k<<32-2)^(k>>>13|k<<32-13)^(k>>>22|k<<32-22))+(k&h^k&A^h&A)|0,f=G,G=m,m=l,l=g+K|0,g=A,A=h,h=k,k=K+ee|0;S=S+k|0,L=L+h|0,O=O+A|0,U=U+g|0,q=q+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,H=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(H>>>16&255),u.push(H>>>8&255),u.push(H>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),q,E=[];for(q=0;q<64;q++)O[q]=54;for(q=0;q<_.length;q++)O[q]^=_[q];for(q=0;q=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,q){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return q&&q(null,1,m),m}q&&A(g)};if(!q)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,q){return new Promise(function(E,J){let $=0;q&&q(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)q&&$!==1&&q(1),E(new Uint8Array(R));else if(q&&T!==$)return $=T,q(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof vd<"u"?Ec.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(vd)});var Yc=ie((I4,Xc)=>{"use strict";var Ko="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Md={};for(ds=0;ds>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function $c(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=Ta(e)^n>>5}for(e=Ta(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=$c(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=Ta(n)^s,r+=Ko.charAt(s)}for(a=0;a<6;++a)n=Ta(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=Ko.charAt(o)}return r}function Qc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=$c(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function c5(){var i=Qc.apply(null,arguments);if(typeof i=="object")return i}function f5(i){var e=Qc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Jo(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof ep=="object"&&typeof tp<"u"?tp.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(ep,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(q){q?S(L,null,U):I(U)}).catch(_)}catch(q){_(q)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var np=ie(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$dictionary=void 0;fu.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Ns=ie((qk,bm)=>{bm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var rp=ie(Ui=>{var ke=Ns(),ip=()=>[{type:ke.RANGE,from:48,to:57}],xm=()=>[{type:ke.CHAR,value:95},{type:ke.RANGE,from:97,to:122},{type:ke.RANGE,from:65,to:90}].concat(ip()),gm=()=>[{type:ke.CHAR,value:9},{type:ke.CHAR,value:10},{type:ke.CHAR,value:11},{type:ke.CHAR,value:12},{type:ke.CHAR,value:13},{type:ke.CHAR,value:32},{type:ke.CHAR,value:160},{type:ke.CHAR,value:5760},{type:ke.RANGE,from:8192,to:8202},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233},{type:ke.CHAR,value:8239},{type:ke.CHAR,value:8287},{type:ke.CHAR,value:12288},{type:ke.CHAR,value:65279}],n1=()=>[{type:ke.CHAR,value:10},{type:ke.CHAR,value:13},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233}];Ui.words=()=>({type:ke.SET,set:xm(),not:!1});Ui.notWords=()=>({type:ke.SET,set:xm(),not:!0});Ui.ints=()=>({type:ke.SET,set:ip(),not:!1});Ui.notInts=()=>({type:ke.SET,set:ip(),not:!0});Ui.whitespace=()=>({type:ke.SET,set:gm(),not:!1});Ui.notWhitespace=()=>({type:ke.SET,set:gm(),not:!0});Ui.anyChar=()=>({type:ke.SET,set:n1(),not:!0})});var vm=ie(Ds=>{var Tm=Ns(),Pa=rp(),i1="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",r1={0:0,t:9,n:10,v:11,f:12,r:13};Ds.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?i1.indexOf(d):r1[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Ds.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Pa.words());else if(r[2])t.push(Pa.ints());else if(r[3])t.push(Pa.whitespace());else if(r[4])t.push(Pa.notWords());else if(r[5])t.push(Pa.notInts());else if(r[6])t.push(Pa.notWhitespace());else if(r[7])t.push({type:Tm.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:Tm.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Ds.error(e,"Unterminated character class")};Ds.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var wm=ie(Os=>{var mu=Ns();Os.wordBoundary=()=>({type:mu.POSITION,value:"b"});Os.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Os.begin=()=>({type:mu.POSITION,value:"^"});Os.end=()=>({type:mu.POSITION,value:"$"})});var _m=ie((Wk,ap)=>{var Na=vm(),xn=Ns(),_r=rp(),hu=wm();ap.exports=i=>{var e=0,t,n,r={type:xn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Na.error(i,`Nothing to repeat at column ${O-1}`)},p=Na.strToChars(i);for(t=p.length;e{"use strict";var gn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new gn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Am.exports=ji});var Em=ie((Jk,Mm)=>{var bu=_m(),Bs=km(),Ar=bu.types;Mm.exports=class Fs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=bu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Fs.prototype.max!=null?Fs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case Ar.ROOT:case Ar.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var a1=kr&&kr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kr,"__esModule",{value:!0});kr.RandomGenerator=void 0;var s1=a1(Em()),o1;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new s1.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(o1=kr.RandomGenerator||(kr.RandomGenerator={}))});var Ls=ie(Da=>{"use strict";var u1=Da&&Da.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Da,"__esModule",{value:!0});Da.TypeGuardError=void 0;var l1=function(i){u1(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Da.TypeGuardError=l1});var Im=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$any=void 0;var d1=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};xu.$any=d1});var Sm=ie(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var p1=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var y1=Ls(),c1=function(i){return function(e,t){if(e===!0)throw new y1.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=c1});var Pm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var f1=function(i,e,t){return e<=i&&i<=t};vu.$is_between=f1});var Nm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var m1=np(),h1=function(i,e,t,n){var r,a=(r=m1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};wu.$is_custom=h1});var Dm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var b1=function(i){return x1.test(i)};_u.$is_date=b1;var x1=/^(\d{4})-(\d{2})-(\d{2})$/});var Om=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_datetime=void 0;var g1=function(i){return!isNaN(new Date(i).getTime())};Au.$is_datetime=g1});var Bm=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_email=void 0;var T1=function(i){return v1.test(i)};ku.$is_email=T1;var v1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Fm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv4=void 0;var w1=function(i){return _1.test(i)};Mu.$is_ipv4=w1;var _1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Lm=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv6=void 0;var A1=function(i){return k1.test(i)};Eu.$is_ipv6=A1;var k1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Um=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_url=void 0;var M1=function(i){return E1.test(i)};Cu.$is_url=M1;var E1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var jm=ie(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var C1=function(i){return I1.test(i)};Iu.$is_uuid=C1;var I1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Vm=ie(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var S1=function(i){return R1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};Su.$join=S1;var R1=function(i){return P1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},P1=function(i){return N1.has(i)},N1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var qm=ie(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var D1=Ls(),O1=function(i){if(isFinite(i)===!1)throw new D1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Ru.$number=O1});var Hm=ie(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var B1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};Pu.$report=B1});var Gm=ie(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var F1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Nu.$rest=F1});var zm=ie(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var L1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Du.$string=L1});var Wm=ie(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var U1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Ou.$tail=U1});var Qm=ie(Mr=>{"use strict";var jt=Mr&&Mr.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:Y1.$number,string:tx.$string,tail:nx.$tail,rest:ex.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:j1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Km.RandomGenerator,pick:Km.RandomGenerator.pick}};var e=function(t){return function(n){throw new Jm.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(ix=Mr.Namespace||(Mr.Namespace={}))});var Xm=ie(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.MapUtil=void 0;var rx;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(rx=Us.MapUtil||(Us.MapUtil={}))});var Zm=ie(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ie(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var ih=ie(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var ah=ie(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0})});var oh=ie(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var lh=ie(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var xp=ie(z=>{"use strict";var ax=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Er=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ax(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Oa=np(),Me=Qm(),sx=Xm();Er(Zm(),z);Er(th(),z);Er(ih(),z);Er(ah(),z);Er(oh(),z);Er(lh(),z);Er(Ls(),z);function sp(){ae("assert")}z.assert=sp;Object.assign(sp,Me.Namespace.assert("assert"));function op(){ae("assertType")}z.assertType=op;Object.assign(op,Me.Namespace.assert("assertType"));function Bu(){ae("is")}z.is=Bu;Object.assign(Bu,Me.Namespace.assert("is"));function Fu(){ae("validate")}z.validate=Fu;Object.assign(Fu,Me.Namespace.validate());function up(){ae("assertEquals")}z.assertEquals=up;Object.assign(up,Me.Namespace.assert("assertEquals"));function lp(){ae("equals")}z.equals=lp;Object.assign(lp,Me.Namespace.is());function dp(){ae("validateEquals")}z.validateEquals=dp;Object.assign(dp,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Oa.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Oa.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=sx.MapUtil.take(Oa.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Oa.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function ox(){ae("application")}z.application=ox;function pp(){ae("assertParse")}z.assertParse=pp;Object.assign(pp,Me.Namespace.assert("assertParse"));function yp(){ae("isParse")}z.isParse=yp;Object.assign(yp,Bu);function cp(){ae("validateParse")}z.validateParse=cp;Object.assign(cp,Fu);function fp(){ae("stringify")}z.stringify=fp;Object.assign(fp,Me.Namespace.stringify("stringify"));function Lu(){ae("assertStringify")}z.assertStringify=Lu;Object.assign(Lu,Me.Namespace.assert("assertStringify"));Object.assign(Lu,Me.Namespace.stringify("assertStringify"));function Uu(){ae("isStringify")}z.isStringify=Uu;Object.assign(Uu,Me.Namespace.is());Object.assign(Uu,Me.Namespace.stringify("isStringify"));function ju(){ae("validateStringify")}z.validateStringify=ju;Object.assign(ju,Me.Namespace.validate());Object.assign(ju,Me.Namespace.stringify("validateStringify"));function ux(){ae("metadata")}z.metadata=ux;function mp(){ae("random")}z.random=mp;Object.assign(mp,Me.Namespace.random());function lx(){ae("literals")}z.literals=lx;function hp(){ae("clone")}z.clone=hp;Object.assign(hp,Me.Namespace.clone("clone"));function Vu(){ae("assertClone")}z.assertClone=Vu;Object.assign(Vu,Me.Namespace.assert("assertClone"));Object.assign(Vu,Me.Namespace.clone("assertClone"));function qu(){ae("isClone")}z.isClone=qu;Object.assign(qu,Me.Namespace.is());Object.assign(qu,Me.Namespace.clone("isClone"));function Hu(){ae("validateClone")}z.validateClone=Hu;Object.assign(Hu,Me.Namespace.validate());Object.assign(Hu,Me.Namespace.clone("validateClone"));function bp(){ae("prune")}z.prune=bp;Object.assign(bp,Me.Namespace.prune("prune"));function Gu(){ae("assertPrune")}z.assertPrune=Gu;Object.assign(Gu,Me.Namespace.assert("assertPrune"));Object.assign(Gu,Me.Namespace.prune("assertPrune"));function zu(){ae("isPrune")}z.isPrune=zu;Object.assign(zu,Me.Namespace.is());Object.assign(zu,Me.Namespace.prune("isPrune"));function Wu(){ae("validatePrune")}z.validatePrune=Wu;Object.assign(Wu,Me.Namespace.prune("validatePrune"));Object.assign(Wu,Me.Namespace.validate());function dh(){ae("createAssert")}z.createAssert=dh;Object.assign(dh,sp);function ph(){ae("createAssertType")}z.createAssertType=ph;Object.assign(ph,op);function yh(){ae("createIs")}z.createIs=yh;Object.assign(yh,Bu);function ch(){ae("createValidate")}z.createValidate=ch;Object.assign(ch,Fu);function fh(){ae("createAssertEquals")}z.createAssertEquals=fh;Object.assign(fh,up);function mh(){ae("createEquals")}z.createEquals=mh;Object.assign(mh,lp);function hh(){ae("createValidateEquals")}z.createValidateEquals=hh;Object.assign(hh,dp);function bh(){ae("createIsParse")}z.createIsParse=bh;Object.assign(bh,yp);function xh(){ae("createAssertParse")}z.createAssertParse=xh;Object.assign(xh,pp);function gh(){ae("createValidateParse")}z.createValidateParse=gh;Object.assign(gh,cp);function Th(){ae("createStringify")}z.createStringify=Th;Object.assign(Th,fp);function vh(){ae("createAssertStringify")}z.createAssertStringify=vh;Object.assign(vh,Lu);function wh(){ae("createIsStringify")}z.createIsStringify=wh;Object.assign(wh,Uu);function _h(){ae("createValidateStringify")}z.createValidateStringify=_h;Object.assign(_h,ju);function Ah(){ae("createRandom")}z.createRandom=Ah;Object.assign(Ah,mp);function kh(){ae("createClone")}z.createClone=kh;Object.assign(kh,hp);function Mh(){ae("createAssertClone")}z.createAssertClone=Mh;Object.assign(Mh,Vu);function Eh(){ae("createIsClone")}z.createIsClone=Eh;Object.assign(Eh,qu);function Ch(){ae("createValidateClone")}z.createValidateClone=Ch;Object.assign(Ch,Hu);function Ih(){ae("createPrune")}z.createPrune=Ih;Object.assign(Ih,bp);function Sh(){ae("createAssertPrune")}z.createAssertPrune=Sh;Object.assign(Sh,Gu);function Rh(){ae("createIsPrune")}z.createIsPrune=Rh;Object.assign(Rh,zu);function Ph(){ae("createValidatePrune")}z.createValidatePrune=Ph;Object.assign(Ph,Wu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Dh=ie(Tn=>{"use strict";var Nh=Tn&&Tn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),dx=Tn&&Tn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),px=Tn&&Tn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Nh(e,i,t);return dx(e,i),e},yx=Tn&&Tn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Nh(e,i,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var cx=px(xp());Tn.default=cx;yx(xp(),Tn)});var Vd={};Gr(Vd,{BaseContract:()=>ca,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>mr,FixedNumber:()=>ct,Signer:()=>St,VoidSigner:()=>di,Wallet:()=>on,Wordlist:()=>bn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>au,logger:()=>Df,providers:()=>ti,utils:()=>te,version:()=>ou,wordlists:()=>br});var l0=An(ml());var Yp="logger/5.7.0";var Zp=!1,e0=!1,$s={debug:1,default:2,info:2,warning:3,error:4,off:5},t0=$s.default,hl=null;function r6(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var n0=r6(),bl;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(bl||(bl={}));var Wt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var i0="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();$s[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(t0>$s[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(e0)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=i0[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),n0&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:n0})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return hl||(hl=new M(Yp)),hl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}e0=!!e,Zp=!!t}static setLogLevel(e){let t=$s[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}t0=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=bl;var r0="bytes/5.7.0";var vt=new M(r0);function s0(i){return!!i.toHexString}function zr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return zr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ai(i){return re(i)&&!(i.length%2)||un(i)}function a0(i){return typeof i=="number"&&i==i&&i%1===0}function un(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!a0(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),zr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),s0(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),zr(n)}function Zt(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),zr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var xl="0123456789abcdef";function W(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=xl[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),s0(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(un(i)){let t="0x";for(let n=0;n>4]+xl[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Nt(i){if(typeof i!="string")i=W(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ee(i,e,t){return typeof i!="string"?i=W(i):(!re(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=W(t).substring(2)}),e}function Un(i){let e=gl(W(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function gl(i){typeof i!="string"&&(i=W(i)),re(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function jn(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ai(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=ar(V(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=he(e.r,32),e.s==null||!re(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=he(e.s,32);let t=V(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(re(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=he(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function ja(i){return i=jn(i),W(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Qs="bignumber/5.7.0";var Va=l0.default.BN,si=new M(Qs),Tl={},o0=9007199254740991;function d0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||un(i))}var u0=!1,F=class{constructor(e,t){e!==Tl&&si.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(xe(this).fromTwos(e))}toTwos(e){return Kt(xe(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(xe(this).add(xe(e)))}sub(e){return Kt(xe(this).sub(xe(e)))}div(e){return F.from(e).isZero()&&ln("division-by-zero","div"),Kt(xe(this).div(xe(e)))}mul(e){return Kt(xe(this).mul(xe(e)))}mod(e){let t=xe(e);return t.isNeg()&&ln("division-by-zero","mod"),Kt(xe(this).umod(t))}pow(e){let t=xe(e);return t.isNeg()&&ln("negative-power","pow"),Kt(xe(this).pow(t))}and(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","and"),Kt(xe(this).and(t))}or(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","or"),Kt(xe(this).or(t))}xor(e){let t=xe(e);return(this.isNegative()||t.isNeg())&&ln("unbound-bitwise-result","xor"),Kt(xe(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ln("negative-width","mask"),Kt(xe(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ln("negative-width","shl"),Kt(xe(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ln("negative-width","shr"),Kt(xe(this).shrn(e))}eq(e){return xe(this).eq(xe(e))}lt(e){return xe(this).lt(xe(e))}lte(e){return xe(this).lte(xe(e))}gt(e){return xe(this).gt(xe(e))}gte(e){return xe(this).gte(xe(e))}isNegative(){return this._hex[0]==="-"}isZero(){return xe(this).isZero()}toNumber(){try{return xe(this).toNumber()}catch{ln("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return si.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?u0||(u0=!0,si.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?si.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):si.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),xe(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(Tl,qa(e)):e.match(/^-?[0-9]+$/)?new F(Tl,qa(new Va(e))):si.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ln("underflow","BigNumber.from",e),(e>=o0||e<=-o0)&&ln("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(un(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return si.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function qa(i){if(typeof i!="string")return qa(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&si.throwArgumentError("invalid hex","value",i),i=qa(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Kt(i){return F.from(qa(i))}function xe(i){let e=F.from(i).toHexString();return e[0]==="-"?new Va("-"+e.substring(3),16):new Va(e.substring(2),16)}function ln(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),si.throwError(i,M.errors.NUMERIC_FAULT,n)}function vl(i){return new Va(i,36).toString(16)}function wl(i){return new Va(i,16).toString(36)}var Vt=new M(Qs),Ha={},y0=F.from(0),c0=F.from(-1);function f0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,M.errors.NUMERIC_FAULT,r)}var Ga="0";for(;Ga.length<256;)Ga+=Ga;function _l(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Ga.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function Wr(i,e){e==null&&(e=0);let t=_l(e);i=F.from(i);let n=i.lt(y0);n&&(i=i.mul(c0));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&f0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new oi(Ha,t,n,r)}},ct=class{constructor(e,t,n,r){e!==Ha&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(p0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(p0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ct.from("1"+Ga.substring(0,e),this.format),r=a6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return he(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ct.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!d0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ct.fromString(Wr(e,t),oi.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=oi.from(t),r=dn(e,n.decimals);!n.signed&&r.lt(y0)&&f0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=he(a,n.width/8));let s=Wr(r,n.decimals);return new ct(Ha,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=oi.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=Wr(r,n.decimals);return new ct(Ha,a,s,n)}static from(e,t){if(typeof e=="string")return ct.fromString(e,t);if(un(e))return ct.fromBytes(e,t);try{return ct.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},p0=ct.from(1),a6=ct.from("0.5");var m0="properties/5.7.0";var s6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Xs=new M(m0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function mt(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ce(i){return s6(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function Kr(i,e){(!i||typeof i!="object")&&Xs.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||Xs.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var o6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h0(i){if(i==null||o6[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tft(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ft(n))}return e}return Xs.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ft(i){return u6(i)}var en=class{constructor(e){for(let t in e)this[t]=ft(e[t])}};var Vn="abi/5.7.0";var Te=new M(Vn),sr={},b0={calldata:!0,memory:!0,storage:!0},l6={calldata:!0,memory:!0};function Ys(i,e){if(i==="bytes"||i==="string"){if(b0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&l6[e])return!0;return(b0[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function d6(i,e){let t=i;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(sr,{name:e.name||null,type:Jr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(r){return pt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(d6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function za(i,e){return c6(i).map(t=>pt.fromString(t,e))}var Ht=class{constructor(e,t){e!==sr&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Zs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ht.isFragment(e)?e:typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return qt.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?qt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},qt=class extends Ht{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Wa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new qt(sr,t)}static fromString(e){let t=e.match(Ka);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+r)}}),qt.fromObject({name:t[1].trim(),anonymous:n,inputs:za(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function g0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function T0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function v0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",i),e}var Dt=class extends Ht{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=v0(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(sr,n)}static fromString(e){let t={type:"constructor"};e=g0(e,t);let n=e.match(Ka);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=za(n[2].trim(),!1),T0(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=v0(e),n={type:e.type,name:Wa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(sr,n)}static fromString(e){let t={type:"function"};e=g0(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ka);if(r||Te.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&Wa(t.name),t.inputs=za(r[2],!1),T0(r[3].trim(),t),n.length>1){let a=n[1].match(Ka);(a[1].trim()!=""||a[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=za(a[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function x0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends Ht{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Wa(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return x0(new tn(sr,t))}static fromString(e){let t={type:"error"},n=e.match(Ka);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Wa(t.name),t.inputs=za(n[2],!1),x0(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Jr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var y6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Wa(i){return(!i||!i.match(y6))&&Te.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ka=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function c6(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&Al.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ur=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ur.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:Al.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new ur(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var _0=An(w0());function ce(i){return"0x"+_0.default.keccak_256(V(i))}var to={};Gr(to,{decode:()=>Ja,encode:()=>ui});var A0="rlp/5.7.0";var qn=new M(A0);function k0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function M0(i,e,t){let n=0;for(let r=0;re+1+n&&qn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function I0(i,e){if(i.length===0&&qn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&qn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=M0(i,e+1,t);return e+1+t+n>i.length&&qn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),E0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&qn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),E0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&qn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=M0(i,e+1,t);e+1+t+n>i.length&&qn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=W(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&qn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(i[e])}}function Ja(i){let e=V(i),t=I0(e,0);return t.consumed!==e.length&&qn.throwArgumentError("invalid rlp data","data",i),t.result}var S0="address/5.7.0";var Ci=new M(S0);function R0(i){re(i,20)||Ci.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var f6=9007199254740991;function m6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var kl={};for(let i=0;i<10;i++)kl[String(i)]=String(i);for(let i=0;i<26;i++)kl[String.fromCharCode(65+i)]=String(10+i);var P0=Math.floor(m6(f6));function N0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>kl[n]).join("");for(;e.length>=P0;){let n=e.substring(0,P0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Ci.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=R0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Ci.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==N0(i)&&Ci.throwArgumentError("bad icap checksum","address",i),e=vl(i.substring(4));e.length<40;)e="0"+e;e=R0("0x"+e)}else Ci.throwArgumentError("invalid address","address",i);return e}function D0(i){try{return fe(i),!0}catch{}return!1}function O0(i){let e=wl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+N0("XE00"+e)+e}function lr(i){let e=null;try{e=fe(i.from)}catch{Ci.throwArgumentError("missing from address","transaction",i)}let t=Zt(V(F.from(i.nonce).toHexString()));return fe(Ee(ce(ui([e,t])),12))}function B0(i,e,t){return Nt(e)!==32&&Ci.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ci.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ee(ce(ye(["0xff",fe(i),e,t])),12))}var no=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(he(e.readValue().toHexString(),20))}};var io=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Qr=new M(Vn);function Ml(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Qr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Qr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Qr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Qr.throwArgumentError("types/value length mismatch","tuple",t);let r=new or(i.wordSize),a=new or(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function El(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var ro=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Qr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rlo,EtherSymbol:()=>V0,HashZero:()=>Yr,MaxInt256:()=>j0,MaxUint256:()=>co,MinInt256:()=>U0,NegativeOne:()=>po,One:()=>yo,Two:()=>F0,WeiPerEther:()=>L0,Zero:()=>Xr});var lo="0x0000000000000000000000000000000000000000";var po=F.from(-1),Xr=F.from(0),yo=F.from(1),F0=F.from(2),L0=F.from("1000000000000000000"),co=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),U0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),j0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yr="0x0000000000000000000000000000000000000000000000000000000000000000";var V0="\u039E";var fo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=co.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(yo).mul(po)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Xr)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var q0="strings/5.7.0";var H0=new M(q0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Bt||(Bt={}));function h6(i,e,t,n,r){return H0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function G0(i,e,t,n,r){if(i===Bt.BAD_PREFIX||i===Bt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Bt.OVERRUN?t.length-e-1:0}function b6(i,e,t,n,r){return i===Bt.OVERLONG?(n.push(r),0):(n.push(65533),G0(i,e,t,n,r))}var mo=Object.freeze({error:h6,ignore:G0,replace:b6});function Il(i,e){e==null&&(e=mo.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Bt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Bt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Bt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function ve(i,e=Gt.current){e!=Gt.current&&(H0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function Cl(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function Sl(i,e){return'"'+Il(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Cl(t):(t-=65536,Cl((t>>10&1023)+55296)+Cl((t&1023)+56320))}).join("")+'"'}function ho(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return ho(Il(i,e))}function Ii(i,e=Gt.current){return Il(ve(i,e))}function Rl(i){let e=ve(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Yr]).slice(0,32))}function Pl(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function x6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function z0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Dl(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var g6=z0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),T6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),v6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],w6=Nl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),_6=Nl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),A6=Nl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",x6),k6=z0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function M6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function E6(i){return!!Dl(i,g6)}function C6(i){let e=Dl(i,v6);if(e)return[i+e.s];let t=w6[i];if(t)return t;let n=_6[i];if(n)return[i+n[0]];let r=A6[i];return r||null}function I6(i){return!!Dl(i,k6)}function Ol(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Ii(i);e=M6(e.map(n=>{if(T6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=C6(n);return r||[n]})),e=Ii(ho(e),Gt.NFKC),e.forEach(n=>{if(I6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(E6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ho(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var bo=class extends $a{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var dr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return Ml(e,this.coders,t)}decode(e){return e.coerce(this.name,El(e,this.coders))}};var xo=new M(Vn),S6=new RegExp(/^bytes([0-9]*)$/),R6=new RegExp(/^(u?int)([0-9]*)$/),Zr=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new no(e.name);case"bool":return new ao(e.name);case"string":return new bo(e.name);case"bytes":return new so(e.name);case"array":return new ro(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new dr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new uo(e.name)}let t=e.type.match(R6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&xo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new fo(n/8,t[1]==="int",e.name)}if(t=e.type.match(S6),t){let n=parseInt(t[1]);return(n===0||n>32)&&xo.throwArgumentError("invalid bytes length","param",e),new oo(n,e.name)}return xo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ur(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new or(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(pt.from(r)));return new dr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&xo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),r=new dr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(pt.from(s)));return new dr(r,"_").decode(this._getReader(V(t),n))}},Qa=new Zr;function nn(i){return ce(ve(i))}var go="hash/5.7.0";var Bl={};Gr(Bl,{decode:()=>ea,encode:()=>ta});function ea(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function P6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,q=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function D6(i){let e=0;return()=>i[e++]}function J0(i){return D6(N6(i))}function O6(i){return i&1?~i>>1:i>>1}function B6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function $0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(U6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(j6(t,i))}return P6(K0(e))}function L6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function Q0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function U6(i,e){let t=1+e(),n=e(),r=L6(e),a=Q0(r.length,1+i,e);return K0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function j6(i,e){let t=1+e();return Q0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function X0(i){let e=Xa(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Xa(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function Y0(){return J0(ea("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var To=Y0(),V6=new Set(Xa(To)),q6=new Set(Xa(To)),H6=$0(To),G6=X0(To),Z0=45,ey=95;function ty(i){return Ii(i)}function z6(i){return i.filter(e=>e!=65039)}function ny(i){for(let e of i.split(".")){let t=ty(e);try{for(let n=t.lastIndexOf(ey)-1;n>=0;n--)if(t[n]!==ey)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Z0&&t[3]===Z0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function iy(i){return ny(W6(i,z6))}function W6(i,e){let t=ty(i).reverse(),n=[];for(;t.length;){let r=J6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(V6.has(a)){n.push(a);continue}if(q6.has(a))continue;let s=H6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return ny(K6(String.fromCodePoint(...n)))}function K6(i){return i.normalize("NFC")}function J6(i,e){var t;let n=G6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var $6=new M(go),ay=new Uint8Array(32);ay.fill(0);function ry(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function Fl(i){let e=ve(iy(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(ry(e.slice(n))),t}function Ll(i){try{return Fl(i).length!==0}catch{}return!1}function Si(i){typeof i!="string"&&$6.throwArgumentError("invalid ENS name; not a string","name",i);let e=ay,t=Fl(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function Ya(i){return W(ye(Fl(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var sy=`Ethereum Signed Message: -`;function na(i){return typeof i=="string"&&(i=ve(i)),ce(ye([ve(sy),ve(String(i.length)),i]))}var Q6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},bt=new M(go),dy=new Uint8Array(32);dy.fill(0);var X6=F.from(-1),py=F.from(0),yy=F.from(1),Y6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Z6(i){let e=V(i),t=e.length%32;return t?_t([e,dy.slice(t)]):W(e)}var e2=he(yy.toHexString(),32),t2=he(py.toHexString(),32),oy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ul=["name","version","chainId","verifyingContract","salt"];function uy(i){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var n2={name:uy("name"),version:uy("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return bt.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function jl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&bt.throwArgumentError("invalid numeric width","type",i);let r=Y6.mask(t?n-1:n),a=t?r.add(yy).mul(X6):py;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&bt.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),he(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&bt.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&bt.throwArgumentError(`invalid length for ${i}`,"value",n),Z6(n)}}}switch(i){case"address":return function(e){return he(fe(e),32)};case"bool":return function(e){return e?e2:t2};case"bytes":return function(e){return ce(e)};case"string":return function(e){return nn(e)}}return null}function ly(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var xt=class{constructor(e){B(this,"types",Object.freeze(ft(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&bt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!jl(c)&&(n[c]||bt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?bt.throwArgumentError("missing primary type","types",e):a.length>1&&bt.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=ly(o,e[o])+d.map(p=>ly(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=jl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),_t(s)}}return bt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||bt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(jl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):bt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new xt(e)}static getPrimaryType(e){return xt.from(e).primaryType}static hashStruct(e,t,n){return xt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=oy[n];r||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Ul.indexOf(n.name)-Ul.indexOf(r.name)),xt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",xt.hashDomain(e),xt.from(t).hash(n)])}static hash(e,t,n){return ce(xt.encode(e,t,n))}static resolveNames(e,t,n,r){return Q6(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=xt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){xt.hashDomain(e);let r={},a=[];Ul.forEach(d=>{let p=e[d];p!=null&&(r[d]=n2[d](p),a.push({name:d,type:oy[d]}))});let s=xt.from(t),o=we(t);return o.EIP712Domain?bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",d)})}}};var gt=new M(Vn);var ia=class extends en{},ra=class extends en{},Vl=class extends en{},li=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},i2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function cy(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Ri=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>Ht.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){gt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Qa}static getAddress(e){return fe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching function","name",n):r.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching event","name",n):r.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[qt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=mt(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching error","name",n):r.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=i2[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return gt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?ce(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),he(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new li({_isIndexed:!0,hash:null});else if(s[_])p[_]=new li({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw cy(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw cy(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ra({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ia({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Vl({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var fy="abstract-provider/5.7.0";var r2=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},a2=new M(fy),vo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){a2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return r2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var my="abstract-signer/5.7.0";var kn=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},pn=new M(my),s2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],o2=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){pn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)s2.indexOf(n)===-1&&pn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>kn(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&pn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&pn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&pn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):pn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(o2.indexOf(r.code)>=0)throw r;return pn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&pn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ce(t)})}_checkProvider(e){this.provider||pn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},di=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{pn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new di(this.address,e)}};var pe=An(ml()),$n=An(Xl());function ya(i,e,t){return t={path:e,exports:{},require:function(n,r){return Sb(n,r??t.path)}},i(t,t.exports),t.exports}function Sb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var td=Zy;function Zy(i,e){if(!i)throw new Error(e||"Assertion failed")}Zy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=ya(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),Mo=rn.getNAF,Rb=rn.getJSF,Eo=rn.assert;function Di(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var yr=Di;Di.prototype.point=function(){throw new Error("Not implemented")};Di.prototype.validate=function(){throw new Error("Not implemented")};Di.prototype._fixedNafMul=function(e,t){Eo(e.precomputed);var n=e._getDoubles(),r=Mo(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];Eo(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Di.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=Mo(n[v],s[v],this._bitLength),d[S]=Mo(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=Rb(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};cn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(i,e,t,n){yr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}nd(Pt,yr.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ao=ya(function(i,e){"use strict";var t=e;t.base=yr,t.short=Nb,t.mont=null,t.edwards=null}),ko=ya(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new Ao.short(o):o.type==="edwards"?this.curve=new Ao.edwards(o):this.curve=new Ao.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:$n.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:$n.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:$n.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:$n.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:$n.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:$n.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ni(i){if(!(this instanceof Ni))return new Ni(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(i.entropy,i.entropyEnc||"hex"),t=In.toArray(i.nonce,i.nonceEnc||"hex"),n=In.toArray(i.pers,i.persEnc||"hex");td(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var ec=Ni;Ni.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ni.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=In.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var Db=rn.assert;function Co(i,e){if(i instanceof Co)return i;this._importDER(i,e)||(Db(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var Io=Co;function Ob(){this.place=0}function Yl(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Yy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Co.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Yy(t),n=Yy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];Zl(r,t.length),r=r.concat(t),r.push(2),Zl(r,n.length);var a=r.concat(n),s=[48];return Zl(s,a.length),s=s.concat(a),rn.encode(s,e)};var Bb=function(){throw new Error("unsupported")},tc=rn.assert;function yn(i){if(!(this instanceof yn))return new yn(i);typeof i=="string"&&(tc(Object.prototype.hasOwnProperty.call(ko,i),"Unknown curve "+i),i=ko[i]),i instanceof ko.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var Fb=yn;yn.prototype.keyPair=function(e){return new id(this,e)};yn.prototype.keyFromPrivate=function(e,t){return id.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return id.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new ec({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Bb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};yn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};yn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new ec({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Io({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new Io(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};yn.prototype.recoverPubKey=function(i,e,t,n){tc((3&t)===t,"The recovery param is more than two bits"),e=new Io(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};yn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new Io(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var Lb=ya(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=Ao,t.curves=ko,t.ec=Fb,t.eddsa=null}),nc=Lb.ec;var ic="signing-key/5.7.0";var ad=new M(ic),rd=null;function Qn(){return rd||(rd=new nc("secp256k1")),rd}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&ad.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Qn().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Qn().keyFromPublic(V(this.publicKey)),n=Qn().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&ad.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return jn({recoveryParam:r.recoveryParam,r:he("0x"+r.r.toString(16),32),s:he("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=Qn().keyFromPrivate(V(this.privateKey)),n=Qn().keyFromPublic(V(ts(e)));return he("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function So(i,e){let t=jn(e),n={r:V(t.r),s:V(t.s)};return"0x"+Qn().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function ts(i,e){let t=V(i);if(t.length===32){let n=new mn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return ad.throwArgumentError("invalid public or private key","key","[REDACTED]")}var rc="transactions/5.7.0";var Ut=new M(rc),Ro;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Ro||(Ro={}));function od(i){return i==="0x"?null:fe(i)}function Lt(i){return i==="0x"?Xr:F.from(i)}var Ub=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],jb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(i){let e=ts(i);return fe(Ee(ce(Ee(e,1)),12))}function cr(i,e){return hn(So(V(i),e))}function an(i,e){let t=Zt(F.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function sd(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),sd(t[0],t[1])):sd(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return sd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function ac(i){return sn(i).map(e=>[e.address,e.storageKeys])}function sc(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",ac(i.accessList||[])];if(e){let n=jn(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",ui(t)])}function oc(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",ac(i.accessList||[])];if(e){let n=jn(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",ui(t)])}function Vb(i,e){Kr(i,jb);let t=[];Ub.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ai(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return ui(t);let r=jn(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(Zt(V(r.r))),t.push(Zt(V(r.s))),ui(t)}function ns(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),Vb(i,e);switch(i.type){case 1:return oc(i,e);case 2:return sc(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function uc(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=he(e[1],32),i.s=he(e[2],32);try{let n=ce(t(i));i.from=cr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function qb(i){let e=Ja(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:od(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=ce(i),uc(r,e.slice(9),sc)),r}function Hb(i){let e=Ja(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:od(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=ce(i),uc(t,e.slice(8),oc)),t}function Gb(i){let e=Ja(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:od(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=he(e[7],32),t.s=he(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(ui(r));try{t.from=cr(a,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function Po(i){let e=V(i);if(e[0]>127)return Gb(e);switch(e[0]){case 1:return Hb(e);case 2:return qb(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var lc="contracts/5.7.0";var Oi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ie=new M(lc),zb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function No(i,e){return Oi(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Ie.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function is(i,e,t){return Oi(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>is(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield No(i,e):t.type==="tuple"?yield is(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>is(i,n,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Bo(i,e,t){return Oi(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ce({override:No(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Oi(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=No(i.provider,n.from));let r=yield Ce({args:is(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ce(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Ie.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function Wb(i,e){return function(...t){return Bo(i,e,t)}}function Kb(i,e){let t=i.signer||i.provider;return function(...n){return Oi(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Bo(i,e,n);return yield t.estimateGas(r)})}}function pc(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ft(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function yc(i,e,t){let n=i.signer||i.provider;return function(...r){return Oi(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Bo(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function Jb(i,e){return function(...t){return Oi(this,void 0,void 0,function*(){i.signer||Ie.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Bo(i,e,t),r=yield i.signer.sendTransaction(n);return pc(i,r),r})}}function dc(i,e,t){return e.constant?yc(i,e,t):Jb(i,e)}function cc(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var fr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ud=class extends fr{constructor(){super("error",null)}},Do=class extends fr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ie.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(cc(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=$r(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Oo=class extends fr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},ca=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Ie.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",No(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,dc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,dc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Wb(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Kb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return lr(e)}static getInterface(e){return Ri.isInterface(e)?e:new Ri(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new di(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return li.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ud);if(e==="event")return this._normalizeRunningEvent(new fr("event",null));if(e==="*")return this._normalizeRunningEvent(new Oo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Do(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Do(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fr(cc(t),t))}return this._normalizeRunningEvent(new Oo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ft(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends ca{},mr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:un(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Ie.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!zb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Oi(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield is(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=mt(this.constructor,"getContractAddress")(a),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return pc(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return lr(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Fo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(mi(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var Xh=Object.create;var Js=Object.defineProperty;var Yh=Object.getOwnPropertyDescriptor;var Zh=Object.getOwnPropertyNames;var e6=Object.getPrototypeOf,t6=Object.prototype.hasOwnProperty;var n6=(a,e,t)=>e in a?Js(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Gi=(a,e)=>{for(var t in e)Js(a,t,{get:e[t],enumerable:!0})},a6=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zh(e))!t6.call(a,i)&&i!==t&&Js(a,i,{get:()=>e[i],enumerable:!(n=Yh(e,i))||n.enumerable});return a};var kn=(a,e,t)=>(t=a!=null?Xh(e6(a)):{},a6(e||!a||!a.__esModule?Js(t,"default",{value:a,enumerable:!0}):t,a));var be=(a,e,t)=>(n6(a,typeof e!="symbol"?e+"":e,t),t);var Qp=ae(()=>{});var md=ae((Xp,cd)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Qp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>13,qa=w[4]|0,De=qa&8191,Oe=qa>>>13,Ga=w[5]|0,Be=Ga&8191,Fe=Ga>>>13,za=w[6]|0,Le=za&8191,Ue=za>>>13,Wa=w[7]|0,Ve=Wa&8191,je=Wa>>>13,Ka=w[8]|0,He=Ka&8191,qe=Ka>>>13,Ja=w[9]|0,Ge=Ja&8191,ze=Ja>>>13,$a=A[0]|0,We=$a&8191,Ke=$a>>>13,Qa=A[1]|0,Je=Qa&8191,$e=Qa>>>13,Xa=A[2]|0,Qe=Xa&8191,Xe=Xa>>>13,Ya=A[3]|0,Ye=Ya&8191,Ze=Ya>>>13,Za=A[4]|0,et=Za&8191,tt=Za>>>13,ei=A[5]|0,nt=ei&8191,at=ei>>>13,ti=A[6]|0,it=ti&8191,rt=ti>>>13,ni=A[7]|0,st=ni&8191,ot=ni>>>13,ai=A[8]|0,ut=ai&8191,dt=ai>>>13,ii=A[9]|0,lt=ii&8191,pt=ii>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,We),d=Math.imul(c,Ke),d=d+Math.imul(P,We)|0,m=Math.imul(P,Ke);var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(V,We),d=Math.imul(V,Ke),d=d+Math.imul(K,We)|0,m=Math.imul(K,Ke),g=g+Math.imul(c,Je)|0,d=d+Math.imul(c,$e)|0,d=d+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(X,We),d=Math.imul(X,Ke),d=d+Math.imul(Q,We)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,Je)|0,d=d+Math.imul(V,$e)|0,d=d+Math.imul(K,Je)|0,m=m+Math.imul(K,$e)|0,g=g+Math.imul(c,Qe)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(P,Qe)|0,m=m+Math.imul(P,Xe)|0;var Aa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,g=Math.imul(Z,We),d=Math.imul(Z,Ke),d=d+Math.imul(le,We)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,Je)|0,d=d+Math.imul(X,$e)|0,d=d+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(V,Qe)|0,d=d+Math.imul(V,Xe)|0,d=d+Math.imul(K,Qe)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(c,Ye)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(P,Ye)|0,m=m+Math.imul(P,Ze)|0;var Ea=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,g=Math.imul(De,We),d=Math.imul(De,Ke),d=d+Math.imul(Oe,We)|0,m=Math.imul(Oe,Ke),g=g+Math.imul(Z,Je)|0,d=d+Math.imul(Z,$e)|0,d=d+Math.imul(le,Je)|0,m=m+Math.imul(le,$e)|0,g=g+Math.imul(X,Qe)|0,d=d+Math.imul(X,Xe)|0,d=d+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(V,Ye)|0,d=d+Math.imul(V,Ze)|0,d=d+Math.imul(K,Ye)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(c,et)|0,d=d+Math.imul(c,tt)|0,d=d+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Ma=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,g=Math.imul(Be,We),d=Math.imul(Be,Ke),d=d+Math.imul(Fe,We)|0,m=Math.imul(Fe,Ke),g=g+Math.imul(De,Je)|0,d=d+Math.imul(De,$e)|0,d=d+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Z,Qe)|0,d=d+Math.imul(Z,Xe)|0,d=d+Math.imul(le,Qe)|0,m=m+Math.imul(le,Xe)|0,g=g+Math.imul(X,Ye)|0,d=d+Math.imul(X,Ze)|0,d=d+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(V,et)|0,d=d+Math.imul(V,tt)|0,d=d+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(c,nt)|0,d=d+Math.imul(c,at)|0,d=d+Math.imul(P,nt)|0,m=m+Math.imul(P,at)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(Le,We),d=Math.imul(Le,Ke),d=d+Math.imul(Ue,We)|0,m=Math.imul(Ue,Ke),g=g+Math.imul(Be,Je)|0,d=d+Math.imul(Be,$e)|0,d=d+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,d=d+Math.imul(De,Xe)|0,d=d+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Z,Ye)|0,d=d+Math.imul(Z,Ze)|0,d=d+Math.imul(le,Ye)|0,m=m+Math.imul(le,Ze)|0,g=g+Math.imul(X,et)|0,d=d+Math.imul(X,tt)|0,d=d+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(V,nt)|0,d=d+Math.imul(V,at)|0,d=d+Math.imul(K,nt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(c,it)|0,d=d+Math.imul(c,rt)|0,d=d+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(Ve,We),d=Math.imul(Ve,Ke),d=d+Math.imul(je,We)|0,m=Math.imul(je,Ke),g=g+Math.imul(Le,Je)|0,d=d+Math.imul(Le,$e)|0,d=d+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,d=d+Math.imul(Be,Xe)|0,d=d+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,d=d+Math.imul(De,Ze)|0,d=d+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Z,et)|0,d=d+Math.imul(Z,tt)|0,d=d+Math.imul(le,et)|0,m=m+Math.imul(le,tt)|0,g=g+Math.imul(X,nt)|0,d=d+Math.imul(X,at)|0,d=d+Math.imul(Q,nt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(V,it)|0,d=d+Math.imul(V,rt)|0,d=d+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(c,st)|0,d=d+Math.imul(c,ot)|0,d=d+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(He,We),d=Math.imul(He,Ke),d=d+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(Ve,Je)|0,d=d+Math.imul(Ve,$e)|0,d=d+Math.imul(je,Je)|0,m=m+Math.imul(je,$e)|0,g=g+Math.imul(Le,Qe)|0,d=d+Math.imul(Le,Xe)|0,d=d+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,d=d+Math.imul(Be,Ze)|0,d=d+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,d=d+Math.imul(De,tt)|0,d=d+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Z,nt)|0,d=d+Math.imul(Z,at)|0,d=d+Math.imul(le,nt)|0,m=m+Math.imul(le,at)|0,g=g+Math.imul(X,it)|0,d=d+Math.imul(X,rt)|0,d=d+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(V,st)|0,d=d+Math.imul(V,ot)|0,d=d+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(c,ut)|0,d=d+Math.imul(c,dt)|0,d=d+Math.imul(P,ut)|0,m=m+Math.imul(P,dt)|0;var ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(Ge,We),d=Math.imul(Ge,Ke),d=d+Math.imul(ze,We)|0,m=Math.imul(ze,Ke),g=g+Math.imul(He,Je)|0,d=d+Math.imul(He,$e)|0,d=d+Math.imul(qe,Je)|0,m=m+Math.imul(qe,$e)|0,g=g+Math.imul(Ve,Qe)|0,d=d+Math.imul(Ve,Xe)|0,d=d+Math.imul(je,Qe)|0,m=m+Math.imul(je,Xe)|0,g=g+Math.imul(Le,Ye)|0,d=d+Math.imul(Le,Ze)|0,d=d+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,d=d+Math.imul(Be,tt)|0,d=d+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,d=d+Math.imul(De,at)|0,d=d+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Z,it)|0,d=d+Math.imul(Z,rt)|0,d=d+Math.imul(le,it)|0,m=m+Math.imul(le,rt)|0,g=g+Math.imul(X,st)|0,d=d+Math.imul(X,ot)|0,d=d+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(V,ut)|0,d=d+Math.imul(V,dt)|0,d=d+Math.imul(K,ut)|0,m=m+Math.imul(K,dt)|0,g=g+Math.imul(c,lt)|0,d=d+Math.imul(c,pt)|0,d=d+Math.imul(P,lt)|0,m=m+Math.imul(P,pt)|0;var id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(Ge,Je),d=Math.imul(Ge,$e),d=d+Math.imul(ze,Je)|0,m=Math.imul(ze,$e),g=g+Math.imul(He,Qe)|0,d=d+Math.imul(He,Xe)|0,d=d+Math.imul(qe,Qe)|0,m=m+Math.imul(qe,Xe)|0,g=g+Math.imul(Ve,Ye)|0,d=d+Math.imul(Ve,Ze)|0,d=d+Math.imul(je,Ye)|0,m=m+Math.imul(je,Ze)|0,g=g+Math.imul(Le,et)|0,d=d+Math.imul(Le,tt)|0,d=d+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,it)|0,d=d+Math.imul(De,rt)|0,d=d+Math.imul(Oe,it)|0,m=m+Math.imul(Oe,rt)|0,g=g+Math.imul(Z,st)|0,d=d+Math.imul(Z,ot)|0,d=d+Math.imul(le,st)|0,m=m+Math.imul(le,ot)|0,g=g+Math.imul(X,ut)|0,d=d+Math.imul(X,dt)|0,d=d+Math.imul(Q,ut)|0,m=m+Math.imul(Q,dt)|0,g=g+Math.imul(V,lt)|0,d=d+Math.imul(V,pt)|0,d=d+Math.imul(K,lt)|0,m=m+Math.imul(K,pt)|0;var rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(Ge,Qe),d=Math.imul(Ge,Xe),d=d+Math.imul(ze,Qe)|0,m=Math.imul(ze,Xe),g=g+Math.imul(He,Ye)|0,d=d+Math.imul(He,Ze)|0,d=d+Math.imul(qe,Ye)|0,m=m+Math.imul(qe,Ze)|0,g=g+Math.imul(Ve,et)|0,d=d+Math.imul(Ve,tt)|0,d=d+Math.imul(je,et)|0,m=m+Math.imul(je,tt)|0,g=g+Math.imul(Le,nt)|0,d=d+Math.imul(Le,at)|0,d=d+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,it)|0,d=d+Math.imul(Be,rt)|0,d=d+Math.imul(Fe,it)|0,m=m+Math.imul(Fe,rt)|0,g=g+Math.imul(De,st)|0,d=d+Math.imul(De,ot)|0,d=d+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Z,ut)|0,d=d+Math.imul(Z,dt)|0,d=d+Math.imul(le,ut)|0,m=m+Math.imul(le,dt)|0,g=g+Math.imul(X,lt)|0,d=d+Math.imul(X,pt)|0,d=d+Math.imul(Q,lt)|0,m=m+Math.imul(Q,pt)|0;var sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(Ge,Ye),d=Math.imul(Ge,Ze),d=d+Math.imul(ze,Ye)|0,m=Math.imul(ze,Ze),g=g+Math.imul(He,et)|0,d=d+Math.imul(He,tt)|0,d=d+Math.imul(qe,et)|0,m=m+Math.imul(qe,tt)|0,g=g+Math.imul(Ve,nt)|0,d=d+Math.imul(Ve,at)|0,d=d+Math.imul(je,nt)|0,m=m+Math.imul(je,at)|0,g=g+Math.imul(Le,it)|0,d=d+Math.imul(Le,rt)|0,d=d+Math.imul(Ue,it)|0,m=m+Math.imul(Ue,rt)|0,g=g+Math.imul(Be,st)|0,d=d+Math.imul(Be,ot)|0,d=d+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,d=d+Math.imul(De,dt)|0,d=d+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,dt)|0,g=g+Math.imul(Z,lt)|0,d=d+Math.imul(Z,pt)|0,d=d+Math.imul(le,lt)|0,m=m+Math.imul(le,pt)|0;var od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=67108863,g=Math.imul(Ge,et),d=Math.imul(Ge,tt),d=d+Math.imul(ze,et)|0,m=Math.imul(ze,tt),g=g+Math.imul(He,nt)|0,d=d+Math.imul(He,at)|0,d=d+Math.imul(qe,nt)|0,m=m+Math.imul(qe,at)|0,g=g+Math.imul(Ve,it)|0,d=d+Math.imul(Ve,rt)|0,d=d+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Le,st)|0,d=d+Math.imul(Le,ot)|0,d=d+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,d=d+Math.imul(Be,dt)|0,d=d+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,dt)|0,g=g+Math.imul(De,lt)|0,d=d+Math.imul(De,pt)|0,d=d+Math.imul(Oe,lt)|0,m=m+Math.imul(Oe,pt)|0;var ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=67108863,g=Math.imul(Ge,nt),d=Math.imul(Ge,at),d=d+Math.imul(ze,nt)|0,m=Math.imul(ze,at),g=g+Math.imul(He,it)|0,d=d+Math.imul(He,rt)|0,d=d+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ve,st)|0,d=d+Math.imul(Ve,ot)|0,d=d+Math.imul(je,st)|0,m=m+Math.imul(je,ot)|0,g=g+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,dt)|0,g=g+Math.imul(Be,lt)|0,d=d+Math.imul(Be,pt)|0,d=d+Math.imul(Fe,lt)|0,m=m+Math.imul(Fe,pt)|0;var dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=67108863,g=Math.imul(Ge,it),d=Math.imul(Ge,rt),d=d+Math.imul(ze,it)|0,m=Math.imul(ze,rt),g=g+Math.imul(He,st)|0,d=d+Math.imul(He,ot)|0,d=d+Math.imul(qe,st)|0,m=m+Math.imul(qe,ot)|0,g=g+Math.imul(Ve,ut)|0,d=d+Math.imul(Ve,dt)|0,d=d+Math.imul(je,ut)|0,m=m+Math.imul(je,dt)|0,g=g+Math.imul(Le,lt)|0,d=d+Math.imul(Le,pt)|0,d=d+Math.imul(Ue,lt)|0,m=m+Math.imul(Ue,pt)|0;var ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,g=Math.imul(Ge,st),d=Math.imul(Ge,ot),d=d+Math.imul(ze,st)|0,m=Math.imul(ze,ot),g=g+Math.imul(He,ut)|0,d=d+Math.imul(He,dt)|0,d=d+Math.imul(qe,ut)|0,m=m+Math.imul(qe,dt)|0,g=g+Math.imul(Ve,lt)|0,d=d+Math.imul(Ve,pt)|0,d=d+Math.imul(je,lt)|0,m=m+Math.imul(je,pt)|0;var pd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=67108863,g=Math.imul(Ge,ut),d=Math.imul(Ge,dt),d=d+Math.imul(ze,ut)|0,m=Math.imul(ze,dt),g=g+Math.imul(He,lt)|0,d=d+Math.imul(He,pt)|0,d=d+Math.imul(qe,lt)|0,m=m+Math.imul(qe,pt)|0;var yd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(yd>>>26)|0,yd&=67108863,g=Math.imul(Ge,lt),d=Math.imul(Ge,pt),d=d+Math.imul(ze,lt)|0,m=Math.imul(ze,pt);var fd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(fd>>>26)|0,fd&=67108863,h[0]=_a,h[1]=ka,h[2]=Aa,h[3]=Ea,h[4]=Ma,h[5]=ed,h[6]=td,h[7]=nd,h[8]=ad,h[9]=id,h[10]=rd,h[11]=sd,h[12]=od,h[13]=ud,h[14]=dd,h[15]=ld,h[16]=pd,h[17]=yd,h[18]=fd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function M(I,u){this.x=I,this.y=u}M.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},M.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof cd>"u"||cd,Xp)});var wy=ae((nT,eo)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof eo=="object"&&eo.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var M=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,ft=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var ft=new Uint32Array(Q);ee>8&255,X[Q+2]=ft>>16&255,X[Q+3]=ft>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,ft=P[K],X[Q]=ft&255,V>1&&(X[Q+1]=ft>>8&255),V>2&&(X[Q+2]=ft>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,ft,Z,le,qa,De,Oe,Ga,Be,Fe,za,Le,Ue,Wa,Ve,je,Ka,He,qe,Ja,Ge,ze,$a,We,Ke,Qa,Je,$e,Xa,Qe,Xe,Ya,Ye,Ze,Za,et,tt,ei,nt,at,ti,it,rt,ni,st,ot,ai,ut,dt,ii,lt,pt,_a,ka,Aa,Ea,Ma;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],ft=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],qa=c[7]^c[17]^c[27]^c[37]^c[47],De=c[8]^c[18]^c[28]^c[38]^c[48],Oe=c[9]^c[19]^c[29]^c[39]^c[49],P=De^(X<<1|Q>>>31),D=Oe^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(ft<<1|Z>>>31),D=ee^(Z<<1|ft>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|qa>>>31),D=Q^(qa<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=ft^(De<<1|Oe>>>31),D=Z^(Oe<<1|De>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=qa^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,Ga=c[0],Be=c[1],at=c[11]<<4|c[10]>>>28,ti=c[10]<<4|c[11]>>>28,ze=c[20]<<3|c[21]>>>29,$a=c[21]<<3|c[20]>>>29,ka=c[31]<<9|c[30]>>>23,Aa=c[30]<<9|c[31]>>>23,et=c[40]<<18|c[41]>>>14,tt=c[41]<<18|c[40]>>>14,$e=c[2]<<1|c[3]>>>31,Xa=c[3]<<1|c[2]>>>31,Fe=c[13]<<12|c[12]>>>20,za=c[12]<<12|c[13]>>>20,it=c[22]<<10|c[23]>>>22,rt=c[23]<<10|c[22]>>>22,We=c[33]<<13|c[32]>>>19,Ke=c[32]<<13|c[33]>>>19,Ea=c[42]<<2|c[43]>>>30,Ma=c[43]<<2|c[42]>>>30,ut=c[5]<<30|c[4]>>>2,dt=c[4]<<30|c[5]>>>2,Qe=c[14]<<6|c[15]>>>26,Xe=c[15]<<6|c[14]>>>26,Le=c[25]<<11|c[24]>>>21,Ue=c[24]<<11|c[25]>>>21,ni=c[34]<<15|c[35]>>>17,st=c[35]<<15|c[34]>>>17,Qa=c[45]<<29|c[44]>>>3,Je=c[44]<<29|c[45]>>>3,He=c[6]<<28|c[7]>>>4,qe=c[7]<<28|c[6]>>>4,ii=c[17]<<23|c[16]>>>9,lt=c[16]<<23|c[17]>>>9,Ya=c[26]<<25|c[27]>>>7,Ye=c[27]<<25|c[26]>>>7,Wa=c[36]<<21|c[37]>>>11,Ve=c[37]<<21|c[36]>>>11,ot=c[47]<<24|c[46]>>>8,ai=c[46]<<24|c[47]>>>8,ei=c[8]<<27|c[9]>>>5,nt=c[9]<<27|c[8]>>>5,Ja=c[18]<<20|c[19]>>>12,Ge=c[19]<<20|c[18]>>>12,pt=c[29]<<7|c[28]>>>25,_a=c[28]<<7|c[29]>>>25,Ze=c[38]<<8|c[39]>>>24,Za=c[39]<<8|c[38]>>>24,je=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=Ga^~Fe&Le,c[1]=Be^~za&Ue,c[10]=He^~Ja&ze,c[11]=qe^~Ge&$a,c[20]=$e^~Qe&Ya,c[21]=Xa^~Xe&Ye,c[30]=ei^~at&it,c[31]=nt^~ti&rt,c[40]=ut^~ii&pt,c[41]=dt^~lt&_a,c[2]=Fe^~Le&Wa,c[3]=za^~Ue&Ve,c[12]=Ja^~ze&We,c[13]=Ge^~$a&Ke,c[22]=Qe^~Ya&Ze,c[23]=Xe^~Ye&Za,c[32]=at^~it&ni,c[33]=ti^~rt&st,c[42]=ii^~pt&ka,c[43]=lt^~_a&Aa,c[4]=Le^~Wa&je,c[5]=Ue^~Ve&Ka,c[14]=ze^~We&Qa,c[15]=$a^~Ke&Je,c[24]=Ya^~Ze&et,c[25]=Ye^~Za&tt,c[34]=it^~ni&ot,c[35]=rt^~st&ai,c[44]=pt^~ka&Ea,c[45]=_a^~Aa&Ma,c[6]=Wa^~je&Ga,c[7]=Ve^~Ka&Be,c[16]=We^~Qa&He,c[17]=Ke^~Je&qe,c[26]=Ze^~et&$e,c[27]=Za^~tt&Xa,c[36]=ni^~ot&ei,c[37]=st^~ai&nt,c[46]=ka^~Ea&ut,c[47]=Aa^~Ma&dt,c[8]=je^~Ga&Fe,c[9]=Ka^~Be&za,c[18]=Qa^~He&Ja,c[19]=Je^~qe&Ge,c[28]=et^~$e&Qe,c[29]=tt^~Xa&Xe,c[38]=ot^~ei&at,c[39]=ai^~nt&ti,c[48]=Ea^~ut&ii,c[49]=Ma^~dt<,c[0]^=S[V],c[1]^=S[V+1]};if(s)eo.exports=u;else{for(b=0;b{x0.exports=h0;function h0(a,e){if(!a)throw new Error(e||"Assertion failed")}h0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var b0=ae((J3,Hd)=>{typeof Object.create=="function"?Hd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Hd.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var En=ae(Pe=>{"use strict";var u2=rr(),d2=b0();Pe.inherits=d2;function l2(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function p2(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):l2(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=g0;function f2(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=c2;function m2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=m2;function h2(a,e){return a>>>e|a<<32-e}Pe.rotr32=h2;function x2(a,e){return a<>>32-e}Pe.rotl32=x2;function b2(a,e){return a+e>>>0}Pe.sum32=b2;function g2(a,e,t){return a+e+t>>>0}Pe.sum32_3=g2;function T2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=T2;function v2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=v2;function w2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=w2;function _2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=_2;function k2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=k2;function A2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=A2;function E2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=E2;function M2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=M2;function I2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=I2;function C2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=C2;function S2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=S2;function R2(a,e,t){return a>>>t}Pe.shr64_hi=R2;function P2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=P2});var sr=ae(_0=>{"use strict";var w0=En(),N2=rr();function wo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}_0.BlockHash=wo;wo.prototype.update=function(e,t){if(e=w0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=w0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var D2=En(),qn=D2.rotr32;function O2(a,e,t,n){if(a===0)return k0(e,t,n);if(a===1||a===3)return E0(e,t,n);if(a===2)return A0(e,t,n)}pa.ft_1=O2;function k0(a,e,t){return a&e^~a&t}pa.ch32=k0;function A0(a,e,t){return a&e^a&t^e&t}pa.maj32=A0;function E0(a,e,t){return a^e^t}pa.p32=E0;function B2(a){return qn(a,2)^qn(a,13)^qn(a,22)}pa.s0_256=B2;function F2(a){return qn(a,6)^qn(a,11)^qn(a,25)}pa.s1_256=F2;function L2(a){return qn(a,7)^qn(a,18)^a>>>3}pa.g0_256=L2;function U2(a){return qn(a,17)^qn(a,19)^a>>>10}pa.g1_256=U2});var C0=ae((Y3,I0)=>{"use strict";var or=En(),V2=sr(),j2=qd(),Gd=or.rotl32,Zr=or.sum32,H2=or.sum32_5,q2=j2.ft_1,M0=V2.BlockHash,G2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;M0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}or.inherits(Gn,M0);I0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var ur=En(),z2=sr(),dr=qd(),W2=rr(),Mn=ur.sum32,K2=ur.sum32_4,J2=ur.sum32_5,$2=dr.ch32,Q2=dr.maj32,X2=dr.s0_256,Y2=dr.s1_256,Z2=dr.g0_256,e5=dr.g1_256,S0=z2.BlockHash,t5=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function zn(){if(!(this instanceof zn))return new zn;S0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=t5,this.W=new Array(64)}ur.inherits(zn,S0);R0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Wd=En(),P0=zd();function ya(){if(!(this instanceof ya))return new ya;P0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Wd.inherits(ya,P0);N0.exports=ya;ya.blockSize=512;ya.outSize=224;ya.hmacStrength=192;ya.padLength=64;ya.prototype._digest=function(e){return e==="hex"?Wd.toHex32(this.h.slice(0,7),"big"):Wd.split32(this.h.slice(0,7),"big")}});var $d=ae((t8,L0)=>{"use strict";var Qt=En(),n5=sr(),a5=rr(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,O0=Qt.shr64_hi,B0=Qt.shr64_lo,Pa=Qt.sum64,Kd=Qt.sum64_hi,Jd=Qt.sum64_lo,i5=Qt.sum64_4_hi,r5=Qt.sum64_4_lo,s5=Qt.sum64_5_hi,o5=Qt.sum64_5_lo,F0=n5.BlockHash,u5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function In(){if(!(this instanceof In))return new In;F0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=u5,this.W=new Array(160)}Qt.inherits(In,F0);L0.exports=In;In.blockSize=1024;In.outSize=512;In.hmacStrength=192;In.padLength=128;In.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Qd=En(),U0=$d();function fa(){if(!(this instanceof fa))return new fa;U0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Qd.inherits(fa,U0);V0.exports=fa;fa.blockSize=1024;fa.outSize=384;fa.hmacStrength=192;fa.padLength=128;fa.prototype._digest=function(e){return e==="hex"?Qd.toHex32(this.h.slice(0,12),"big"):Qd.split32(this.h.slice(0,12),"big")}});var H0=ae(lr=>{"use strict";lr.sha1=C0();lr.sha224=D0();lr.sha256=zd();lr.sha384=j0();lr.sha512=$d()});var J0=ae(K0=>{"use strict";var pi=En(),v5=sr(),_o=pi.rotl32,q0=pi.sum32,es=pi.sum32_3,G0=pi.sum32_4,W0=v5.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;W0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pi.inherits(Jn,W0);K0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=q0(_o(G0(n,z0(_,i,r,s),e[k5[_]+t],w5(_)),E5[_]),o);n=o,o=s,s=_o(r,10),r=i,i=v,v=q0(_o(G0(l,z0(79-_,p,f,x),e[A5[_]+t],_5(_)),M5[_]),C),l=C,C=x,x=_o(f,10),f=p,p=v}v=es(this.h[1],r,x),this.h[1]=es(this.h[2],s,C),this.h[2]=es(this.h[3],o,l),this.h[3]=es(this.h[4],n,p),this.h[4]=es(this.h[0],i,f),this.h[0]=v};Jn.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h,"little"):pi.split32(this.h,"little")};function z0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function w5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function _5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var k5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],A5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],E5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Q0=ae((r8,$0)=>{"use strict";var I5=En(),C5=rr();function pr(a,e,t){if(!(this instanceof pr))return new pr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(I5.toArray(e,t))}$0.exports=pr;pr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),C5(e.length<=this.blockSize);for(var t=e.length;t{var Rt=X0;Rt.utils=En();Rt.common=sr();Rt.sha=H0();Rt.ripemd=J0();Rt.hmac=Q0();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var hl=ae((ml,Ef)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],M=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,M=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=M,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,M=M+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,M=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),M=M.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),M=M.concat(t(U.concat(t(O))).slice(0,S))),M}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let M=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),M.push(J[G]>>8&255),M.push(J[G]>>16&255),M.push(J[G]>>24&255);let m=n(_,M,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(M,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),M(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof vl<"u"?If.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(vl)});var Zf=ae((J4,Yf)=>{"use strict";var Ko="qpzry9x8gf2tvdw0s3jn54khce6mua7l",El={};for(ls=0;ls>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Qf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=Tr(e)^n>>5}for(e=Tr(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=Qf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=Tr(n)^s,i+=Ko.charAt(s)}for(r=0;r<6;++r)n=Tr(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Ko.charAt(o)}return i}function Xf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=Qf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function fx(){var a=Xf.apply(null,arguments);if(typeof a=="object")return a}function cx(a){var e=Xf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Jo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof ep=="object"&&typeof tp<"u"?tp.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(ep,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var np=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$dictionary=void 0;cu.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Ns=ae((oE,xm)=>{xm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var ip=ae(Ua=>{var Ee=Ns(),ap=()=>[{type:Ee.RANGE,from:48,to:57}],bm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ap()),gm=()=>[{type:Ee.CHAR,value:9},{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:11},{type:Ee.CHAR,value:12},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:32},{type:Ee.CHAR,value:160},{type:Ee.CHAR,value:5760},{type:Ee.RANGE,from:8192,to:8202},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233},{type:Ee.CHAR,value:8239},{type:Ee.CHAR,value:8287},{type:Ee.CHAR,value:12288},{type:Ee.CHAR,value:65279}],nb=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Ua.words=()=>({type:Ee.SET,set:bm(),not:!1});Ua.notWords=()=>({type:Ee.SET,set:bm(),not:!0});Ua.ints=()=>({type:Ee.SET,set:ap(),not:!1});Ua.notInts=()=>({type:Ee.SET,set:ap(),not:!0});Ua.whitespace=()=>({type:Ee.SET,set:gm(),not:!1});Ua.notWhitespace=()=>({type:Ee.SET,set:gm(),not:!0});Ua.anyChar=()=>({type:Ee.SET,set:nb(),not:!0})});var vm=ae(Ds=>{var Tm=Ns(),Pr=ip(),ab="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",ib={0:0,t:9,n:10,v:11,f:12,r:13};Ds.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?ab.indexOf(l):ib[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Ds.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Pr.words());else if(i[2])t.push(Pr.ints());else if(i[3])t.push(Pr.whitespace());else if(i[4])t.push(Pr.notWords());else if(i[5])t.push(Pr.notInts());else if(i[6])t.push(Pr.notWhitespace());else if(i[7])t.push({type:Tm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:Tm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Ds.error(e,"Unterminated character class")};Ds.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var wm=ae(Os=>{var mu=Ns();Os.wordBoundary=()=>({type:mu.POSITION,value:"b"});Os.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Os.begin=()=>({type:mu.POSITION,value:"^"});Os.end=()=>({type:mu.POSITION,value:"$"})});var _m=ae((pE,rp)=>{var Nr=vm(),bn=Ns(),_i=ip(),hu=wm();rp.exports=a=>{var e=0,t,n,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Nr.error(a,`Nothing to repeat at column ${O-1}`)},p=Nr.strToChars(a);for(t=p.length;e{"use strict";var gn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new gn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};km.exports=Va});var Mm=ae((fE,Em)=>{var xu=_m(),Bs=Am(),ki=xu.types;Em.exports=class Fs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=xu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Fs.prototype.max!=null?Fs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case ki.ROOT:case ki.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var rb=Ai&&Ai.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var sb=rb(Mm()),ob;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new sb.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(ob=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ls=ae(Dr=>{"use strict";var ub=Dr&&Dr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeGuardError=void 0;var db=function(a){ub(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Dr.TypeGuardError=db});var Cm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var lb=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};bu.$any=lb});var Sm=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var pb=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var yb=Ls(),fb=function(a){return function(e,t){if(e===!0)throw new yb.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=fb});var Pm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var cb=function(a,e,t){return e<=a&&a<=t};vu.$is_between=cb});var Nm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var mb=np(),hb=function(a,e,t,n){var i,r=(i=mb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};wu.$is_custom=hb});var Dm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var xb=function(a){return bb.test(a)};_u.$is_date=xb;var bb=/^(\d{4})-(\d{2})-(\d{2})$/});var Om=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var gb=function(a){return!isNaN(new Date(a).getTime())};ku.$is_datetime=gb});var Bm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var Tb=function(a){return vb.test(a)};Au.$is_email=Tb;var vb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Fm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv4=void 0;var wb=function(a){return _b.test(a)};Eu.$is_ipv4=wb;var _b=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Lm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var kb=function(a){return Ab.test(a)};Mu.$is_ipv6=kb;var Ab=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Um=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_url=void 0;var Eb=function(a){return Mb.test(a)};Iu.$is_url=Eb;var Mb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Vm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_uuid=void 0;var Ib=function(a){return Cb.test(a)};Cu.$is_uuid=Ib;var Cb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var jm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var Sb=function(a){return Rb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Su.$join=Sb;var Rb=function(a){return Pb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},Pb=function(a){return Nb.has(a)},Nb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Hm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var Db=Ls(),Ob=function(a){if(isFinite(a)===!1)throw new Db.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};Ru.$number=Ob});var qm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var Bb=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Pu.$report=Bb});var Gm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var Fb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Nu.$rest=Fb});var zm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var Lb=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Du.$string=Lb});var Wm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var Ub=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Ou.$tail=Ub});var Qm=ae(Ei=>{"use strict";var Vt=Ei&&Ei.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Yb.$number,string:t1.$string,tail:n1.$tail,rest:e1.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Vb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Km.RandomGenerator,pick:Km.RandomGenerator.pick}};var e=function(t){return function(n){throw new Jm.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(a1=Ei.Namespace||(Ei.Namespace={}))});var Xm=ae(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.MapUtil=void 0;var i1;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(i1=Us.MapUtil||(Us.MapUtil={}))});var Zm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var th=ae(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var ah=ae(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var rh=ae(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0})});var oh=ae(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var dh=ae(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var bp=ae(z=>{"use strict";var r1=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Mi=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&r1(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Or=np(),Me=Qm(),s1=Xm();Mi(Zm(),z);Mi(th(),z);Mi(ah(),z);Mi(rh(),z);Mi(oh(),z);Mi(dh(),z);Mi(Ls(),z);function sp(){re("assert")}z.assert=sp;Object.assign(sp,Me.Namespace.assert("assert"));function op(){re("assertType")}z.assertType=op;Object.assign(op,Me.Namespace.assert("assertType"));function Bu(){re("is")}z.is=Bu;Object.assign(Bu,Me.Namespace.assert("is"));function Fu(){re("validate")}z.validate=Fu;Object.assign(Fu,Me.Namespace.validate());function up(){re("assertEquals")}z.assertEquals=up;Object.assign(up,Me.Namespace.assert("assertEquals"));function dp(){re("equals")}z.equals=dp;Object.assign(dp,Me.Namespace.is());function lp(){re("validateEquals")}z.validateEquals=lp;Object.assign(lp,Me.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Or.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Or.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=s1.MapUtil.take(Or.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Or.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function o1(){re("application")}z.application=o1;function pp(){re("assertParse")}z.assertParse=pp;Object.assign(pp,Me.Namespace.assert("assertParse"));function yp(){re("isParse")}z.isParse=yp;Object.assign(yp,Bu);function fp(){re("validateParse")}z.validateParse=fp;Object.assign(fp,Fu);function cp(){re("stringify")}z.stringify=cp;Object.assign(cp,Me.Namespace.stringify("stringify"));function Lu(){re("assertStringify")}z.assertStringify=Lu;Object.assign(Lu,Me.Namespace.assert("assertStringify"));Object.assign(Lu,Me.Namespace.stringify("assertStringify"));function Uu(){re("isStringify")}z.isStringify=Uu;Object.assign(Uu,Me.Namespace.is());Object.assign(Uu,Me.Namespace.stringify("isStringify"));function Vu(){re("validateStringify")}z.validateStringify=Vu;Object.assign(Vu,Me.Namespace.validate());Object.assign(Vu,Me.Namespace.stringify("validateStringify"));function u1(){re("metadata")}z.metadata=u1;function mp(){re("random")}z.random=mp;Object.assign(mp,Me.Namespace.random());function d1(){re("literals")}z.literals=d1;function hp(){re("clone")}z.clone=hp;Object.assign(hp,Me.Namespace.clone("clone"));function ju(){re("assertClone")}z.assertClone=ju;Object.assign(ju,Me.Namespace.assert("assertClone"));Object.assign(ju,Me.Namespace.clone("assertClone"));function Hu(){re("isClone")}z.isClone=Hu;Object.assign(Hu,Me.Namespace.is());Object.assign(Hu,Me.Namespace.clone("isClone"));function qu(){re("validateClone")}z.validateClone=qu;Object.assign(qu,Me.Namespace.validate());Object.assign(qu,Me.Namespace.clone("validateClone"));function xp(){re("prune")}z.prune=xp;Object.assign(xp,Me.Namespace.prune("prune"));function Gu(){re("assertPrune")}z.assertPrune=Gu;Object.assign(Gu,Me.Namespace.assert("assertPrune"));Object.assign(Gu,Me.Namespace.prune("assertPrune"));function zu(){re("isPrune")}z.isPrune=zu;Object.assign(zu,Me.Namespace.is());Object.assign(zu,Me.Namespace.prune("isPrune"));function Wu(){re("validatePrune")}z.validatePrune=Wu;Object.assign(Wu,Me.Namespace.prune("validatePrune"));Object.assign(Wu,Me.Namespace.validate());function lh(){re("createAssert")}z.createAssert=lh;Object.assign(lh,sp);function ph(){re("createAssertType")}z.createAssertType=ph;Object.assign(ph,op);function yh(){re("createIs")}z.createIs=yh;Object.assign(yh,Bu);function fh(){re("createValidate")}z.createValidate=fh;Object.assign(fh,Fu);function ch(){re("createAssertEquals")}z.createAssertEquals=ch;Object.assign(ch,up);function mh(){re("createEquals")}z.createEquals=mh;Object.assign(mh,dp);function hh(){re("createValidateEquals")}z.createValidateEquals=hh;Object.assign(hh,lp);function xh(){re("createIsParse")}z.createIsParse=xh;Object.assign(xh,yp);function bh(){re("createAssertParse")}z.createAssertParse=bh;Object.assign(bh,pp);function gh(){re("createValidateParse")}z.createValidateParse=gh;Object.assign(gh,fp);function Th(){re("createStringify")}z.createStringify=Th;Object.assign(Th,cp);function vh(){re("createAssertStringify")}z.createAssertStringify=vh;Object.assign(vh,Lu);function wh(){re("createIsStringify")}z.createIsStringify=wh;Object.assign(wh,Uu);function _h(){re("createValidateStringify")}z.createValidateStringify=_h;Object.assign(_h,Vu);function kh(){re("createRandom")}z.createRandom=kh;Object.assign(kh,mp);function Ah(){re("createClone")}z.createClone=Ah;Object.assign(Ah,hp);function Eh(){re("createAssertClone")}z.createAssertClone=Eh;Object.assign(Eh,ju);function Mh(){re("createIsClone")}z.createIsClone=Mh;Object.assign(Mh,Hu);function Ih(){re("createValidateClone")}z.createValidateClone=Ih;Object.assign(Ih,qu);function Ch(){re("createPrune")}z.createPrune=Ch;Object.assign(Ch,xp);function Sh(){re("createAssertPrune")}z.createAssertPrune=Sh;Object.assign(Sh,Gu);function Rh(){re("createIsPrune")}z.createIsPrune=Rh;Object.assign(Rh,zu);function Ph(){re("createValidatePrune")}z.createValidatePrune=Ph;Object.assign(Ph,Wu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Dh=ae(Tn=>{"use strict";var Nh=Tn&&Tn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),l1=Tn&&Tn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),p1=Tn&&Tn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&Nh(e,a,t);return l1(e,a),e},y1=Tn&&Tn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Nh(e,a,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var f1=p1(bp());Tn.default=f1;y1(bp(),Tn)});var jl={};Gi(jl,{BaseContract:()=>fr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>mi,FixedNumber:()=>ct,Signer:()=>St,VoidSigner:()=>la,Wallet:()=>on,Wordlist:()=>xn,constants:()=>xt,errors:()=>Wt,getDefaultProvider:()=>ru,logger:()=>Dc,providers:()=>ta,utils:()=>te,version:()=>ou,wordlists:()=>xi});var dy=kn(md());var Yp="logger/5.7.0";var Zp=!1,ey=!1,$s={debug:1,default:2,info:2,warning:3,error:4,off:5},ty=$s.default,hd=null;function i6(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var ny=i6(),xd;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(xd||(xd={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var ay="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();$s[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ty>$s[n])&&console.log.apply(console,t)}debug(...e){this._log(E.levels.DEBUG,e)}info(...e){this._log(E.levels.INFO,e)}warn(...e){this._log(E.levels.WARNING,e)}makeError(e,t,n){if(ey)return this.makeError("censored error",t,{});t||(t=E.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=ay[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,E.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),ny&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ny})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,E.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",E.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return hd||(hd=new E(Yp)),hd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ey=!!e,Zp=!!t}static setLogLevel(e){let t=$s[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ty=t}static from(e){return new E(e)}};E.errors=Wt;E.levels=xd;var iy="bytes/5.7.0";var wt=new E(iy);function sy(a){return!!a.toHexString}function zi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return zi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function ra(a){return ie(a)&&!(a.length%2)||un(a)}function ry(a){return typeof a=="number"&&a==a&&a%1===0}function un(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!ry(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),zi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),sy(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),zi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),zi(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var bd="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=bd[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),sy(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(un(a)){let t="0x";for(let n=0;n>4]+bd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Nt(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Un(a){let e=gd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function gd(a){typeof a!="string"&&(a=W(a)),ie(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Vn(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ra(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ri(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=he(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=he(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=he(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Vr(a){return a=Vn(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Qs="bignumber/5.7.0";var jr=dy.default.BN,sa=new E(Qs),Td={},oy=9007199254740991;function ly(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||un(a))}var uy=!1,F=class{constructor(e,t){e!==Td&&sa.throwError("cannot call constructor directly; use BigNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(ge(this).fromTwos(e))}toTwos(e){return Kt(ge(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(ge(this).add(ge(e)))}sub(e){return Kt(ge(this).sub(ge(e)))}div(e){return F.from(e).isZero()&&dn("division-by-zero","div"),Kt(ge(this).div(ge(e)))}mul(e){return Kt(ge(this).mul(ge(e)))}mod(e){let t=ge(e);return t.isNeg()&&dn("division-by-zero","mod"),Kt(ge(this).umod(t))}pow(e){let t=ge(e);return t.isNeg()&&dn("negative-power","pow"),Kt(ge(this).pow(t))}and(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","and"),Kt(ge(this).and(t))}or(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","or"),Kt(ge(this).or(t))}xor(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&dn("unbound-bitwise-result","xor"),Kt(ge(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&dn("negative-width","mask"),Kt(ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&dn("negative-width","shl"),Kt(ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&dn("negative-width","shr"),Kt(ge(this).shrn(e))}eq(e){return ge(this).eq(ge(e))}lt(e){return ge(this).lt(ge(e))}lte(e){return ge(this).lte(ge(e))}gt(e){return ge(this).gt(ge(e))}gte(e){return ge(this).gte(ge(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ge(this).isZero()}toNumber(){try{return ge(this).toNumber()}catch{dn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return sa.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?uy||(uy=!0,sa.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?sa.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",E.errors.UNEXPECTED_ARGUMENT,{}):sa.throwError("BigNumber.toString does not accept parameters",E.errors.UNEXPECTED_ARGUMENT,{})),ge(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(Td,Hr(e)):e.match(/^-?[0-9]+$/)?new F(Td,Hr(new jr(e))):sa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=oy||e<=-oy)&&dn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(un(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return sa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Hr(a){if(typeof a!="string")return Hr(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&sa.throwArgumentError("invalid hex","value",a),a=Hr(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Hr(a))}function ge(a){let e=F.from(a).toHexString();return e[0]==="-"?new jr("-"+e.substring(3),16):new jr(e.substring(2),16)}function dn(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),sa.throwError(a,E.errors.NUMERIC_FAULT,n)}function vd(a){return new jr(a,36).toString(16)}function wd(a){return new jr(a,16).toString(36)}var jt=new E(Qs),qr={},yy=F.from(0),fy=F.from(-1);function cy(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,E.errors.NUMERIC_FAULT,i)}var Gr="0";for(;Gr.length<256;)Gr+=Gr;function _d(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+Gr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Wi(a,e){e==null&&(e=0);let t=_d(e);a=F.from(a);let n=a.lt(yy);n&&(a=a.mul(fy));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&cy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new oa(qr,t,n,i)}},ct=class{constructor(e,t,n,i){e!==qr&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ct.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ct.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ct.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return ct.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(py.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(py.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ct.from("1"+Gr.substring(0,e),this.format),i=r6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return he(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ct.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ly(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ct.fromString(Wi(e,t),oa.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=oa.from(t),i=ln(e,n.decimals);!n.signed&&i.lt(yy)&&cy("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=he(r,n.width/8));let s=Wi(i,n.decimals);return new ct(qr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=oa.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Wi(i,n.decimals);return new ct(qr,r,s,n)}static from(e,t){if(typeof e=="string")return ct.fromString(e,t);if(un(e))return ct.fromBytes(e,t);try{return ct.fromValue(e,0,t)}catch(n){if(n.code!==E.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},py=ct.from(1),r6=ct.from("0.5");var my="properties/5.7.0";var s6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Xs=new E(my);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function ht(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return s6(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Ki(a,e){(!a||typeof a!="object")&&Xs.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Xs.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var o6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function hy(a){if(a==null||o6[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tmt(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,mt(n))}return e}return Xs.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function mt(a){return u6(a)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var jn="abi/5.7.0";var ve=new E(jn),si={},xy={calldata:!0,memory:!0,storage:!0},d6={calldata:!0,memory:!0};function Ys(a,e){if(a==="bytes"||a==="string"){if(xy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&d6[e])return!0;return(xy[e]||e==="payable")&&ve.throwArgumentError("invalid modifier","name",e),!1}function l6(a,e){let t=a;function n(o){ve.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Te.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===Te.full?", ":",")+")"):t+=this.type,e!==Te.sighash&&(this.indexed===!0&&(t+=" indexed"),e===Te.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?yt.fromString(e,t):yt.fromObject(e)}static fromObject(e){return yt.isParamType(e)?e:new yt(si,{name:e.name||null,type:Ji(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function n(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(l6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function zr(a,e){return f6(a).map(t=>yt.fromString(t,e))}var qt=class{constructor(e,t){e!==si&&ve.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Zs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return ve.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):ve.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==Te.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Te.full?", ":",")+") ",e!==Te.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&ve.throwArgumentError("invalid event object","value",e);let t={name:Wr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(yt.fromObject):[],type:"event"};return new Ht(si,t)}static fromString(e){let t=e.match(Kr);t||ve.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:ve.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:zr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function gy(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&ve.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||ve.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function Ty(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function vy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&ve.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&ve.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&ve.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ve.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&ve.throwArgumentError("unable to determine stateMutability","value",a),e}var Dt=class extends qt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Te.sighash&&ve.throwError("cannot format a constructor for sighash",E.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===Te.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&ve.throwArgumentError("invalid constructor object","value",e);let t=vy(e);t.constant&&ve.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(yt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(si,n)}static fromString(e){let t={type:"constructor"};e=gy(e,t);let n=e.match(Kr);return(!n||n[1].trim()!=="constructor")&&ve.throwArgumentError("invalid constructor string","value",e),t.inputs=zr(n[2].trim(),!1),Ty(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==Te.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Te.full?", ":",")+") ",e!==Te.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&ve.throwArgumentError("invalid function object","value",e);let t=vy(e),n={type:e.type,name:Wr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(yt.fromObject):[],outputs:e.outputs?e.outputs.map(yt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(si,n)}static fromString(e){let t={type:"function"};e=gy(e,t);let n=e.split(" returns ");n.length>2&&ve.throwArgumentError("invalid function string","value",e);let i=n[0].match(Kr);if(i||ve.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Wr(t.name),t.inputs=zr(i[2],!1),Ty(i[3].trim(),t),n.length>1){let r=n[1].match(Kr);(r[1].trim()!=""||r[3].trim()!="")&&ve.throwArgumentError("unexpected tokens","value",e),t.outputs=zr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function by(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ve.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=Te.sighash),Te[e]||ve.throwArgumentError("invalid format type","format",e),e===Te.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==Te.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Te.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&ve.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Wr(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return by(new tn(si,t))}static fromString(e){let t={type:"error"},n=e.match(Kr);return n||ve.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Wr(t.name),t.inputs=zr(n[2],!1),by(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ji(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var y6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Wr(a){return(!a||!a.match(y6))&&ve.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Kr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function f6(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&kd.throwError("value out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ui=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ui.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:kd.throwError("data out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new ui(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var _y=kn(wy());function fe(a){return"0x"+_y.default.keccak_256(j(a))}var to={};Gi(to,{decode:()=>Jr,encode:()=>ua});var ky="rlp/5.7.0";var Hn=new E(ky);function Ay(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function Ey(a,e,t){let n=0;for(let i=0;ie+1+n&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Cy(a,e){if(a.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let n=Ey(a,e+1,t);return e+1+t+n>a.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),My(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),My(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let n=Ey(a,e+1,t);e+1+t+n>a.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function Jr(a){let e=j(a),t=Cy(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",a),t.result}var Sy="address/5.7.0";var Ia=new E(Sy);function Ry(a){ie(a,20)||Ia.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var c6=9007199254740991;function m6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var Ad={};for(let a=0;a<10;a++)Ad[String(a)]=String(a);for(let a=0;a<26;a++)Ad[String.fromCharCode(65+a)]=String(10+a);var Py=Math.floor(m6(c6));function Ny(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>Ad[n]).join("");for(;e.length>=Py;){let n=e.substring(0,Py);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Ia.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=Ry(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ia.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==Ny(a)&&Ia.throwArgumentError("bad icap checksum","address",a),e=vd(a.substring(4));e.length<40;)e="0"+e;e=Ry("0x"+e)}else Ia.throwArgumentError("invalid address","address",a);return e}function Dy(a){try{return ce(a),!0}catch{}return!1}function Oy(a){let e=wd(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Ny("XE00"+e)+e}function di(a){let e=null;try{e=ce(a.from)}catch{Ia.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(ua([e,t])),12))}function By(a,e,t){return Nt(e)!==32&&Ia.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ia.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var no=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(he(e.readValue().toHexString(),20))}};var ao=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Qi=new E(jn);function Ed(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Qi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Qi.throwError("cannot encode object for signature with duplicate names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Qi.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Qi.throwArgumentError("types/value length mismatch","tuple",t);let i=new oi(a.wordSize),r=new oi(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function Md(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===E.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===E.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var io=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Qi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;ilo,EtherSymbol:()=>jy,HashZero:()=>Yi,MaxInt256:()=>Vy,MaxUint256:()=>fo,MinInt256:()=>Uy,NegativeOne:()=>po,One:()=>yo,Two:()=>Fy,WeiPerEther:()=>Ly,Zero:()=>Xi});var lo="0x0000000000000000000000000000000000000000";var po=F.from(-1),Xi=F.from(0),yo=F.from(1),Fy=F.from(2),Ly=F.from("1000000000000000000"),fo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Uy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Vy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yi="0x0000000000000000000000000000000000000000000000000000000000000000";var jy="\u039E";var co=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=fo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(yo).mul(po)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Xi)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Hy="strings/5.7.0";var qy=new E(Hy),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Bt||(Bt={}));function h6(a,e,t,n,i){return qy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function Gy(a,e,t,n,i){if(a===Bt.BAD_PREFIX||a===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Bt.OVERRUN?t.length-e-1:0}function x6(a,e,t,n,i){return a===Bt.OVERLONG?(n.push(i),0):(n.push(65533),Gy(a,e,t,n,i))}var mo=Object.freeze({error:h6,ignore:Gy,replace:x6});function Cd(a,e){e==null&&(e=mo.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Bt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Bt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Bt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function we(a,e=Gt.current){e!=Gt.current&&(qy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function Id(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function Sd(a,e){return'"'+Cd(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Id(t):(t-=65536,Id((t>>10&1023)+55296)+Id((t&1023)+56320))}).join("")+'"'}function ho(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return ho(Cd(a,e))}function Ca(a,e=Gt.current){return Cd(we(a,e))}function Rd(a){let e=we(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Yi]).slice(0,32))}function Pd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function b6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function zy(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Dd(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var g6=zy("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),T6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),v6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],w6=Nd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),_6=Nd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),k6=Nd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",b6),A6=zy("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function E6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function M6(a){return!!Dd(a,g6)}function I6(a){let e=Dd(a,v6);if(e)return[a+e.s];let t=w6[a];if(t)return t;let n=_6[a];if(n)return[a+n[0]];let i=k6[a];return i||null}function C6(a){return!!Dd(a,A6)}function Od(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ca(a);e=E6(e.map(n=>{if(T6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=I6(n);return i||[n]})),e=Ca(ho(e),Gt.NFKC),e.forEach(n=>{if(C6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(M6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ho(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var xo=class extends $r{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,we(t))}decode(e){return Jt(super.decode(e))}};var li=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return Ed(e,this.coders,t)}decode(e){return e.coerce(this.name,Md(e,this.coders))}};var bo=new E(jn),S6=new RegExp(/^bytes([0-9]*)$/),R6=new RegExp(/^(u?int)([0-9]*)$/),Zi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new no(e.name);case"bool":return new ro(e.name);case"string":return new xo(e.name);case"bytes":return new so(e.name);case"array":return new io(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new li((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new uo(e.name)}let t=e.type.match(R6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&bo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new co(n/8,t[1]==="int",e.name)}if(t=e.type.match(S6),t){let n=parseInt(t[1]);return(n===0||n>32)&&bo.throwArgumentError("invalid bytes length","param",e),new oo(n,e.name)}return bo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ui(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new oi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(yt.from(i)));return new li(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&bo.throwError("types/values length mismatch",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(yt.from(s))),i=new li(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(yt.from(s)));return new li(i,"_").decode(this._getReader(j(t),n))}},Qr=new Zi;function nn(a){return fe(we(a))}var go="hash/5.7.0";var Bd={};Gi(Bd,{decode:()=>er,encode:()=>tr});function er(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function P6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let M=n-4;return O.map(J=>{switch(J-M){case 3:return M+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return M+256+(a[o++]<<8|a[o++]);case 1:return M+a[o++];default:return J-1}})}function D6(a){let e=0;return()=>a[e++]}function Jy(a){return D6(N6(a))}function O6(a){return a&1?~a>>1:a>>1}function B6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function $y(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(U6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(V6(t,a))}return P6(Ky(e))}function L6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Qy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function U6(a,e){let t=1+e(),n=e(),i=L6(e),r=Qy(i.length,1+a,e);return Ky(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function V6(a,e){let t=1+e();return Qy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function Xy(a){let e=Xr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Xr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Yy(){return Jy(er("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var To=Yy(),j6=new Set(Xr(To)),H6=new Set(Xr(To)),q6=$y(To),G6=Xy(To),Zy=45,e0=95;function t0(a){return Ca(a)}function z6(a){return a.filter(e=>e!=65039)}function n0(a){for(let e of a.split(".")){let t=t0(e);try{for(let n=t.lastIndexOf(e0)-1;n>=0;n--)if(t[n]!==e0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Zy&&t[3]===Zy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function a0(a){return n0(W6(a,z6))}function W6(a,e){let t=t0(a).reverse(),n=[];for(;t.length;){let i=J6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(j6.has(r)){n.push(r);continue}if(H6.has(r))continue;let s=q6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return n0(K6(String.fromCodePoint(...n)))}function K6(a){return a.normalize("NFC")}function J6(a,e){var t;let n=G6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var $6=new E(go),r0=new Uint8Array(32);r0.fill(0);function i0(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Fd(a){let e=we(a0(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(i0(e.slice(n))),t}function Ld(a){try{return Fd(a).length!==0}catch{}return!1}function Sa(a){typeof a!="string"&&$6.throwArgumentError("invalid ENS name; not a string","name",a);let e=r0,t=Fd(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Yr(a){return W(ye(Fd(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var s0=`Ethereum Signed Message: +`;function nr(a){return typeof a=="string"&&(a=we(a)),fe(ye([we(s0),we(String(a.length)),a]))}var Q6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bt=new E(go),l0=new Uint8Array(32);l0.fill(0);var X6=F.from(-1),p0=F.from(0),y0=F.from(1),Y6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Z6(a){let e=j(a),t=e.length%32;return t?kt([e,l0.slice(t)]):W(e)}var e2=he(y0.toHexString(),32),t2=he(p0.toHexString(),32),o0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ud=["name","version","chainId","verifyingContract","salt"];function u0(a){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var n2={name:u0("name"),version:u0("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return bt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Vd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&bt.throwArgumentError("invalid numeric width","type",a);let i=Y6.mask(t?n-1:n),r=t?i.add(y0).mul(X6):p0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),he(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&bt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&bt.throwArgumentError(`invalid length for ${a}`,"value",n),Z6(n)}}}switch(a){case"address":return function(e){return he(ce(e),32)};case"bool":return function(e){return e?e2:t2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function d0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&bt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Vd(f)&&(n[f]||bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?bt.throwArgumentError("missing primary type","types",e):r.length>1&&bt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=d0(o,e[o])+l.map(p=>d0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Vd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return bt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||bt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Vd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):bt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new gt(e)}static getPrimaryType(e){return gt.from(e).primaryType}static hashStruct(e,t,n){return gt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=o0[n];i||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Ud.indexOf(n.name)-Ud.indexOf(i.name)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",gt.hashDomain(e),gt.from(t).hash(n)])}static hash(e,t,n){return fe(gt.encode(e,t,n))}static resolveNames(e,t,n,i){return Q6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=gt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){gt.hashDomain(e);let i={},r=[];Ud.forEach(l=>{let p=e[l];p!=null&&(i[l]=n2[l](p),r.push({name:l,type:o0[l]}))});let s=gt.from(t),o=_e(t);return o.EIP712Domain?bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(jn);var ar=class extends en{},ir=class extends en{},jd=class extends en{},da=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},a2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function f0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ra=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ht(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Tt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){Tt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=Te.full),e===Te.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===Te.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Qr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ot.fromString(e).format()];return t||Tt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];Tt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||Tt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}Tt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ot.fromString(e).format()];return t||Tt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ht(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ht(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=a2[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return Tt.throwError("call revert exception"+r,E.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),E.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),he(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&&Tt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?Tt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Tt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new da({_isIndexed:!0,hash:null});else if(s[_])p[_]=new da({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw f0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw f0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ir({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ar({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new jd({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var c0="abstract-provider/5.7.0";var i2=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},r2=new E(c0),vo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){r2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return i2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var m0="abstract-signer/5.7.0";var An=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},pn=new E(m0),s2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],o2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){pn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)s2.indexOf(n)===-1&&pn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>An(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&pn.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&pn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&pn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):pn.throwError("failed to get consistent fee data",E.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(o2.indexOf(i.code)>=0)throw i;return pn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&pn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||pn.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},la=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{pn.throwError(e,E.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new la(this.address,e)}};var pe=kn(md()),$n=kn(Xd());function yr(a,e,t){return t={path:e,exports:{},require:function(n,i){return S5(n,i??t.path)}},a(t,t.exports),t.exports}function S5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var tl=Z0;function Z0(a,e){if(!a)throw new Error(e||"Assertion failed")}Z0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=yr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),Eo=an.getNAF,R5=an.getJSF,Mo=an.assert;function Da(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var yi=Da;Da.prototype.point=function(){throw new Error("Not implemented")};Da.prototype.validate=function(){throw new Error("Not implemented")};Da.prototype._fixedNafMul=function(e,t){Mo(e.precomputed);var n=e._getDoubles(),i=Eo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];Mo(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Da.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Eo(n[v],s[v],this._bitLength),l[S]=Eo(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=R5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};fn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};cn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Mt.prototype.isInfinity=function(){return this.inf};Mt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Mt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Mt.prototype.getX=function(){return this.x.fromRed()};Mt.prototype.getY=function(){return this.y.fromRed()};Mt.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Mt.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Mt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Mt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Mt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(a,e,t,n){yi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}nl(Pt,yi.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ko=yr(function(a,e){"use strict";var t=e;t.base=yi,t.short=N5,t.mont=null,t.edwards=null}),Ao=yr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new ko.short(o):o.type==="edwards"?this.curve=new ko.edwards(o):this.curve=new ko.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:$n.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:$n.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:$n.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:$n.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:$n.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$n.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:$n.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Na(a){if(!(this instanceof Na))return new Na(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(a.entropy,a.entropyEnc||"hex"),t=Cn.toArray(a.nonce,a.nonceEnc||"hex"),n=Cn.toArray(a.pers,a.persEnc||"hex");tl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var ef=Na;Na.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Na.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Cn.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var D5=an.assert;function Io(a,e){if(a instanceof Io)return a;this._importDER(a,e)||(D5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var Co=Io;function O5(){this.place=0}function Yd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function Y0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}Io.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Y0(t),n=Y0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Zd(i,t.length),i=i.concat(t),i.push(2),Zd(i,n.length);var r=i.concat(n),s=[48];return Zd(s,r.length),s=s.concat(r),an.encode(s,e)};var B5=function(){throw new Error("unsupported")},tf=an.assert;function yn(a){if(!(this instanceof yn))return new yn(a);typeof a=="string"&&(tf(Object.prototype.hasOwnProperty.call(Ao,a),"Unknown curve "+a),a=Ao[a]),a instanceof Ao.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var F5=yn;yn.prototype.keyPair=function(e){return new al(this,e)};yn.prototype.keyFromPrivate=function(e,t){return al.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return al.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new ef({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||B5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};yn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};yn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new ef({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Co({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new Co(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(a,e,t,n){tf((3&t)===t,"The recovery param is more than two bits"),e=new Co(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};yn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new Co(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var L5=yr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=ko,t.curves=Ao,t.ec=F5,t.eddsa=null}),nf=L5.ec;var af="signing-key/5.7.0";var rl=new E(af),il=null;function Qn(){return il||(il=new nf("secp256k1")),il}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&rl.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Qn().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Qn().keyFromPublic(j(this.publicKey)),n=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&rl.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Vn({recoveryParam:i.recoveryParam,r:he("0x"+i.r.toString(16),32),s:he("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Qn().keyFromPrivate(j(this.privateKey)),n=Qn().keyFromPublic(j(ts(e)));return he("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function So(a,e){let t=Vn(e),n={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function ts(a,e){let t=j(a);if(t.length===32){let n=new mn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return rl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var rf="transactions/5.7.0";var Ut=new E(rf),Ro;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Ro||(Ro={}));function ol(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?Xi:F.from(a)}var U5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],V5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(a){let e=ts(a);return ce(Ie(fe(Ie(e,1)),12))}function fi(a,e){return hn(So(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function sl(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),sl(t[0],t[1])):sl(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return sl(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function sf(a){return sn(a).map(e=>[e.address,e.storageKeys])}function of(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",sf(a.accessList||[])];if(e){let n=Vn(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",ua(t)])}function uf(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",sf(a.accessList||[])];if(e){let n=Vn(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",ua(t)])}function j5(a,e){Ki(a,V5);let t=[];U5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!ra(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return ua(t);let i=Vn(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),ua(t)}function ns(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),j5(a,e);switch(a.type){case 1:return uf(a,e);case 2:return of(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function df(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=he(e[1],32),a.s=he(e[2],32);try{let n=fe(t(a));a.from=fi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function H5(a){let e=Jr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:ol(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),df(i,e.slice(9),of)),i}function q5(a){let e=Jr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:ol(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),df(t,e.slice(8),uf)),t}function G5(a){let e=Jr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:ol(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=he(e[7],32),t.s=he(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(ua(i));try{t.from=fi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function Po(a){let e=j(a);if(e[0]>127)return G5(e);switch(e[0]){case 1:return q5(e);case 2:return H5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var lf="contracts/5.7.0";var Oa=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new E(lf),z5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function No(a,e){return Oa(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function as(a,e,t){return Oa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>as(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield No(a,e):t.type==="tuple"?yield as(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>as(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Bo(a,e,t){return Oa(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:No(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Oa(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=No(a.provider,n.from));let i=yield Ce({args:as(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,E.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function W5(a,e){return function(...t){return Bo(a,e,t)}}function K5(a,e){let t=a.signer||a.provider;return function(...n){return Oa(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Bo(a,e,n);return yield t.estimateGas(i)})}}function yf(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=mt(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function ff(a,e,t){let n=a.signer||a.provider;return function(...i){return Oa(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Bo(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===E.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function J5(a,e){return function(...t){return Oa(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Bo(a,e,t),i=yield a.signer.sendTransaction(n);return yf(a,i),i})}}function pf(a,e,t){return e.constant?ff(a,e,t):J5(a,e)}function cf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var ci=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},ul=class extends ci{constructor(){super("error",null)}},Do=class extends ci{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(cf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=$i(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Oo=class extends ci{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},fr=class{constructor(e,t,n){B(this,"interface",ht(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",No(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",E.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,pf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,pf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,ff(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,W5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,K5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return di(e)}static getInterface(e){return Ra.isInterface(e)?e:new Ra(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",E.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new la(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return da.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new ul);if(e==="event")return this._normalizeRunningEvent(new ci("event",null));if(e==="*")return this._normalizeRunningEvent(new Oo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Do(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Do(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new ci(cf(t),t))}return this._normalizeRunningEvent(new Oo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=mt(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends fr{},mi=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:un(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",ht(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!z5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Oa(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield as(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return yf(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",E.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return di(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Fo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(ma(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return gc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,he(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(ma,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~ha));let n=new Uint8Array(37);if(e&ha){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(mi(Xn.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Lo(F.from(a).add(this.privateKey).mod(Yb)):d=new mn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(ma,o,d,this.fingerprint,Lo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=ha)throw new Error("invalid path index - "+a);n=n._derive(ha+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=ha)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(mi(Xn.sha512,Zb,n));return new Ct(ma,Lo(r.slice(0,32)),null,"0x00000000",Lo(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=yd(n),e=xr(ba(e,n),n),Ct._fromSeed(cd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fi.decode(e);(t.length!==82||gc(t.slice(0,78))!==e)&&ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(ma,null,W(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(ma,W(o.slice(1)),null,r,s,a,n,null)}return ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function cd(i,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return hr(ve(i,Gt.NFKD),t,2048,64,"sha512")}function ba(i,e){e=yd(e),ss.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=Tc(s);if((V(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,a/8))}function xr(i,e){if(e=yd(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&e5(8-n)),n+=3);let r=i.length/4,a=V(Xt(i))[0]&Tc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function vc(i,e){try{return ba(i,e),!0}catch{}return!1}function wc(i){return(typeof i!="number"||i<0||i>=ha||i%1)&&ss.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var _c="random/5.7.0";var fd=new M(_c);function t5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Ac=t5(),Uo=Ac.crypto||Ac.msCrypto;(!Uo||!Uo.getRandomValues)&&(fd.warn("WARNING: Missing strong random number source"),Uo={getRandomValues:function(i){return fd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(i){(i<=0||i>1024||i%1||i!=i)&&fd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return Uo.getRandomValues(e),V(e)}function os(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var bd=An(hd());var jo="json-wallets/5.7.0";function bi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function xa(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),q=L.slice(32,64),E=new xi.default.Counter(b),J=new xi.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:Mc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=Yn(16),N=new xi.default.Counter(R),H=new xi.default.ModeOfOperation.ctr(q,N),se=V(H.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+xa(C.getUTCMonth()+1,2)+"-"+xa(C.getUTCDate(),2)+"T"+xa(C.getUTCHours(),2)+"-"+xa(C.getUTCMinutes(),2)+"-"+xa(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Oc(i,e,t){if(Vo(i)){t&&t(0);let n=gd(i,e);return t&&t(1),Promise.resolve(n)}return qo(i)?Dc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bc(i,e){if(Vo(i))return gd(i,e);if(qo(i))return Nc(i,e);throw new Error("invalid JSON wallet")}var Fc="wallet/5.7.0";var Lc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ga=new M(Fc);function s5(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function o5(i){let e=i.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),s5(e)){let n=new mn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",hn(this.publicKey)),this.address!==fe(e.address)&&ga.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),o5(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||hi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);hn(s.privateKey)!==this.address&&ga.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&ga.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new mn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&ga.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&ga.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(ns(t)));return ns(t,n)})}signMessage(e){return Lc(this,void 0,void 0,function*(){return ja(this._signingKey().signDigest(na(e)))})}_signTypedData(e,t,n){return Lc(this,void 0,void 0,function*(){let r=yield xt.resolveNames(e,t,n,a=>(this.provider==null&&ga.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return ja(this._signingKey().signDigest(xt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),Ad(this,e,t,n)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=V(Ee(ce(ye([t,e.extraEntropy])),0,16)));let n=xr(t,e.locale);return on.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Oc(e,t,n).then(r=>new on(r))}static fromEncryptedJsonSync(e,t){return new on(Bc(e,t))}static fromMnemonic(e,t,n){return t||(t=hi),new on(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Uc(i,e){return cr(na(i),e)}function jc(i,e,t,n){return cr(xt.hash(i,e,t),n)}var ti={};Gr(ti,{AlchemyProvider:()=>ka,AlchemyWebSocketProvider:()=>gs,AnkrProvider:()=>Ts,BaseProvider:()=>ei,CloudflareProvider:()=>vs,EtherscanProvider:()=>ws,FallbackProvider:()=>As,Formatter:()=>Y,InfuraProvider:()=>Ea,InfuraWebSocketProvider:()=>Ms,IpcProvider:()=>Fd,JsonRpcBatchProvider:()=>ru,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>_a,NodesmithProvider:()=>Es,PocketProvider:()=>Cs,Provider:()=>$t,Resolver:()=>wa,StaticJsonRpcProvider:()=>xs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Is,WebSocketProvider:()=>vi,getDefaultProvider:()=>au,getNetwork:()=>ls,isCommunityResourcable:()=>Ed,isCommunityResource:()=>ys,showThrottleMessage:()=>Zn});var Vc="networks/5.7.1";var qc=new M(Vc);function u5(i){return i&&typeof i.renetwork=="function"}function gi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return gi(t)},e}function zo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return zo(i,n)},t}var Hc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:gi("homestead")},Gc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:gi("ropsten")},zc={chainId:63,name:"classicMordor",_defaultProvider:zo("https://www.ethercluster.com/mordor","classicMordor")},Go={unspecified:{chainId:0,name:"unspecified"},homestead:Hc,mainnet:Hc,morden:{chainId:2,name:"morden"},ropsten:Gc,testnet:Gc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:gi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:gi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:gi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:gi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:zo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zc,classicTestnet:zc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:zo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:gi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:gi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ls(i){if(i==null)return null;if(typeof i=="number"){for(let n in Go){let r=Go[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=Go[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Go[i.name];if(!e)return typeof i.chainId!="number"&&qc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&qc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(u5(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Wc="web/5.7.1";var l5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function Kc(i,e){return l5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var d5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Sn=new M(Wc);function Jc(i){return new Promise(e=>{setTimeout(e,i)})}function Bi(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ai(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return W(i)}return i}function p5(i){return ve(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function kd(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Sn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+ta(ve(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ea(_[3]):p5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Bi(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Bi(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return d5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Bi(q,U.headers?U.headers["content-type"]:null),requestBody:Bi(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(q,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=ve(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return kd(i,r,n)}function Pn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var Rd=An(Yc());var Ae="providers/5.7.2";var ps=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(d,null),transactionIndex:Y.allowNull(d,null),confirmations:Y.allowNull(d,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:d,data:a,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(d),creates:Y.allowNull(t,null),raw:Y.allowNull(a)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(d),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(c),type:Y.allowNull(d),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:Y.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:d,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(a),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:Y.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(d),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:a,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(r,void 0),toBlock:Y.allowNull(r,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(d),blockHash:Y.allowNull(s),transactionIndex:d,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(a,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():ps.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ee(e,12));return t===lo?null:t}contractAddress(e){return lr(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?ps.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return he(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=Y.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Po(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ps.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ps.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ps.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function Ed(i){return i&&typeof i.isCommunityResource=="function"}function ys(i){return Ed(i)&&i.isCommunityResource()}var Zc=!1;function Zn(){Zc||(Zc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},be=new M(Ae),g5=10;function ef(i){return i==null?"null":(Nt(i)!==32&&be.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function tf(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[ef(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return ef(e)}).join("&")}function T5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function va(i){if(typeof i=="string"){if(i=i.toLowerCase(),Nt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+tf(i);if(vo.isForkEvent(i))throw be.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+tf(i.topics||[])}throw new Error("invalid event - "+i)}function cs(){return new Date().getTime()}function nf(i){return new Promise(e=>{setTimeout(e,i)})}var v5=["block","network","pending","poll"],Pd=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=T5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||v5.indexOf(this.tag)>=0}},w5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Cd(i){return he(F.from(i).toHexString(),32)}function rf(i){return fi.encode(ye([i,Ee(Xt(Xt(i)),0,4)]))}var of=new RegExp("^(ipfs)://(.*)$","i"),af=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),of,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $o(i,e){try{return Jt(fs(i,e))}catch{}return null}function fs(i,e){if(i==="0x")return null;let t=F.from(Ee(i,e,e+32)).toNumber(),n=F.from(Ee(i,t,t+32)).toNumber();return Ee(i,t+32,t+32+n)}function Id(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):be.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function sf(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function _5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function uf(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Si(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",uf([Ya(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&be.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=fs(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?fs(n,0):null})}_getAddress(e,t){let n=w5[String(e)];if(n==null&&be.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return rf(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return rf(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=Rd.default.toWords(r.slice(2));return o.unshift(s),Rd.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Yr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",Cd(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&be.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return be.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Cd(64),Cd(t.length),t]),t.length%32!==0&&(t=ye([t,he("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Sd=null,A5=1,ei=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):be.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||be.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Sd==null&&(Sd=new Y),Sd}static getNetwork(e){return ls(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Rn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return be.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return be.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(cs()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=cs(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=cs();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=A5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)be.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",be.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return be.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield nf(0),this._network;let n=be.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=cs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nf(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(be.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return be.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return be.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return be.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return W(r)}catch(a){return be.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Un(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return be.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&be.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&be.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=g5&&be.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Nt(a)%32===4)try{let s=Ee(a,4),o=Ee(s,0,32);F.from(o).eq(r)||be.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ee(s,32,64)).toNumber(),c=F.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&be.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new wa(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||be.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Si(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&be.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=$o(yield this.call({to:n,data:"0x691f3431"+Si(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new wa(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=$o(yield this.call({to:s,data:"0x691f3431"+Si(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return be.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new Pd(va(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=va(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=va(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=va(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=va(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=va(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var Ti=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new M(Ae),k5=["call","estimateGas"];function hs(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=hs(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return hs(JSON.parse(i),e)}catch{}return null}function df(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=hs(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=hs(e.body,!1);a==null&&(a=hs(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),k5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function lf(i){return new Promise(function(e){setTimeout(e,i)})}function M5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function ms(i){return i&&i.toLowerCase()}var Nd={},_a=class extends St{constructor(e,t,n){if(super(),e!==Nd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Dd(Nd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Ti(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),df("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ti(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>Ti(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return Ti(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return Ti(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return Ti(this,void 0,void 0,function*(){let r=yield xt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(xt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return Ti(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Dd=class extends _a{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},E5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends ei{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ti(this,void 0,void 0,function*(){yield lf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _a(Nd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ft(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Rn(this.connection,JSON.stringify(n),M5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ms(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ms(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ms(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ms(t.address),he(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ms(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return Ti(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return df(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return lf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(E5);if(t)for(let a in t)t[a]&&(n[a]=!0);Kr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Un(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var Aa=null;try{if(Aa=WebSocket,Aa==null)throw new Error("inject please")}catch{let e=new M(Ae);Aa=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Od=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Qo=new M(Ae),C5=1,vi=class extends Yt{constructor(e,t){t==="any"&&Qo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Aa(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Qo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Qo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Od(this,void 0,void 0,function*(){return null})}set polling(e){!e||Qo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=C5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Od(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return Od(this,void 0,void 0,function*(){this.websocket.readyState===Aa.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var I5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},bs=new M(Ae),xs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return I5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||bs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends xs{constructor(e,t){bs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){bs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return bs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return bs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var pf=new M(Ae),Xo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",gs=class extends vi{constructor(e,t){let n=new ka(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Xo}},ka=class extends It{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){return e==null?Xo:(e&&typeof e!="string"&&pf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:pf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===Xo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Xo}};var S5=new M(Ae),Yo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function R5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return S5.throwArgumentError("unsupported network","name",i)}var Ts=class extends It{isCommunityResource(){return this.apiKey===Yo}static getApiKey(e){return e??Yo}static getUrl(e,t){t==null&&(t=Yo);let n={allowGzip:!0,url:"https://"+R5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Yo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var P5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},yf=new M(Ae),vs=class extends It{static getApiKey(e){return e!=null&&yf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:yf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return P5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Zo=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Fi=new M(Ae);function cf(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Un(W(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function N5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function ff(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function mf(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Bd(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;Fi.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Fi.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Fi.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Fi.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Fi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var ws=class extends ei{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Fi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Zo(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?ff:N5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Rn(o,d,s||ff);return this.emit("debug",{action:"response",request:r,response:ft(p),provider:this}),p})}detectNetwork(){return Zo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Zo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Bd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=cf(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Bd("call",a,t.transaction)}}case"estimateGas":{let r=cf(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Bd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=mf(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=mf(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Fi.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Fi.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var nu=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},gr=new M(Ae);function eu(){return new Date().getTime()}function hf(i){let e=null;for(let t=0;te?null:(n+r)/2}function Ma(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Ma(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Ma(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var D5=1;function xf(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var O5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],B5=["address","args","errorArgs","errorSignature","method","transaction"];function tu(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function F5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function L5(i,e,t){let n=Ma;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=bf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return bf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Ma(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Ma(r))}:n=function(r){return r==null?null:Ma(r)};break;default:throw new Error("unknown method: "+e)}return F5(n,i.quorum)}function _s(i,e){return nu(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function U5(i,e,t,n){return nu(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield _s(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield _s(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield _s(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield _s(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield _s(i,e)),r.getLogs(a)}}return gr.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var As=class extends ei{constructor(e,t){e.length===0&&gr.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=ys(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=ys(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&gr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&gr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=hf(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return nu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return hf(e)})}perform(e,t){return nu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=eu(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=U5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:ft(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:ft(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,null),request:{method:e,params:ft(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xf(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return O5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};B5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),gr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),gr.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>tu(d)),provider:this})})}};var Fd=null;var iu=new M(Ae),ks="84842078b09946638c03157f83405213",Ms=class extends vi{constructor(e,t){let n=new Ea(e,t),r=n.connection;r.password&&iu.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ks}},Ea=class extends It{static getWebSocketProvider(e,t){return new Ms(e,t)}static getApiKey(e){let t={apiKey:ks,projectId:ks,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(iu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),iu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:iu.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===ks&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===ks}};var ru=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ft(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Ld=new M(Ae),j5="ETHERS_JS_SHARED",Es=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ld.throwArgumentError("invalid apiKey","apiKey",e),e||j5}static getUrl(e,t){Ld.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ld.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var gf=new M(Ae),Tf="62e1ad51b37b8e00394bda3b",Cs=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Tf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:gf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:gf.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===Tf}};var vf=new M(Ae),V5=1;function wf(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:V5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ft(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function q5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ft(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Is=class extends Yt{constructor(e,t){e==null&&vf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=q5(e)):e.sendAsync?r=wf(e,e.sendAsync.bind(e)):e.send?r=wf(e,e.send.bind(e)):vf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var _f=new M(Ae);function au(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new vi(i);default:_f.throwArgumentError("unsupported URL scheme","network",i)}}let t=ls(i);return(!t||!t._defaultProvider)&&_f.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:As,AlchemyProvider:ka,AnkrProvider:Ts,CloudflareProvider:vs,EtherscanProvider:ws,InfuraProvider:Ea,JsonRpcProvider:Yt,NodesmithProvider:Es,PocketProvider:Cs,Web3Provider:Is,IpcProvider:null},e)}var te={};Gr(te,{AbiCoder:()=>Zr,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>qt,FormatTypes:()=>ge,Fragment:()=>Ht,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>li,Interface:()=>Ri,LogDescription:()=>ia,Logger:()=>M,ParamType:()=>pt,RLP:()=>to,SigningKey:()=>mn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>ra,TransactionTypes:()=>Ro,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>mo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>xt,_fetchData:()=>kd,_toEscapedUtf8String:()=>Sl,accessListify:()=>sn,arrayify:()=>V,base58:()=>fi,base64:()=>Bl,checkProperties:()=>Kr,checkResultErrors:()=>$r,commify:()=>Rf,computeAddress:()=>hn,computeHmac:()=>mi,computePublicKey:()=>ts,concat:()=>ye,deepCopy:()=>ft,defaultAbiCoder:()=>Qa,defaultPath:()=>hi,defineReadOnly:()=>B,dnsEncode:()=>Ya,entropyToMnemonic:()=>xr,fetchJson:()=>Rn,formatBytes32String:()=>Rl,formatEther:()=>Pf,formatUnits:()=>Ud,getAccountPath:()=>wc,getAddress:()=>fe,getContractAddress:()=>lr,getCreate2Address:()=>B0,getIcapAddress:()=>O0,getJsonWalletAddress:()=>Td,getStatic:()=>mt,hashMessage:()=>na,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ee,hexStripZeros:()=>gl,hexValue:()=>Un,hexZeroPad:()=>he,hexlify:()=>W,id:()=>nn,isAddress:()=>D0,isBytes:()=>un,isBytesLike:()=>ai,isHexString:()=>re,isValidMnemonic:()=>vc,isValidName:()=>Ll,joinSignature:()=>ja,keccak256:()=>ce,mnemonicToEntropy:()=>ba,mnemonicToSeed:()=>cd,namehash:()=>Si,nameprep:()=>Ol,parseBytes32String:()=>Pl,parseEther:()=>Nf,parseTransaction:()=>Po,parseUnits:()=>jd,poll:()=>Pn,randomBytes:()=>Yn,recoverAddress:()=>cr,recoverPublicKey:()=>So,resolveProperties:()=>Ce,ripemd160:()=>rs,serializeTransaction:()=>ns,sha256:()=>Xt,sha512:()=>ld,shallowCopy:()=>we,shuffled:()=>os,solidityKeccak256:()=>Mf,solidityPack:()=>su,soliditySha256:()=>Ef,splitSignature:()=>jn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ii,toUtf8String:()=>Jt,verifyMessage:()=>Uc,verifyTypedData:()=>jc,zeroPad:()=>ar});var Af="solidity/5.7.0";var H5=new RegExp("^bytes([0-9]+)$"),G5=new RegExp("^(u?int)([0-9]*)$"),z5=new RegExp("^(.*)\\[([0-9]*)\\]$"),W5="0000000000000000000000000000000000000000000000000000000000000000",Ca=new M(Af);function kf(i,e,t){switch(i){case"address":return t?ar(e,32):V(e);case"string":return ve(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?ar(e,32):V(e)}let n=i.match(G5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ca.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),ar(e,r/8)}if(n=i.match(H5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ca.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ca.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+W5).substring(0,66)):e}if(n=i.match(z5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ca.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(kf(r,o,!0))}),ye(s)}return Ca.throwArgumentError("invalid type","type",i)}function su(i,e){i.length!=e.length&&Ca.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(kf(n,e[r]))}),W(ye(t))}function Mf(i,e){return ce(su(i,e))}function Ef(i,e){return Xt(su(i,e))}var Cf="units/5.7.0";var If=new M(Cf),Sf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Rf(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&If.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Ud(i,e){if(typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return Wr(i,e??18)}function jd(i,e){if(typeof i!="string"&&If.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return dn(i,e??18)}function Pf(i){return Ud(i,18)}function Nf(i){return jd(i,18)}var ou="ethers/5.7.2";var Df=new M(ou);try{let i=window;i._ethers==null&&(i._ethers=Vd)}catch{}var Nn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Nn||(Nn={}));var uu;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(uu||(uu={}));var Ia;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Ia||(Ia={}));var lu;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(lu||(lu={}));var qd;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(qd||(qd={}));var Ss;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Ss||(Ss={}));var Rs;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Rs||(Rs={}));var Hd;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Hd||(Hd={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var zd="0x12345678",Gd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Gd||(Gd={}));var Pe;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Pe||(Pe={}));var me;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(me||(me={}));var Wd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Tr=class{static createInterface(){return new te.Interface(Wd)}static connect(e,t){return new oe(e,Wd,t)}};Mt(Tr,"abi",Wd);var Kd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],vr=class{static createInterface(){return new te.Interface(Kd)}static connect(e,t){return new oe(e,Kd,t)}};Mt(vr,"abi",Kd);var Of=(i,e)=>{throw new Error(`${e}: ${i}`)},Jd=i=>i!=null;var{keccak256:J5,toUtf8Bytes:$5}=te,{MaxUint256:Q5}=ht;var Sa=i=>te.formatEther(i),du=i=>te.parseEther(i),pu=i=>du(i[0]),$d=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(Pe.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Jd)},wr=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Q5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Li=i=>J5($5(i));var Ra=async(i,e)=>(await vr.connect(i,e).version()).toNumber(),Qd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Jd);var{hexDataSlice:Xd}=te,{MaxUint256:X5}=ht,Bf=i=>{let e=Xd(i,0,3),t=F.from(Xd(i,4,35)),n=F.from(Xd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ff=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),X5,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await wr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},Y5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>Ff(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ni(i,e,t,n[0],r):Y5(i,e,t,n,r):Ff(i,e,t,n,r);var{MaxUint256:Lf}=ht,{AddressZero:Z5}=ht;async function e1(i,e){let t;try{return t=await i.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ps(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Bf(s),I=Tr.connect(a,n.signer||n.provider),_=await e1(I,p);if(_.includes(Pe.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Lf}else{let{skillId:U}=await e.getDomain(c),q=await i.getChildSkillId(U,b);if(q.eq(d))o=Lf;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(q));if(J<0)throw new Error(`Could not find ${q} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,Z5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:t1}=ht,ii=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ia[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ii.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ii.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ii.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return ii.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${t1}/noProof`,s=await ii.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var Uf=10,SA=wt(Uf),jf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vf=Uf-1;var qf=6,NA=wt(qf),Hf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Gf=qf-1;var zf=7,BA=wt(zf),Wf={1:[],2:[],3:[],4:[],5:[],6:[]},Kf=zf-1;var Jf=7,UA=wt(Jf),$f={1:[],2:[],3:[],4:[],5:[],6:[]},Qf=Jf-1;var Xf=4,qA=wt(Xf),Yf={1:[],2:[],3:[]},Zf=Xf-1;var em=5,zA=wt(em),tm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},nm=em-1;var im=2,JA=wt(im),rm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},am=im-1;var sm=4,XA=wt(sm),om={1:[1,2,3],2:[1,2,3],3:[1,2,3]},um=sm-1;var lm=7,ek=wt(lm),dm={1:[],2:[],3:[],4:[],5:[],6:[]},pm=lm-1;var ym=11,ik=wt(ym),Yd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Zd=ym-1;var cm=6,sk=wt(cm),fm={1:[],2:[],3:[],4:[],5:[]},mm=cm-1;var ri=(i,e,t)=>{switch(i){case me.CoinMachine:{let n=jf[e];return!!n&&!n.includes(t)}case me.EvaluatedExpenditure:{let n=Hf[e];return!!n&&!n.includes(t)}case me.FundingQueue:{let n=Wf[e];return!!n&&!n.includes(t)}case me.IVotingReputation:{let n=Yd[e];return!!n&&!n.includes(t)}case me.OneTxPayment:{let n=$f[e];return!!n&&!n.includes(t)}case me.ReputationBootstrapper:{let n=Yf[e];return!!n&&!n.includes(t)}case me.StagedExpenditure:{let n=rm[e];return!!n&&!n.includes(t)}case me.StakedExpenditure:{let n=tm[e];return!!n&&!n.includes(t)}case me.StreamingPayments:{let n=om[e];return!!n&&!n.includes(t)}case me.TokenSupplier:{let n=dm[e];return!!n&&!n.includes(t)}case me.VotingReputation:{let n=Yd[e];return!!n&&!n.includes(t)}case me.Whitelist:{let n=fm[e];return!!n&&!n.includes(t)}default:return Of(i,"Could not find extension with name")}};var cu={[me.CoinMachine]:Vf,[me.EvaluatedExpenditure]:Gf,[me.FundingQueue]:Kf,[me.IVotingReputation]:Zd,[me.OneTxPayment]:Qf,[me.ReputationBootstrapper]:Zf,[me.StagedExpenditure]:am,[me.StakedExpenditure]:nm,[me.StreamingPayments]:um,[me.TokenSupplier]:pm,[me.VotingReputation]:Zd,[me.Whitelist]:mm};var Fh=An(hm(),1);var vp=An(Dh(),1);var Se;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Se||(Se={}));var Tp=2,gp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(gp||(gp={}));var Oh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,fx=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),wp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=vp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==Tp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Se.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Oh(t.errors);throw new Error(n)};var Bh=(i,e)=>{let t=i===Se.Colony?fx(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=vp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:Tp});if(!n.success){let r=Oh(n.errors);throw new Error(r)}return n.data};var _p=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},Ap=_p;var kp=(0,Fh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),js={[Se.Annotation]:"Annotation(address,bytes32,string)",[Se.Colony]:"ColonyMetadata(address,string)",[Se.Decision]:"Annotation(address,bytes32,string)",[Se.Domain]:"DomainMetadata(address,uint256,string)",[Se.Misc]:"",[Se.DEFAULT]:""},Ba=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(js).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await kp(n)).json();return wp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await kp(n)).json(),s=Object.entries(js).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return wp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await kp(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Bh(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var NM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Mt(vn,"abi",Mp);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Mt(wn,"abi",Ep);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Cr=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Mt(Cr,"abi",Cp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Lh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",xx=i=>i.length>1,Dn=class extends mr{constructor(...e){xx(e)?super(...e):super(Ku,Lh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};Mt(Dn,"bytecode",Lh),Mt(Dn,"abi",Ku);var Ip=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Mt(Ir,"abi",Ip);var Sp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Sr=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Mt(Sr,"abi",Sp);var Rr;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var _n;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(_n||(_n={}));var{AddressZero:Uh}=ht;async function vx(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var wx=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Dn.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await vx(t)}catch{n=!1}try{await t.getMetatransactionNonce(Uh)}catch{r=!1}try{await t.nonces(Uh)}catch{a=!1}return n?r?t.tokenClientType=_n.Colony:(t=Ir.connect(i,e),t.tokenClientType=_n.ColonyLegacy):a?(t=wn.connect(i,e),t.tokenClientType=_n.Erc2612):(t=vn.connect(i,e),t.tokenClientType=_n.Erc20),t.clientType=Rr.TokenClient,t},Rp=wx;var _x=(i,e)=>{let t=Sr.connect(i,e);return t.clientType=Rr.TokenLockingClient,t},Pp=_x;var{AddressZero:Np}=ht,Ax=vn.connect(Np,new ti.BaseProvider(3656691)).interface,kx=Cr.connect(Np,new ti.BaseProvider(3656691)).interface,Mx=wn.connect(Np,new ti.BaseProvider(3656691)).interface;var Dp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Vs.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],qs=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};qs.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Pr.abi=Bp;var wi=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,js[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Qd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Cx,solidityKeccak256:Ix,splitSignature:Sx}=te,Nr=class extends wi{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Nn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=Ix(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=Cx(d),c=await n.signMessage(p),{r:b,s:I,v:_}=Sx(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Ju=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Dr=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Dr.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Or.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Br=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Br.abi=Up;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fr=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Fr.abi=jp;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Lr=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Lr.abi=Vp;var qp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ur=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Ur.abi=qp;var{AddressZero:Fx}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Li(On.extensionType),e.address);if(t===Fx)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ra(t,e.colonyNetwork.signerOrProvider);if(!ri(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=On.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,a,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Pe.Administration,Pe.Funding],this.oneTxPaymentContract.address),[S,L]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Pe.Administration,Pe.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Li(me.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},Vi=On;Vi.supportedVersions=[{version:3,factory:Fr},{version:4,factory:Lr},{version:5,factory:Ur}],Vi.extensionType=me.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Hs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Gs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=wn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ne("Approval",r)}))}};var jh=async(i,e)=>{let t=await Rp(e,i.signerOrProvider);switch(t.tokenClientType){case _n.Colony:return new Hs(i,t);case _n.Erc20:return new Bn(i,t);case _n.Erc2612:return new Gs(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],jr=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};jr.abi=Hp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};Vr.abi=Gp;var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],qr=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};qr.abi=zp;var{AddressZero:Wp}=ht;var $u=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Li(Fn.extensionType),e.address);if(t===Wp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ra(t,e.colonyNetwork.signerOrProvider);if(!ri(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,a,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Ps(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,zd);return[e,t,Wp,zd,n,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Se.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Sa(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ni(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Pe.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:q,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,q,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await wr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Li(me.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},qi=Fn;qi.supportedVersions=[{version:7,factory:jr},{version:8,factory:Vr},{version:9,factory:qr}],qi.extensionType=me.VotingReputation;var Vx={["motion"]:qi,["oneTx"]:Vi},La=class{static async connect(e,t){let n=await Ra(t,e.signerOrProvider),r=La.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await jh(e,s),d=new La(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return La.supportedVersions[La.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ii(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Fa({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Fa({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await qi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Vi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Se.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Pe.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Se.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:Pe.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Pe.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Se.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Pe.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ni(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Pe.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await wr(b,this.colony,a,s),_=await wr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Se.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Se.Annotation})}installExtension(e){let t=Vx[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!ri(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Li(r),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return yu(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=$d(a);return[e,n,s]},{roles:Pe.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=$d(a);return[e,n,s]},{roles:Pe.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Pe.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},Ua=La;Ua.supportedVersions=[{version:11,factory:Dr},{version:12,factory:Or},{version:13,factory:Br}];var{splitSignature:qx}=te,Qu=class extends wi{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=qx(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var zs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Vh}=te,{AddressZero:Kp}=ht,Ws=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Ba(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||lu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Ia[this.network]},this.networkContract=Pr.connect(t?.customNetworkAddress||uu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new zs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new wi({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Nr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new Qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Se.Colony,n),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Se.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return Ua.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.network],""):null}async getColonyAddress(e){let t=Vh(`${e}${Ss[this.network]}`),n=await this.networkContract.addr(t);return n!==Kp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.network],""):null}async getUserAddress(e){let t=Vh(`${e}${Rs[this.network]}`),n=await this.networkContract.addr(t);return n!==Kp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...ne("TokenDeployed",r)}))}};var qh=async i=>{if(!i.ext.oneTx){if(!ri(me.OneTxPayment,cu[me.OneTxPayment],i.version))throw new Error(`OneTxPayment extension of version ${cu[me.OneTxPayment]} is not compatible with the installed Colony version ${i.version}`);if(await i.installExtension("oneTx").tx().mined(),await i.updateExtensions(),!i.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=i.ext.oneTx;await i.setRoles(e.address,[Pe.Administration,Pe.Funding]).tx().mined()}};var{isAddress:Gx}=te,Xu=new ti.JsonRpcProvider("http://127.0.0.1:8545"),Hr,Ks,zx=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Xu),Wx=async i=>{let e=zx(),n=await new Ws(e,{customNetworkAddress:i,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await qh(n),n},Kx=async i=>{await Hr.mint(du(i)).tx().mined(),await Hr.claimFunds().tx().mined();let e=await Hr.getBalance();return Sa(e)},Jx=async i=>{if(!Hr.ext.oneTx)throw new Error("OneTxPayment extension not installed");return Hr.ext.oneTx.pay(i,pu`10`).tx()},$x=async()=>{await Xu.send("evm_increaseTime",[3600]),await Xu.send("evm_mine",[]),await Xu.send("evm_mine",[])},Qx=async i=>(await Hr.getReputation(i)).toString(),Yu=document.querySelector("#address"),Hh=document.querySelector("#button_connect"),Jp=document.querySelector("#funding_amount"),Gh=document.querySelector("#button_fund"),zh=document.querySelector("#recipient"),Wh=document.querySelector("#button_pay"),Kh=document.querySelector("#button_jump"),Jh=document.querySelector("#button_get_reputation"),$p=document.querySelector("#error"),$h=document.querySelector("#result");if(!Yu||!Jp||!zh||!$p||!$h||!Hh||!Gh||!Wh||!Kh||!Jh)throw new Error("Could not find all required HTML elements");var Zu=i=>{$p.innerText=`Found an error: ${i.message}`,console.error(i)},Qh=()=>{$p.innerText=""},Ln=i=>{$h.innerText=i};Hh.addEventListener("click",async()=>{Qh();let i=Yu.value;if(!Gx(i))return Zu(new Error("This is not a valid address"));Ln("Processing...");try{let e=await Wx(Yu.value);Hr=e,Ln(` +`)}static register(e,t){if(t||(t=e.locale),Q5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var X5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",rs=null;function bf(a){if(rs==null&&(rs=X5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw rs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ll=class extends xn{constructor(){super("en")}getWord(e){return bf(this),rs[e]}getWordIndex(e){return bf(this),rs.indexOf(e)}},pl=new ll;xn.register(pl);var xi={en:pl};var gf="hdnode/5.7.0";var ss=new E(gf),Y5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Z5=we("Bitcoin seed"),hr=2147483648;function vf(a){return(1<=256)throw new Error("Depth too large!");return Tf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,he(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(mr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~hr));let n=new Uint8Array(37);if(e&hr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(ma(Xn.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Lo(F.from(r).add(this.privateKey).mod(Y5)):l=new mn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(mr,o,l,this.fingerprint,Lo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=hr)throw new Error("invalid path index - "+r);n=n._derive(hr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=hr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(ma(Xn.sha512,Z5,n));return new It(mr,Lo(i.slice(0,32)),null,"0x00000000",Lo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=yl(n),e=bi(xr(e,n),n),It._fromSeed(fl(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ca.decode(e);(t.length!==82||Tf(t.slice(0,78))!==e)&&ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(mr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(mr,W(o.slice(1)),null,i,s,r,n,null)}return ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function fl(a,e){e||(e="");let t=we("mnemonic"+e,Gt.NFKD);return hi(we(a,Gt.NFKD),t,2048,64,"sha512")}function xr(a,e){e=yl(e),ss.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=vf(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function bi(a,e){if(e=yl(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&ex(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&vf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function wf(a,e){try{return xr(a,e),!0}catch{}return!1}function _f(a){return(typeof a!="number"||a<0||a>=hr||a%1)&&ss.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var kf="random/5.7.0";var cl=new E(kf);function tx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Af=tx(),Uo=Af.crypto||Af.msCrypto;(!Uo||!Uo.getRandomValues)&&(cl.warn("WARNING: Missing strong random number source"),Uo={getRandomValues:function(a){return cl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(a){(a<=0||a>1024||a%1||a!=a)&&cl.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Uo.getRandomValues(e),j(e)}function os(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var xl=kn(hl());var Vo="json-wallets/5.7.0";function xa(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function br(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new ba.default.Counter(x),J=new ba.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:Mf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new ba.default.Counter(R),q=new ba.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+br(I.getUTCMonth()+1,2)+"-"+br(I.getUTCDate(),2)+"T"+br(I.getUTCHours(),2)+"-"+br(I.getUTCMinutes(),2)+"-"+br(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Bf(a,e,t){if(jo(a)){t&&t(0);let n=gl(a,e);return t&&t(1),Promise.resolve(n)}return Ho(a)?Of(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ff(a,e){if(jo(a))return gl(a,e);if(Ho(a))return Df(a,e);throw new Error("invalid JSON wallet")}var Lf="wallet/5.7.0";var Uf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},gr=new E(Lf);function sx(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function ox(a){let e=a.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),sx(e)){let n=new mn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&gr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),ox(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ha,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&gr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&gr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new mn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&gr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&gr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(ns(t)));return ns(t,n)})}signMessage(e){return Uf(this,void 0,void 0,function*(){return Vr(this._signingKey().signDigest(nr(e)))})}_signTypedData(e,t,n){return Uf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,n,r=>(this.provider==null&&gr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Vr(this._signingKey().signDigest(gt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),kl(this,e,t,n)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=bi(t,e.locale);return on.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Bf(e,t,n).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Ff(e,t))}static fromMnemonic(e,t,n){return t||(t=ha),new on(It.fromMnemonic(e,null,n).derivePath(t))}};function Vf(a,e){return fi(nr(a),e)}function jf(a,e,t,n){return fi(gt.hash(a,e,t),n)}var ta={};Gi(ta,{AlchemyProvider:()=>Ar,AlchemyWebSocketProvider:()=>gs,AnkrProvider:()=>Ts,BaseProvider:()=>ea,CloudflareProvider:()=>vs,EtherscanProvider:()=>ws,FallbackProvider:()=>ks,Formatter:()=>Y,InfuraProvider:()=>Mr,InfuraWebSocketProvider:()=>Es,IpcProvider:()=>Fl,JsonRpcBatchProvider:()=>iu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>_r,NodesmithProvider:()=>Ms,PocketProvider:()=>Is,Provider:()=>$t,Resolver:()=>wr,StaticJsonRpcProvider:()=>bs,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>Cs,WebSocketProvider:()=>va,getDefaultProvider:()=>ru,getNetwork:()=>ds,isCommunityResourcable:()=>Ml,isCommunityResource:()=>ys,showThrottleMessage:()=>Zn});var Hf="networks/5.7.1";var qf=new E(Hf);function ux(a){return a&&typeof a.renetwork=="function"}function ga(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ga(t)},e}function zo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return zo(a,n)},t}var Gf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ga("homestead")},zf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ga("ropsten")},Wf={chainId:63,name:"classicMordor",_defaultProvider:zo("https://www.ethercluster.com/mordor","classicMordor")},Go={unspecified:{chainId:0,name:"unspecified"},homestead:Gf,mainnet:Gf,morden:{chainId:2,name:"morden"},ropsten:zf,testnet:zf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ga("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ga("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ga("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ga("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:zo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Wf,classicTestnet:Wf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:zo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ga("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ga("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ds(a){if(a==null)return null;if(typeof a=="number"){for(let n in Go){let i=Go[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Go[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Go[a.name];if(!e)return typeof a.chainId!="number"&&qf.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&qf.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(ux(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Kf="web/5.7.1";var dx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Jf(a,e){return dx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var lx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new E(Kf);function $f(a){return new Promise(e=>{setTimeout(e,a)})}function Ba(a,e){if(a==null)return null;if(typeof a=="string")return a;if(ra(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function px(a){return we(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Al(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+tr(we(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?er(_[3]):px(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",E.errors.SERVER_ERROR,{body:Ba(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",E.errors.TIMEOUT,{requestBody:Ba(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return lx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Ba(H,U.headers?U.headers["content-type"]:null),requestBody:Ba(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=we(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return Al(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var Rl=kn(Zf());var Ae="providers/5.7.2";var ps=new E(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():ps.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===lo?null:t}contractAddress(e){return di(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?ps.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return he(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Po(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ps.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ps.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ps.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function Ml(a){return a&&typeof a.isCommunityResource=="function"}function ys(a){return Ml(a)&&a.isCommunityResource()}var ec=!1;function Zn(){ec||(ec=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xe=new E(Ae),gx=10;function tc(a){return a==null?"null":(Nt(a)!==32&&xe.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function nc(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[tc(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return tc(e)}).join("&")}function Tx(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function vr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Nt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+nc(a);if(vo.isForkEvent(a))throw xe.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+nc(a.topics||[])}throw new Error("invalid event - "+a)}function fs(){return new Date().getTime()}function ac(a){return new Promise(e=>{setTimeout(e,a)})}var vx=["block","network","pending","poll"],Pl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=Tx(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||vx.indexOf(this.tag)>=0}},wx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Il(a){return he(F.from(a).toHexString(),32)}function ic(a){return ca.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var oc=new RegExp("^(ipfs)://(.*)$","i"),rc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),oc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $o(a,e){try{return Jt(cs(a,e))}catch{}return null}function cs(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function Cl(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):xe.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function sc(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function _x(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function uc(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Sa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",uc([Yr(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&xe.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=cs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?cs(n,0):null})}_getAddress(e,t){let n=wx[String(e)];if(n==null&&xe.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ic(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ic(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Rl.default.toWords(i.slice(2));return o.unshift(s),Rl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Yi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Il(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&xe.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return xe.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=we(e);t=ye([Il(64),Il(t.length),t]),t.length%32!==0&&(t=ye([t,he("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Sl=null,kx=1,ea=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):xe.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||xe.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Sl==null&&(Sl=new Y),Sl}static getNetwork(e){return ds(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return xe.throwError(`response not found during CCIP fetch: ${C}`,E.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return xe.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(fs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=fs(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=fs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=kx++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)xe.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",xe.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return xe.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield ac(0),this._network;let n=xe.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=fs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield ac(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(xe.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return xe.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&xe.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&xe.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=gx&&xe.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||xe.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&xe.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new wr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||xe.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Sa(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&xe.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=$o(yield this.call({to:n,data:"0x691f3431"+Sa(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new wr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=$o(yield this.call({to:s,data:"0x691f3431"+Sa(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return xe.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new Pl(vr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=vr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=vr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=vr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=vr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=vr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var Ta=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Et=new E(Ae),Ax=["call","estimateGas"];function hs(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=hs(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return hs(JSON.parse(a),e)}catch{}return null}function lc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=hs(e,!0);if(r)return r.data;Et.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=hs(e.body,!1);r==null&&(r=hs(e,!1)),r&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Et.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Et.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Et.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Et.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),Ax.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function dc(a){return new Promise(function(e){setTimeout(e,a)})}function Ex(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ms(a){return a&&a.toLowerCase()}var Nl={},_r=class extends St{constructor(e,t,n){if(super(),e!==Nl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Et.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Et.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Dl(Nl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Et.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Ta(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Et.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Et.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),lc("sendTransaction",s,r)))})}signTransaction(e){return Et.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ta(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>Ta(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Ta(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Ta(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return Ta(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return Ta(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Dl=class extends _r{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},Mx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends ea{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ta(this,void 0,void 0,function*(){yield dc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _r(Nl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),Ex).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ms(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ms(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ms(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ms(t.address),he(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ms(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return Ta(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Et.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return lc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return dc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(Mx);if(t)for(let r in t)t[r]&&(n[r]=!0);Ki(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Un(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var kr=null;try{if(kr=WebSocket,kr==null)throw new Error("inject please")}catch{let e=new E(Ae);kr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ol=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Qo=new E(Ae),Ix=1,va=class extends Yt{constructor(e,t){t==="any"&&Qo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new kr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Qo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Qo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ol(this,void 0,void 0,function*(){return null})}set polling(e){!e||Qo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=Ix++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Ol(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Ol(this,void 0,void 0,function*(){this.websocket.readyState===kr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var Cx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xs=new E(Ae),bs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Cx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||xs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends bs{constructor(e,t){xs.checkAbstract(new.target,Ct),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let n=ht(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){xs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return xs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return xs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var pc=new E(Ae),Xo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",gs=class extends va{constructor(e,t){let n=new Ar(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Xo}},Ar=class extends Ct{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){return e==null?Xo:(e&&typeof e!="string"&&pc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:pc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Xo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Xo}};var Sx=new E(Ae),Yo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Rx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Sx.throwArgumentError("unsupported network","name",a)}var Ts=class extends Ct{isCommunityResource(){return this.apiKey===Yo}static getApiKey(e){return e??Yo}static getUrl(e,t){t==null&&(t=Yo);let n={allowGzip:!0,url:"https://"+Rx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Yo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var Px=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},yc=new E(Ae),vs=class extends Ct{static getApiKey(e){return e!=null&&yc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:yc.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Px(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var Zo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Fa=new E(Ae);function fc(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Un(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function Nx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function cc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function mc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Bl(a,e,t){if(a==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Fa.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Fa.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Fa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Fa.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Fa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var ws=class extends ea{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Fa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Zo(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?cc:Nx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||cc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Zo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Zo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Bl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=fc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Bl("call",r,t.transaction)}}case"estimateGas":{let i=fc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Bl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=mc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=mc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Fa.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Fa.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var nu=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},gi=new E(Ae);function eu(){return new Date().getTime()}function hc(a){let e=null;for(let t=0;te?null:(n+i)/2}function Er(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>Er(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=Er(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Dx=1;function bc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var Ox=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],Bx=["address","args","errorArgs","errorSignature","method","transaction"];function tu(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function Fx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function Lx(a,e,t){let n=Er;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=xc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return xc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Er(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Er(i))}:n=function(i){return i==null?null:Er(i)};break;default:throw new Error("unknown method: "+e)}return Fx(n,a.quorum)}function _s(a,e){return nu(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function Ux(a,e,t,n){return nu(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield _s(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield _s(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield _s(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield _s(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield _s(a,e)),i.getLogs(r)}}return gi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:n})})}var ks=class extends ea{constructor(e,t){e.length===0&&gi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=ys(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ys(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&gi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&gi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=hc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return nu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return hc(e)})}perform(e,t){return nu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=eu(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Ux(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield bc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return Ox.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};Bx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),gi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),gi.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>tu(l)),provider:this})})}};var Fl=null;var au=new E(Ae),As="84842078b09946638c03157f83405213",Es=class extends va{constructor(e,t){let n=new Mr(e,t),i=n.connection;i.password&&au.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===As}},Mr=class extends Ct{static getWebSocketProvider(e,t){return new Es(e,t)}static getApiKey(e){let t={apiKey:As,projectId:As,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(au.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),au.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:au.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===As&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===As}};var iu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ll=new E(Ae),Vx="ETHERS_JS_SHARED",Ms=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&Ll.throwArgumentError("invalid apiKey","apiKey",e),e||Vx}static getUrl(e,t){Ll.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ll.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var gc=new E(Ae),Tc="62e1ad51b37b8e00394bda3b",Is=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Tc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:gc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:gc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===Tc}};var vc=new E(Ae),jx=1;function wc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:jx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Hx(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Cs=class extends Yt{constructor(e,t){e==null&&vc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Hx(e)):e.sendAsync?i=wc(e,e.sendAsync.bind(e)):e.send?i=wc(e,e.send.bind(e)):vc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var _c=new E(Ae);function ru(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new va(a);default:_c.throwArgumentError("unsupported URL scheme","network",a)}}let t=ds(a);return(!t||!t._defaultProvider)&&_c.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:ks,AlchemyProvider:Ar,AnkrProvider:Ts,CloudflareProvider:vs,EtherscanProvider:ws,InfuraProvider:Mr,JsonRpcProvider:Yt,NodesmithProvider:Ms,PocketProvider:Is,Web3Provider:Cs,IpcProvider:null},e)}var te={};Gi(te,{AbiCoder:()=>Zi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>Te,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>It,Indexed:()=>da,Interface:()=>Ra,LogDescription:()=>ar,Logger:()=>E,ParamType:()=>yt,RLP:()=>to,SigningKey:()=>mn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>ir,TransactionTypes:()=>Ro,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>mo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>gt,_fetchData:()=>Al,_toEscapedUtf8String:()=>Sd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ca,base64:()=>Bd,checkProperties:()=>Ki,checkResultErrors:()=>$i,commify:()=>Rc,computeAddress:()=>hn,computeHmac:()=>ma,computePublicKey:()=>ts,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Qr,defaultPath:()=>ha,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>bi,fetchJson:()=>Rn,formatBytes32String:()=>Rd,formatEther:()=>Pc,formatUnits:()=>Ul,getAccountPath:()=>_f,getAddress:()=>ce,getContractAddress:()=>di,getCreate2Address:()=>By,getIcapAddress:()=>Oy,getJsonWalletAddress:()=>Tl,getStatic:()=>ht,hashMessage:()=>nr,hexConcat:()=>kt,hexDataLength:()=>Nt,hexDataSlice:()=>Ie,hexStripZeros:()=>gd,hexValue:()=>Un,hexZeroPad:()=>he,hexlify:()=>W,id:()=>nn,isAddress:()=>Dy,isBytes:()=>un,isBytesLike:()=>ra,isHexString:()=>ie,isValidMnemonic:()=>wf,isValidName:()=>Ld,joinSignature:()=>Vr,keccak256:()=>fe,mnemonicToEntropy:()=>xr,mnemonicToSeed:()=>fl,namehash:()=>Sa,nameprep:()=>Od,parseBytes32String:()=>Pd,parseEther:()=>Nc,parseTransaction:()=>Po,parseUnits:()=>Vl,poll:()=>Pn,randomBytes:()=>Yn,recoverAddress:()=>fi,recoverPublicKey:()=>So,resolveProperties:()=>Ce,ripemd160:()=>is,serializeTransaction:()=>ns,sha256:()=>Xt,sha512:()=>dl,shallowCopy:()=>_e,shuffled:()=>os,solidityKeccak256:()=>Ec,solidityPack:()=>su,soliditySha256:()=>Mc,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>we,toUtf8CodePoints:()=>Ca,toUtf8String:()=>Jt,verifyMessage:()=>Vf,verifyTypedData:()=>jf,zeroPad:()=>ri});var kc="solidity/5.7.0";var qx=new RegExp("^bytes([0-9]+)$"),Gx=new RegExp("^(u?int)([0-9]*)$"),zx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Wx="0000000000000000000000000000000000000000000000000000000000000000",Ir=new E(kc);function Ac(a,e,t){switch(a){case"address":return t?ri(e,32):j(e);case"string":return we(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ri(e,32):j(e)}let n=a.match(Gx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ir.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ri(e,i/8)}if(n=a.match(qx),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ir.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Ir.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Wx).substring(0,66)):e}if(n=a.match(zx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ir.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(Ac(i,o,!0))}),ye(s)}return Ir.throwArgumentError("invalid type","type",a)}function su(a,e){a.length!=e.length&&Ir.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(Ac(n,e[i]))}),W(ye(t))}function Ec(a,e){return fe(su(a,e))}function Mc(a,e){return Xt(su(a,e))}var Ic="units/5.7.0";var Cc=new E(Ic),Sc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Rc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Cc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Ul(a,e){if(typeof e=="string"){let t=Sc.indexOf(e);t!==-1&&(e=3*t)}return Wi(a,e??18)}function Vl(a,e){if(typeof a!="string"&&Cc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=Sc.indexOf(e);t!==-1&&(e=3*t)}return ln(a,e??18)}function Pc(a){return Ul(a,18)}function Nc(a){return Vl(a,18)}var ou="ethers/5.7.2";var Dc=new E(ou);try{let a=window;a._ethers==null&&(a._ethers=jl)}catch{}var Nn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Nn||(Nn={}));var uu;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(uu||(uu={}));var Cr;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Cr||(Cr={}));var du;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(du||(du={}));var Hl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Hl||(Hl={}));var Ss;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Ss||(Ss={}));var Rs;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Rs||(Rs={}));var ql;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(ql||(ql={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var zl="0x12345678",Gl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Gl||(Gl={}));var Ne;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(Ne||(Ne={}));var me;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(me||(me={}));var Wl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ti=class{static createInterface(){return new te.Interface(Wl)}static connect(e,t){return new oe(e,Wl,t)}};be(Ti,"abi",Wl);var Kl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],vi=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};be(vi,"abi",Kl);var Oc=(a,e)=>{throw new Error(`${e}: ${a}`)},Jl=a=>a!=null;var{keccak256:Jx,toUtf8Bytes:$x}=te,{MaxUint256:Qx}=xt;var Sr=a=>te.formatEther(a),lu=a=>te.parseEther(a),pu=a=>lu(a[0]),$l=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(Ne.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Jl)},wi=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Qx;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},La=a=>Jx($x(a));var Rr=async(a,e)=>(await vi.connect(a,e).version()).toNumber(),Ql=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Jl);var{hexDataSlice:Xl}=te,{MaxUint256:Xx}=xt,Bc=a=>{let e=Xl(a,0,3),t=F.from(Xl(a,4,35)),n=F.from(Xl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Fc=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Xx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await wi(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},Yx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Fc(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?na(a,e,t,n[0],i):Yx(a,e,t,n,i):Fc(a,e,t,n,i);var{MaxUint256:Lc}=xt,{AddressZero:Zx}=xt;async function eb(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ps(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),C=Ti.connect(r,n.signer||n.provider),_=await eb(C,p);if(_.includes(Ne.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Lc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Lc;else{let{children:M}=await a.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Zx);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:tb}=xt,aa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Cr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await aa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${tb}/noProof`,s=await aa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Uc=10,$k=_t(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=6,Yk=_t(Hc),qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Gc=Hc-1;var zc=7,tA=_t(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[]},Kc=zc-1;var Jc=7,iA=_t(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Xc=4,oA=_t(Xc),Yc={1:[],2:[],3:[]},Zc=Xc-1;var em=5,lA=_t(em),tm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},nm=em-1;var am=2,fA=_t(am),im={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},rm=am-1;var sm=4,hA=_t(sm),om={1:[1,2,3],2:[1,2,3],3:[1,2,3]},um=sm-1;var dm=7,gA=_t(dm),lm={1:[],2:[],3:[],4:[],5:[],6:[]},pm=dm-1;var ym=11,wA=_t(ym),Yl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Zl=ym-1;var fm=6,AA=_t(fm),cm={1:[],2:[],3:[],4:[],5:[]},mm=fm-1;var ia=(a,e,t)=>{switch(a){case me.CoinMachine:{let n=Vc[e];return!!n&&!n.includes(t)}case me.EvaluatedExpenditure:{let n=qc[e];return!!n&&!n.includes(t)}case me.FundingQueue:{let n=Wc[e];return!!n&&!n.includes(t)}case me.IVotingReputation:{let n=Yl[e];return!!n&&!n.includes(t)}case me.OneTxPayment:{let n=$c[e];return!!n&&!n.includes(t)}case me.ReputationBootstrapper:{let n=Yc[e];return!!n&&!n.includes(t)}case me.StagedExpenditure:{let n=im[e];return!!n&&!n.includes(t)}case me.StakedExpenditure:{let n=tm[e];return!!n&&!n.includes(t)}case me.StreamingPayments:{let n=om[e];return!!n&&!n.includes(t)}case me.TokenSupplier:{let n=lm[e];return!!n&&!n.includes(t)}case me.VotingReputation:{let n=Yl[e];return!!n&&!n.includes(t)}case me.Whitelist:{let n=cm[e];return!!n&&!n.includes(t)}default:return Oc(a,"Could not find extension with name")}};var fu={[me.CoinMachine]:jc,[me.EvaluatedExpenditure]:Gc,[me.FundingQueue]:Kc,[me.IVotingReputation]:Zl,[me.OneTxPayment]:Qc,[me.ReputationBootstrapper]:Zc,[me.StagedExpenditure]:rm,[me.StakedExpenditure]:nm,[me.StreamingPayments]:um,[me.TokenSupplier]:pm,[me.VotingReputation]:Zl,[me.Whitelist]:mm};var Fh=kn(hm(),1);var vp=kn(Dh(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var Tp=2,gp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(gp||(gp={}));var Oh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,c1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),wp=(a,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==Tp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Oh(t.errors);throw new Error(n)};var Bh=(a,e)=>{let t=a===Re.Colony?c1(e):e,n=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:Tp});if(!n.success){let i=Oh(n.errors);throw new Error(i)}return n.data};var _p=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},kp=_p;var Ap=(0,Fh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Vs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Br=class{adapter;constructor(e){this.adapter=e||new kp}static eventSupportsMetadata(e){return!!Object.keys(Vs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await Ap(n)).json();return wp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await Ap(n)).json(),s=Object.entries(Vs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return wp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await Ap(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Bh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var YE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};be(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};be(wn,"abi",Mp);var Ip=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Ii,"abi",Ip);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Lh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",F1=a=>a.length>1,Dn=class extends mi{constructor(...e){F1(e)?super(...e):super(Ku,Lh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};be(Dn,"bytecode",Lh),be(Dn,"abi",Ku);var Cp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};be(Ci,"abi",Cp);var Sp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Si=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Si,"abi",Sp);var Ri;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Ri||(Ri={}));var _n;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(_n||(_n={}));var{AddressZero:Uh}=xt;async function V1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var j1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Dn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await V1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Uh)}catch{i=!1}try{await t.nonces(Uh)}catch{r=!1}return n?i?t.tokenClientType=_n.Colony:(t=Ci.connect(a,e),t.tokenClientType=_n.ColonyLegacy):r?(t=wn.connect(a,e),t.tokenClientType=_n.Erc2612):(t=vn.connect(a,e),t.tokenClientType=_n.Erc20),t.clientType=Ri.TokenClient,t},Rp=j1;var H1=(a,e)=>{let t=Si.connect(a,e);return t.clientType=Ri.TokenLockingClient,t},Pp=H1;var{AddressZero:Np}=xt,q1=vn.connect(Np,new ta.BaseProvider(3656691)).interface,G1=Ii.connect(Np,new ta.BaseProvider(3656691)).interface,z1=wn.connect(Np,new ta.BaseProvider(3656691)).interface;var Dp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],js=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};js.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Hs=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Hs.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Pi.abi=Bp;var wa=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Vs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ql(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:K1,solidityKeccak256:J1,splitSignature:$1}=te,Ni=class extends wa{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=J1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=K1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=$1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Ju=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Di.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Oi.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Bi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Fi.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Li.abi=jp;var Hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Ui.abi=Hp;var{AddressZero:ng}=xt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(On.extensionType),e.address);if(t===ng)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Rr(t,e.colonyNetwork.signerOrProvider);if(!ia(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,r,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(me.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},ja=On;ja.supportedVersions=[{version:3,factory:Fi},{version:4,factory:Li},{version:5,factory:Ui}],ja.extensionType=me.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var qs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Gs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=wn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ne("Approval",i)}))}};var Vh=async(a,e)=>{let t=await Rp(e,a.signerOrProvider);switch(t.tokenClientType){case _n.Colony:return new qs(a,t);case _n.Erc20:return new Bn(a,t);case _n.Erc2612:return new Gs(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Vi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};ji.abi=Gp;var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Hi.abi=zp;var{AddressZero:Wp}=xt;var $u=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(Fn.extensionType),e.address);if(t===Wp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Rr(t,e.colonyNetwork.signerOrProvider);if(!ia(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,r,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Ps(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,zl);return[e,t,Wp,zl,n,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Sr(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Ne.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await wi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(me.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Fn;Ha.supportedVersions=[{version:7,factory:Vi},{version:8,factory:ji},{version:9,factory:Hi}],Ha.extensionType=me.VotingReputation;var sg={["motion"]:Ha,["oneTx"]:ja},Lr=class{static async connect(e,t){let n=await Rr(t,e.signerOrProvider),i=Lr.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Vh(e,s),l=new Lr(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Lr.supportedVersions[Lr.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Fr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Fr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Ne.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Ne.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await wi(x,this.colony,r,s),_=await wi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=sg[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ia(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[La(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return yu(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=$l(r);return[e,n,s]},{roles:Ne.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=$l(r);return[e,n,s]},{roles:Ne.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Ne.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Ur=Lr;Ur.supportedVersions=[{version:11,factory:Di},{version:12,factory:Oi},{version:13,factory:Bi}];var{splitSignature:og}=te,Qu=class extends wa{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:f}),{r:C,s:_,v}=og(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:f,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var zs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:jh}=te,{AddressZero:Kp}=xt,Ws=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Br(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||du[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Cr[this.network]},this.networkContract=Pi.connect(t?.customNetworkAddress||uu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new zs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new wa({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Ni({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new Qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Re.Colony,n),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Ur.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.network],""):null}async getColonyAddress(e){let t=jh(`${e}${Ss[this.network]}`),n=await this.networkContract.addr(t);return n!==Kp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.network],""):null}async getUserAddress(e){let t=jh(`${e}${Rs[this.network]}`),n=await this.networkContract.addr(t);return n!==Kp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...ne("TokenDeployed",i)}))}};var Hh=async a=>{if(!a.ext.oneTx){if(!ia(me.OneTxPayment,fu[me.OneTxPayment],a.version))throw new Error(`OneTxPayment extension of version ${fu[me.OneTxPayment]} is not compatible with the installed Colony version ${a.version}`);if(await a.installExtension("oneTx").tx().mined(),await a.updateExtensions(),!a.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=a.ext.oneTx;await a.setRoles(e.address,[Ne.Administration,Ne.Funding]).tx().mined()}};var{isAddress:dg}=te,Xu=new ta.JsonRpcProvider("http://127.0.0.1:8545"),qi,Ks,lg=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Xu),pg=async a=>{let e=lg(),n=await new Ws(e,{customNetworkAddress:a,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await Hh(n),n},yg=async a=>{await qi.mint(lu(a)).tx().mined(),await qi.claimFunds().tx().mined();let e=await qi.getBalance();return Sr(e)},fg=async a=>{if(!qi.ext.oneTx)throw new Error("OneTxPayment extension not installed");return qi.ext.oneTx.pay(a,pu`10`).tx()},cg=async()=>{await Xu.send("evm_increaseTime",[3600]),await Xu.send("evm_mine",[]),await Xu.send("evm_mine",[])},mg=async a=>(await qi.getReputation(a)).toString(),Yu=document.querySelector("#address"),qh=document.querySelector("#button_connect"),Jp=document.querySelector("#funding_amount"),Gh=document.querySelector("#button_fund"),zh=document.querySelector("#recipient"),Wh=document.querySelector("#button_pay"),Kh=document.querySelector("#button_jump"),Jh=document.querySelector("#button_get_reputation"),$p=document.querySelector("#error"),$h=document.querySelector("#result");if(!Yu||!Jp||!zh||!$p||!$h||!qh||!Gh||!Wh||!Kh||!Jh)throw new Error("Could not find all required HTML elements");var Zu=a=>{$p.innerText=`Found an error: ${a.message}`,console.error(a)},Qh=()=>{$p.innerText=""},Ln=a=>{$h.innerText=a};qh.addEventListener("click",async()=>{Qh();let a=Yu.value;if(!dg(a))return Zu(new Error("This is not a valid address"));Ln("Processing...");try{let e=await pg(Yu.value);qi=e,Ln(` Connected to Colony with address: ${e.address}. Colony version: ${e.version}. - `)}catch(e){Zu(e),Ln("")}finally{Yu.value=""}return null});Gh.addEventListener("click",async()=>{Qh(),Ln("Processing...");try{let i=Jp.value,e=await Kx(i);Ln(`Funded MetaColony! Current funding: ${e} CLNY`)}catch(i){Zu(i),Ln("")}finally{Jp.value=""}return null});Wh.addEventListener("click",async()=>{Ks=zh.value,Ln("Processing...");try{await Jx(Ks)}catch(i){Zu(i),Ln("")}Ln(`Successfully paid 10 CLNY to ${Ks}`)});Kh.addEventListener("click",async()=>{await $x(),Ln("Whooo that was a hell of a ride. Welcome to the future")});Jh.addEventListener("click",async()=>{let i=await Qx(Ks);Ln(`User ${Ks} has ${Sa(i)} reputation points`)});})(); + `)}catch(e){Zu(e),Ln("")}finally{Yu.value=""}return null});Gh.addEventListener("click",async()=>{Qh(),Ln("Processing...");try{let a=Jp.value,e=await yg(a);Ln(`Funded MetaColony! Current funding: ${e} CLNY`)}catch(a){Zu(a),Ln("")}finally{Jp.value=""}return null});Wh.addEventListener("click",async()=>{Ks=zh.value,Ln("Processing...");try{await fg(Ks)}catch(a){Zu(a),Ln("")}Ln(`Successfully paid 10 CLNY to ${Ks}`)});Kh.addEventListener("click",async()=>{await cg(),Ln("Whooo that was a hell of a ride. Welcome to the future")});Jh.addEventListener("click",async()=>{let a=await mg(Ks);Ln(`User ${Ks} has ${Sr(a)} reputation points`)});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/metamask.js b/metamask.js index a3d6f9572..6b8587ff7 100644 --- a/metamask.js +++ b/metamask.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var Bh=Object.create;var Gs=Object.defineProperty;var Fh=Object.getOwnPropertyDescriptor;var Lh=Object.getOwnPropertyNames;var Uh=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty;var Vh=(i,e,t)=>e in i?Gs(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hr=(i,e)=>{for(var t in e)Gs(i,t,{get:e[t],enumerable:!0})},Hh=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Lh(e))!jh.call(i,r)&&r!==t&&Gs(i,r,{get:()=>e[r],enumerable:!(n=Fh(e,r))||n.enumerable});return i};var _n=(i,e,t)=>(t=i!=null?Bh(Uh(i)):{},Hh(e||!i||!i.__esModule?Gs(t,"default",{value:i,enumerable:!0}):t,i));var Mt=(i,e,t)=>(Vh(i,typeof e!="symbol"?e+"":e,t),t);var Vp=ie(()=>{});var al=ie((Hp,rl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Vp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[k]|=h<>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);else if(x==="le")for(w=0,k=0;w>>26-A&67108863,A+=24,A>=26&&(A-=26,k++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)A=o(u,y,w)<=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(k-=18,h+=1,this.words[h]|=A>>>26):k+=8}this._strip()};function d(C,u,y,x){for(var w=0,k=0,h=Math.min(C.length,y),A=u;A=49?k=g-49+10:g>=17?k=g-17+10:k=g,t(g>=0&&k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,k=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),k!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(k!==0&&(x=k.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),k=x||Math.max(1,w);t(w<=k,"byte array longer than desired length"),t(k>0,"Requested array length <= 0");var h=v(u,k),A=y==="le"?"LE":"BE";return this["_toArrayLike"+A](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,k=0,h=0;k>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x=0&&(u[x--]=A>>8&255),x>=0&&(u[x--]=A>>16&255),h===6?(x>=0&&(u[x--]=A>>24&255),w=0,h=0):(w=A>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var k=0,h=0;h>>26;for(;k!==0&&h>>26;if(this.length=x.length,k!==0)this.words[this.length]=k,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,k;x>0?(w=this,k=u):(w=u,k=this);for(var h=0,A=0;A>26,this.words[A]=y&67108863;for(;h!==0&&A>26,this.words[A]=y&67108863;if(h===0&&A>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,k=u.words[P]|0,h=w*k+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,k=y.words,h=x.words,A=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,pt=w[3]|0,Z=pt&8191,de=pt>>>13,Hi=w[4]|0,Pe=Hi&8191,Ne=Hi>>>13,qi=w[5]|0,De=qi&8191,Oe=qi>>>13,Gi=w[6]|0,Be=Gi&8191,Fe=Gi>>>13,zi=w[7]|0,Le=zi&8191,Ue=zi>>>13,Wi=w[8]|0,je=Wi&8191,Ve=Wi>>>13,Ki=w[9]|0,He=Ki&8191,qe=Ki>>>13,Ji=k[0]|0,Ge=Ji&8191,ze=Ji>>>13,$i=k[1]|0,We=$i&8191,Ke=$i>>>13,Qi=k[2]|0,Je=Qi&8191,$e=Qi>>>13,Xi=k[3]|0,Qe=Xi&8191,Xe=Xi>>>13,Yi=k[4]|0,Ye=Yi&8191,Ze=Yi>>>13,Zi=k[5]|0,et=Zi&8191,tt=Zi>>>13,er=k[6]|0,nt=er&8191,it=er>>>13,tr=k[7]|0,rt=tr&8191,at=tr>>>13,nr=k[8]|0,st=nr&8191,ot=nr>>>13,ir=k[9]|0,ut=ir&8191,lt=ir>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,Ge),l=Math.imul(f,ze),l=l+Math.imul(P,Ge)|0,m=Math.imul(P,ze);var vi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(vi>>>26)|0,vi&=67108863,g=Math.imul(j,Ge),l=Math.imul(j,ze),l=l+Math.imul(K,Ge)|0,m=Math.imul(K,ze),g=g+Math.imul(f,We)|0,l=l+Math.imul(f,Ke)|0,l=l+Math.imul(P,We)|0,m=m+Math.imul(P,Ke)|0;var wi=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,g=Math.imul(X,Ge),l=Math.imul(X,ze),l=l+Math.imul(Q,Ge)|0,m=Math.imul(Q,ze),g=g+Math.imul(j,We)|0,l=l+Math.imul(j,Ke)|0,l=l+Math.imul(K,We)|0,m=m+Math.imul(K,Ke)|0,g=g+Math.imul(f,Je)|0,l=l+Math.imul(f,$e)|0,l=l+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var _i=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,g=Math.imul(Z,Ge),l=Math.imul(Z,ze),l=l+Math.imul(de,Ge)|0,m=Math.imul(de,ze),g=g+Math.imul(X,We)|0,l=l+Math.imul(X,Ke)|0,l=l+Math.imul(Q,We)|0,m=m+Math.imul(Q,Ke)|0,g=g+Math.imul(j,Je)|0,l=l+Math.imul(j,$e)|0,l=l+Math.imul(K,Je)|0,m=m+Math.imul(K,$e)|0,g=g+Math.imul(f,Qe)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Qe)|0,m=m+Math.imul(P,Xe)|0;var Ai=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,g=Math.imul(Pe,Ge),l=Math.imul(Pe,ze),l=l+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul(Z,We)|0,l=l+Math.imul(Z,Ke)|0,l=l+Math.imul(de,We)|0,m=m+Math.imul(de,Ke)|0,g=g+Math.imul(X,Je)|0,l=l+Math.imul(X,$e)|0,l=l+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(j,Qe)|0,l=l+Math.imul(j,Xe)|0,l=l+Math.imul(K,Qe)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Ze)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Ze)|0;var ki=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,g=Math.imul(De,Ge),l=Math.imul(De,ze),l=l+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,We)|0,l=l+Math.imul(Pe,Ke)|0,l=l+Math.imul(Ne,We)|0,m=m+Math.imul(Ne,Ke)|0,g=g+Math.imul(Z,Je)|0,l=l+Math.imul(Z,$e)|0,l=l+Math.imul(de,Je)|0,m=m+Math.imul(de,$e)|0,g=g+Math.imul(X,Qe)|0,l=l+Math.imul(X,Xe)|0,l=l+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(j,Ye)|0,l=l+Math.imul(j,Ze)|0,l=l+Math.imul(K,Ye)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(f,et)|0,l=l+Math.imul(f,tt)|0,l=l+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Gu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(Be,Ge),l=Math.imul(Be,ze),l=l+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,We)|0,l=l+Math.imul(De,Ke)|0,l=l+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Ke)|0,g=g+Math.imul(Pe,Je)|0,l=l+Math.imul(Pe,$e)|0,l=l+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul(Z,Qe)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Qe)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(X,Ye)|0,l=l+Math.imul(X,Ze)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(j,et)|0,l=l+Math.imul(j,tt)|0,l=l+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(f,nt)|0,l=l+Math.imul(f,it)|0,l=l+Math.imul(P,nt)|0,m=m+Math.imul(P,it)|0;var zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Le,Ge),l=Math.imul(Le,ze),l=l+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,We)|0,l=l+Math.imul(Be,Ke)|0,l=l+Math.imul(Fe,We)|0,m=m+Math.imul(Fe,Ke)|0,g=g+Math.imul(De,Je)|0,l=l+Math.imul(De,$e)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,l=l+Math.imul(Pe,Xe)|0,l=l+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Ze)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Ze)|0,g=g+Math.imul(X,et)|0,l=l+Math.imul(X,tt)|0,l=l+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(j,nt)|0,l=l+Math.imul(j,it)|0,l=l+Math.imul(K,nt)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(f,rt)|0,l=l+Math.imul(f,at)|0,l=l+Math.imul(P,rt)|0,m=m+Math.imul(P,at)|0;var Wu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(je,Ge),l=Math.imul(je,ze),l=l+Math.imul(Ve,Ge)|0,m=Math.imul(Ve,ze),g=g+Math.imul(Le,We)|0,l=l+Math.imul(Le,Ke)|0,l=l+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Ke)|0,g=g+Math.imul(Be,Je)|0,l=l+Math.imul(Be,$e)|0,l=l+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,l=l+Math.imul(De,Xe)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,l=l+Math.imul(Pe,Ze)|0,l=l+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul(Z,et)|0,l=l+Math.imul(Z,tt)|0,l=l+Math.imul(de,et)|0,m=m+Math.imul(de,tt)|0,g=g+Math.imul(X,nt)|0,l=l+Math.imul(X,it)|0,l=l+Math.imul(Q,nt)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(j,rt)|0,l=l+Math.imul(j,at)|0,l=l+Math.imul(K,rt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(f,st)|0,l=l+Math.imul(f,ot)|0,l=l+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var Ku=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(He,Ge),l=Math.imul(He,ze),l=l+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(je,We)|0,l=l+Math.imul(je,Ke)|0,l=l+Math.imul(Ve,We)|0,m=m+Math.imul(Ve,Ke)|0,g=g+Math.imul(Le,Je)|0,l=l+Math.imul(Le,$e)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,l=l+Math.imul(Be,Xe)|0,l=l+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,l=l+Math.imul(De,Ze)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,l=l+Math.imul(Pe,tt)|0,l=l+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul(Z,nt)|0,l=l+Math.imul(Z,it)|0,l=l+Math.imul(de,nt)|0,m=m+Math.imul(de,it)|0,g=g+Math.imul(X,rt)|0,l=l+Math.imul(X,at)|0,l=l+Math.imul(Q,rt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(j,st)|0,l=l+Math.imul(j,ot)|0,l=l+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(f,ut)|0,l=l+Math.imul(f,lt)|0,l=l+Math.imul(P,ut)|0,m=m+Math.imul(P,lt)|0;var Ju=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(He,We),l=Math.imul(He,Ke),l=l+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(je,Je)|0,l=l+Math.imul(je,$e)|0,l=l+Math.imul(Ve,Je)|0,m=m+Math.imul(Ve,$e)|0,g=g+Math.imul(Le,Qe)|0,l=l+Math.imul(Le,Xe)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,l=l+Math.imul(Be,Ze)|0,l=l+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,l=l+Math.imul(De,tt)|0,l=l+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,l=l+Math.imul(Pe,it)|0,l=l+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,it)|0,g=g+Math.imul(Z,rt)|0,l=l+Math.imul(Z,at)|0,l=l+Math.imul(de,rt)|0,m=m+Math.imul(de,at)|0,g=g+Math.imul(X,st)|0,l=l+Math.imul(X,ot)|0,l=l+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(j,ut)|0,l=l+Math.imul(j,lt)|0,l=l+Math.imul(K,ut)|0,m=m+Math.imul(K,lt)|0;var $u=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(He,Je),l=Math.imul(He,$e),l=l+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(je,Qe)|0,l=l+Math.imul(je,Xe)|0,l=l+Math.imul(Ve,Qe)|0,m=m+Math.imul(Ve,Xe)|0,g=g+Math.imul(Le,Ye)|0,l=l+Math.imul(Le,Ze)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,l=l+Math.imul(Be,tt)|0,l=l+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,l=l+Math.imul(De,it)|0,l=l+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,it)|0,g=g+Math.imul(Pe,rt)|0,l=l+Math.imul(Pe,at)|0,l=l+Math.imul(Ne,rt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul(Z,st)|0,l=l+Math.imul(Z,ot)|0,l=l+Math.imul(de,st)|0,m=m+Math.imul(de,ot)|0,g=g+Math.imul(X,ut)|0,l=l+Math.imul(X,lt)|0,l=l+Math.imul(Q,ut)|0,m=m+Math.imul(Q,lt)|0;var Qu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(He,Qe),l=Math.imul(He,Xe),l=l+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(je,Ye)|0,l=l+Math.imul(je,Ze)|0,l=l+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Ze)|0,g=g+Math.imul(Le,et)|0,l=l+Math.imul(Le,tt)|0,l=l+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,l=l+Math.imul(Be,it)|0,l=l+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,it)|0,g=g+Math.imul(De,rt)|0,l=l+Math.imul(De,at)|0,l=l+Math.imul(Oe,rt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,st)|0,l=l+Math.imul(Pe,ot)|0,l=l+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul(Z,ut)|0,l=l+Math.imul(Z,lt)|0,l=l+Math.imul(de,ut)|0,m=m+Math.imul(de,lt)|0;var Xu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(He,Ye),l=Math.imul(He,Ze),l=l+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(je,et)|0,l=l+Math.imul(je,tt)|0,l=l+Math.imul(Ve,et)|0,m=m+Math.imul(Ve,tt)|0,g=g+Math.imul(Le,nt)|0,l=l+Math.imul(Le,it)|0,l=l+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,it)|0,g=g+Math.imul(Be,rt)|0,l=l+Math.imul(Be,at)|0,l=l+Math.imul(Fe,rt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,st)|0,l=l+Math.imul(De,ot)|0,l=l+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,l=l+Math.imul(Pe,lt)|0,l=l+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,lt)|0;var Yu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(He,et),l=Math.imul(He,tt),l=l+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(je,nt)|0,l=l+Math.imul(je,it)|0,l=l+Math.imul(Ve,nt)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Le,rt)|0,l=l+Math.imul(Le,at)|0,l=l+Math.imul(Ue,rt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,st)|0,l=l+Math.imul(Be,ot)|0,l=l+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,l=l+Math.imul(De,lt)|0,l=l+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,lt)|0;var Zu=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(He,nt),l=Math.imul(He,it),l=l+Math.imul(qe,nt)|0,m=Math.imul(qe,it),g=g+Math.imul(je,rt)|0,l=l+Math.imul(je,at)|0,l=l+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,at)|0,g=g+Math.imul(Le,st)|0,l=l+Math.imul(Le,ot)|0,l=l+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,l=l+Math.imul(Be,lt)|0,l=l+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,lt)|0;var el=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(He,rt),l=Math.imul(He,at),l=l+Math.imul(qe,rt)|0,m=Math.imul(qe,at),g=g+Math.imul(je,st)|0,l=l+Math.imul(je,ot)|0,l=l+Math.imul(Ve,st)|0,m=m+Math.imul(Ve,ot)|0,g=g+Math.imul(Le,ut)|0,l=l+Math.imul(Le,lt)|0,l=l+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,lt)|0;var tl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(He,st),l=Math.imul(He,ot),l=l+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(je,ut)|0,l=l+Math.imul(je,lt)|0,l=l+Math.imul(Ve,ut)|0,m=m+Math.imul(Ve,lt)|0;var nl=(A+g|0)+((l&8191)<<13)|0;A=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(He,ut),l=Math.imul(He,lt),l=l+Math.imul(qe,ut)|0,m=Math.imul(qe,lt);var il=(A+g|0)+((l&8191)<<13)|0;return A=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,h[0]=vi,h[1]=wi,h[2]=_i,h[3]=Ai,h[4]=ki,h[5]=Gu,h[6]=zu,h[7]=Wu,h[8]=Ku,h[9]=Ju,h[10]=$u,h[11]=Qu,h[12]=Xu,h[13]=Yu,h[14]=Zu,h[15]=el,h[16]=tl,h[17]=nl,h[18]=il,A!==0&&(h[19]=A,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,k=0;k>>26)|0,w+=h>>>26,h&=67108863}y.words[k]=A,x=h,h=w}return x!==0?y.words[k]=x:y.length--,y._strip()}function H(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=H(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,k,h){for(var A=0;A>>1)k++;return 1<>>13,x[2*h+1]=k&8191,k=k>>>13;for(h=2*y;h>=26,x+=k/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,k;if(y!==0){var h=0;for(k=0;k>>26-y}h&&(this.words[k]=h,this.length++)}if(x!==0){for(k=this.length-1;k>=0;k--)this.words[k+x]=this.words[k];for(k=0;k=0);var w;y?w=(y-y%26)/26:w=0;var k=u%26,h=Math.min((u-k)/26,this.length),A=67108863^67108863>>>k<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-k|G>>>k,m=G&A}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[k+x]=h&67108863}for(;k>26,this.words[k+x]=h&67108863;if(A===0)return this._strip();for(t(A===-1),A=0,k=0;k>26,this.words[k]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),k=u,h=k.words[k.length-1]|0,A=this._countBits(h);x=26-A,x!==0&&(k=k.ushln(x),w.iushln(x),h=k.words[k.length-1]|0);var g=w.length-k.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[k.length+f]|0)*67108864+(w.words[k.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(k,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(k,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,k,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.iadd(u)),{div:w,mod:k}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(k=h.mod.neg(),x&&k.negative!==0&&k.isub(u)),{div:h.div,mod:k}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),k=u.andln(1),h=x.cmp(w);return h<0||k===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,k=this.length-1;k>=0;k--)w=(x*w+(this.words[k]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var k=(this.words[w]|0)+x*67108864;this.words[w]=k/u|0,x=k%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=new r(0),A=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(l),k.isub(m)),w.iushrn(1),k.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||A.isOdd())&&(h.iadd(l),A.isub(m)),h.iushrn(1),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),k.isub(A)):(x.isub(y),h.isub(w),A.isub(k))}return{a:h,b:A,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),k=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,g=1;(y.words[0]&g)===0&&A<26;++A,g<<=1);if(A>0)for(y.iushrn(A);A-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)k.isOdd()&&k.iadd(h),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(k)):(x.isub(y),k.isub(w))}var G;return y.cmpn(1)===0?G=w:G=k,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var k=y.cmp(x);if(k<0){var h=y;y=x,x=h}else if(k===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,A&=67108863,this.words[h]=A}return k!==0&&(this.words[h]=k,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,k=u.words[x]|0;if(w!==k){wk&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new q(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),k=0;k>>22,h=A}h>>>=22,u.words[k-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=k,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),k=0;!w.isZero()&&w.andln(1)===0;)k++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),A=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(A)!==0;)l.redIAdd(A);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=k;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;k--){for(var m=y.words[k],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&A===0){g=0;continue}A<<=1,A|=f,g++,!(g!==x&&(k!==0||G!==0))&&(h=this.mul(h,w[A]),g=0,A=0)}l=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){q.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=x.isub(w).iushrn(this.shift),h=k;return k.cmp(this.m)>=0?h=k.isub(this.m):k.cmpn(0)<0&&(h=k.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof rl>"u"||rl,Hp)});var c0=ie((gg,Qs)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,K){return new l(f,P,K).update(j)[D]()}},$=function(f,P,D){return function(j,K,ee,X){return u["cshake"+f].update(j,K,ee,X)[D]()}},le=function(f,P,D){return function(j,K,ee,X){return u["kmac"+f].update(j,K,ee,X)[D]()}},T=function(f,P,D,j){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,K=this.byteCount,ee=f.length,X=this.blockCount,Q=0,pt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=j[X],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++j;return P?K.push(j):K.unshift(j),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,K=f.length;if(P)j=K;else for(var ee=0;ee=57344?j+=3:(X=65536+((X&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return j&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],j>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var pt=new Uint32Array(Q);ee>8&255,X[Q+2]=pt>>16&255,X[Q+3]=pt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,pt=P[K],X[Q]=pt&255,j>1&&(X[Q+1]=pt>>8&255),j>2&&(X[Q+2]=pt>>16&255)),X};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,K,ee,X,Q,pt,Z,de,Hi,Pe,Ne,qi,De,Oe,Gi,Be,Fe,zi,Le,Ue,Wi,je,Ve,Ki,He,qe,Ji,Ge,ze,$i,We,Ke,Qi,Je,$e,Xi,Qe,Xe,Yi,Ye,Ze,Zi,et,tt,er,nt,it,tr,rt,at,nr,st,ot,ir,ut,lt,vi,wi,_i,Ai,ki;for(j=0;j<48;j+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],X=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],pt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Hi=f[7]^f[17]^f[27]^f[37]^f[47],Pe=f[8]^f[18]^f[28]^f[38]^f[48],Ne=f[9]^f[19]^f[29]^f[39]^f[49],P=Pe^(X<<1|Q>>>31),D=Ne^(Q<<1|X>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(pt<<1|Z>>>31),D=ee^(Z<<1|pt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=X^(de<<1|Hi>>>31),D=Q^(Hi<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=pt^(Pe<<1|Ne>>>31),D=Z^(Ne<<1|Pe>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Hi^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,qi=f[0],De=f[1],tt=f[11]<<4|f[10]>>>28,er=f[10]<<4|f[11]>>>28,qe=f[20]<<3|f[21]>>>29,Ji=f[21]<<3|f[20]>>>29,wi=f[31]<<9|f[30]>>>23,_i=f[30]<<9|f[31]>>>23,Ye=f[40]<<18|f[41]>>>14,Ze=f[41]<<18|f[40]>>>14,Ke=f[2]<<1|f[3]>>>31,Qi=f[3]<<1|f[2]>>>31,Oe=f[13]<<12|f[12]>>>20,Gi=f[12]<<12|f[13]>>>20,nt=f[22]<<10|f[23]>>>22,it=f[23]<<10|f[22]>>>22,Ge=f[33]<<13|f[32]>>>19,ze=f[32]<<13|f[33]>>>19,Ai=f[42]<<2|f[43]>>>30,ki=f[43]<<2|f[42]>>>30,st=f[5]<<30|f[4]>>>2,ot=f[4]<<30|f[5]>>>2,Je=f[14]<<6|f[15]>>>26,$e=f[15]<<6|f[14]>>>26,Be=f[25]<<11|f[24]>>>21,Fe=f[24]<<11|f[25]>>>21,tr=f[34]<<15|f[35]>>>17,rt=f[35]<<15|f[34]>>>17,$i=f[45]<<29|f[44]>>>3,We=f[44]<<29|f[45]>>>3,je=f[6]<<28|f[7]>>>4,Ve=f[7]<<28|f[6]>>>4,ir=f[17]<<23|f[16]>>>9,ut=f[16]<<23|f[17]>>>9,Xi=f[26]<<25|f[27]>>>7,Qe=f[27]<<25|f[26]>>>7,zi=f[36]<<21|f[37]>>>11,Le=f[37]<<21|f[36]>>>11,at=f[47]<<24|f[46]>>>8,nr=f[46]<<24|f[47]>>>8,Zi=f[8]<<27|f[9]>>>5,et=f[9]<<27|f[8]>>>5,Ki=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,lt=f[29]<<7|f[28]>>>25,vi=f[28]<<7|f[29]>>>25,Xe=f[38]<<8|f[39]>>>24,Yi=f[39]<<8|f[38]>>>24,Ue=f[48]<<14|f[49]>>>18,Wi=f[49]<<14|f[48]>>>18,f[0]=qi^~Oe&Be,f[1]=De^~Gi&Fe,f[10]=je^~Ki&qe,f[11]=Ve^~He&Ji,f[20]=Ke^~Je&Xi,f[21]=Qi^~$e&Qe,f[30]=Zi^~tt&nt,f[31]=et^~er&it,f[40]=st^~ir<,f[41]=ot^~ut&vi,f[2]=Oe^~Be&zi,f[3]=Gi^~Fe&Le,f[12]=Ki^~qe&Ge,f[13]=He^~Ji&ze,f[22]=Je^~Xi&Xe,f[23]=$e^~Qe&Yi,f[32]=tt^~nt&tr,f[33]=er^~it&rt,f[42]=ir^~lt&wi,f[43]=ut^~vi&_i,f[4]=Be^~zi&Ue,f[5]=Fe^~Le&Wi,f[14]=qe^~Ge&$i,f[15]=Ji^~ze&We,f[24]=Xi^~Xe&Ye,f[25]=Qe^~Yi&Ze,f[34]=nt^~tr&at,f[35]=it^~rt&nr,f[44]=lt^~wi&Ai,f[45]=vi^~_i&ki,f[6]=zi^~Ue&qi,f[7]=Le^~Wi&De,f[16]=Ge^~$i&je,f[17]=ze^~We&Ve,f[26]=Xe^~Ye&Ke,f[27]=Yi^~Ze&Qi,f[36]=tr^~at&Zi,f[37]=rt^~nr&et,f[46]=wi^~Ai&st,f[47]=_i^~ki&ot,f[8]=Ue^~qi&Oe,f[9]=Wi^~De&Gi,f[18]=$i^~je&Ki,f[19]=We^~Ve&He,f[28]=Ye^~Ke&Je,f[29]=Ze^~Qi&$e,f[38]=at^~Zi&tt,f[39]=nr^~et&er,f[48]=Ai^~st&ir,f[49]=ki^~ot&ut,f[0]^=S[j],f[1]^=S[j+1]};if(s)Qs.exports=u;else{for(x=0;x{uy.exports=oy;function oy(i,e){if(!i)throw new Error(e||"Assertion failed")}oy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var ly=ie((p3,Pl)=>{typeof Object.create=="function"?Pl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var kn=ie(Re=>{"use strict";var K6=ia(),J6=ly();Re.inherits=J6;function $6(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function Q6(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):$6(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Re.htonl=dy;function Y6(i,e){for(var t="",n=0;n>>0}return a}Re.join32=Z6;function e2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Re.split32=e2;function t2(i,e){return i>>>e|i<<32-e}Re.rotr32=t2;function n2(i,e){return i<>>32-e}Re.rotl32=n2;function i2(i,e){return i+e>>>0}Re.sum32=i2;function r2(i,e,t){return i+e+t>>>0}Re.sum32_3=r2;function a2(i,e,t,n){return i+e+t+n>>>0}Re.sum32_4=a2;function s2(i,e,t,n,r){return i+e+t+n+r>>>0}Re.sum32_5=s2;function o2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Re.sum64=o2;function u2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Re.sum64_hi=u2;function l2(i,e,t,n){var r=e+n;return r>>>0}Re.sum64_lo=l2;function d2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Re.sum64_4_hi=d2;function p2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Re.sum64_4_lo=p2;function y2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Re.sum64_5_hi=y2;function c2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Re.sum64_5_lo=c2;function f2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Re.rotr64_hi=f2;function m2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.rotr64_lo=m2;function h2(i,e,t){return i>>>t}Re.shr64_hi=h2;function b2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Re.shr64_lo=b2});var ra=ie(fy=>{"use strict";var cy=kn(),x2=ia();function xo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}fy.BlockHash=xo;xo.prototype.update=function(e,t){if(e=cy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=cy.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var g2=kn(),Hn=g2.rotr32;function T2(i,e,t,n){if(i===0)return my(e,t,n);if(i===1||i===3)return by(e,t,n);if(i===2)return hy(e,t,n)}li.ft_1=T2;function my(i,e,t){return i&e^~i&t}li.ch32=my;function hy(i,e,t){return i&e^i&t^e&t}li.maj32=hy;function by(i,e,t){return i^e^t}li.p32=by;function v2(i){return Hn(i,2)^Hn(i,13)^Hn(i,22)}li.s0_256=v2;function w2(i){return Hn(i,6)^Hn(i,11)^Hn(i,25)}li.s1_256=w2;function _2(i){return Hn(i,7)^Hn(i,18)^i>>>3}li.g0_256=_2;function A2(i){return Hn(i,17)^Hn(i,19)^i>>>10}li.g1_256=A2});var Ty=ie((m3,gy)=>{"use strict";var aa=kn(),k2=ra(),M2=Nl(),Dl=aa.rotl32,Qa=aa.sum32,E2=aa.sum32_5,C2=M2.ft_1,xy=k2.BlockHash,I2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;xy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}aa.inherits(qn,xy);gy.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var sa=kn(),S2=ra(),oa=Nl(),R2=ia(),Mn=sa.sum32,P2=sa.sum32_4,N2=sa.sum32_5,D2=oa.ch32,O2=oa.maj32,B2=oa.s0_256,F2=oa.s1_256,L2=oa.g0_256,U2=oa.g1_256,vy=S2.BlockHash,j2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;vy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=j2,this.W=new Array(64)}sa.inherits(Gn,vy);wy.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var Bl=kn(),_y=Ol();function di(){if(!(this instanceof di))return new di;_y.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Bl.inherits(di,_y);Ay.exports=di;di.blockSize=512;di.outSize=224;di.hmacStrength=192;di.padLength=64;di.prototype._digest=function(e){return e==="hex"?Bl.toHex32(this.h.slice(0,7),"big"):Bl.split32(this.h.slice(0,7),"big")}});var Ul=ie((x3,Iy)=>{"use strict";var Qt=kn(),V2=ra(),H2=ia(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,My=Qt.shr64_hi,Ey=Qt.shr64_lo,Si=Qt.sum64,Fl=Qt.sum64_hi,Ll=Qt.sum64_lo,q2=Qt.sum64_4_hi,G2=Qt.sum64_4_lo,z2=Qt.sum64_5_hi,W2=Qt.sum64_5_lo,Cy=V2.BlockHash,K2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;Cy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=K2,this.W=new Array(160)}Qt.inherits(En,Cy);Iy.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var jl=kn(),Sy=Ul();function pi(){if(!(this instanceof pi))return new pi;Sy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}jl.inherits(pi,Sy);Ry.exports=pi;pi.blockSize=1024;pi.outSize=384;pi.hmacStrength=192;pi.padLength=128;pi.prototype._digest=function(e){return e==="hex"?jl.toHex32(this.h.slice(0,12),"big"):jl.split32(this.h.slice(0,12),"big")}});var Ny=ie(ua=>{"use strict";ua.sha1=Ty();ua.sha224=ky();ua.sha256=Ol();ua.sha384=Py();ua.sha512=Ul()});var Uy=ie(Ly=>{"use strict";var dr=kn(),sb=ra(),go=dr.rotl32,Dy=dr.sum32,Xa=dr.sum32_3,Oy=dr.sum32_4,Fy=sb.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;Fy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}dr.inherits(Kn,Fy);Ly.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Dy(go(Oy(n,By(_,r,a,s),e[lb[_]+t],ob(_)),pb[_]),o);n=o,o=s,s=go(a,10),a=r,r=v,v=Dy(go(Oy(d,By(79-_,p,c,b),e[db[_]+t],ub(_)),yb[_]),I),d=I,I=b,b=go(c,10),c=p,p=v}v=Xa(this.h[1],a,b),this.h[1]=Xa(this.h[2],s,I),this.h[2]=Xa(this.h[3],o,d),this.h[3]=Xa(this.h[4],n,p),this.h[4]=Xa(this.h[0],r,c),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?dr.toHex32(this.h,"little"):dr.split32(this.h,"little")};function By(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function ob(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function ub(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var lb=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],db=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],pb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],yb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Vy=ie((w3,jy)=>{"use strict";var cb=kn(),fb=ia();function la(i,e,t){if(!(this instanceof la))return new la(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(cb.toArray(e,t))}jy.exports=la;la.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),fb(e.length<=this.blockSize);for(var t=e.length;t{var Rt=Hy;Rt.utils=kn();Rt.common=ra();Rt.sha=Ny();Rt.ripemd=Uy();Rt.hmac=Vy();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var sd=ie((ad,hc)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var A=0;A255)return!1;return!0}function n(h,A){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return A&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,A,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),A.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:A}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+A[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var A=[],g=0;g>2,this._Ke[G][A%4]=m[A],this._Kd[h-G][A%4]=m[A];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var A=1;A>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var A=l/2+1;A>2,K=P%4,this._Ke[j][K]=m[A],this._Kd[h-j][K]=m[A++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var A=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[A][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var A=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^H[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[A][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var A=r(h.length),g=r(16),l=0;l=0;--A)this._counter[A]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,A){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",A instanceof u||(A=new u(A)),this._counter=A,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var A=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-A,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let k=S,h=L,A=O,g=U,l=H,m=E,G=J,f=$,P,D,j,K,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((k>>>2|k<<32-2)^(k>>>13|k<<32-13)^(k>>>22|k<<32-22))+(k&h^k&A^h&A)|0,f=G,G=m,m=l,l=g+K|0,g=A,A=h,h=k,k=K+ee|0;S=S+k|0,L=L+h|0,O=O+A|0,U=U+g|0,H=H+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&A(g)};if(!H)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof pd<"u"?xc.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(pd)});var qc=ie((p4,Hc)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hd={};for(os=0;os>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function jc(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=xa(e)^n>>5}for(e=xa(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=jc(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=xa(n)^s,r+=qo.charAt(s)}for(a=0;a<6;++a)n=xa(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=qo.charAt(o)}return r}function Vc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=jc(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function Yb(){var i=Vc.apply(null,arguments);if(typeof i=="object")return i}function Zb(i){var e=Vc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof zd=="object"&&typeof Wd<"u"?Wd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(zd,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var Kd=ie(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Ss=ie((Ak,um)=>{um.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $d=ie(Li=>{var ke=Ss(),Jd=()=>[{type:ke.RANGE,from:48,to:57}],lm=()=>[{type:ke.CHAR,value:95},{type:ke.RANGE,from:97,to:122},{type:ke.RANGE,from:65,to:90}].concat(Jd()),dm=()=>[{type:ke.CHAR,value:9},{type:ke.CHAR,value:10},{type:ke.CHAR,value:11},{type:ke.CHAR,value:12},{type:ke.CHAR,value:13},{type:ke.CHAR,value:32},{type:ke.CHAR,value:160},{type:ke.CHAR,value:5760},{type:ke.RANGE,from:8192,to:8202},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233},{type:ke.CHAR,value:8239},{type:ke.CHAR,value:8287},{type:ke.CHAR,value:12288},{type:ke.CHAR,value:65279}],H5=()=>[{type:ke.CHAR,value:10},{type:ke.CHAR,value:13},{type:ke.CHAR,value:8232},{type:ke.CHAR,value:8233}];Li.words=()=>({type:ke.SET,set:lm(),not:!1});Li.notWords=()=>({type:ke.SET,set:lm(),not:!0});Li.ints=()=>({type:ke.SET,set:Jd(),not:!1});Li.notInts=()=>({type:ke.SET,set:Jd(),not:!0});Li.whitespace=()=>({type:ke.SET,set:dm(),not:!1});Li.notWhitespace=()=>({type:ke.SET,set:dm(),not:!0});Li.anyChar=()=>({type:ke.SET,set:H5(),not:!0})});var ym=ie(Rs=>{var pm=Ss(),Ia=$d(),q5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",G5={0:0,t:9,n:10,v:11,f:12,r:13};Rs.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?q5.indexOf(d):G5[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Rs.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Ia.words());else if(r[2])t.push(Ia.ints());else if(r[3])t.push(Ia.whitespace());else if(r[4])t.push(Ia.notWords());else if(r[5])t.push(Ia.notInts());else if(r[6])t.push(Ia.notWhitespace());else if(r[7])t.push({type:pm.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:pm.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Rs.error(e,"Unterminated character class")};Rs.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var cm=ie(Ps=>{var uu=Ss();Ps.wordBoundary=()=>({type:uu.POSITION,value:"b"});Ps.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Ps.begin=()=>({type:uu.POSITION,value:"^"});Ps.end=()=>({type:uu.POSITION,value:"$"})});var fm=ie((Ck,Qd)=>{var Sa=ym(),bn=Ss(),wr=$d(),lu=cm();Qd.exports=i=>{var e=0,t,n,r={type:bn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Sa.error(i,`Nothing to repeat at column ${O-1}`)},p=Sa.strToChars(i);for(t=p.length;e{"use strict";var xn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new xn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};mm.exports=Ui});var xm=ie((Sk,bm)=>{var du=fm(),Ns=hm(),_r=du.types;bm.exports=class Ds{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=du(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ds.prototype.max!=null?Ds.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case _r.ROOT:case _r.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var z5=Ar&&Ar.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.RandomGenerator=void 0;var W5=z5(xm()),K5;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new W5.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(K5=Ar.RandomGenerator||(Ar.RandomGenerator={}))});var Os=ie(Ra=>{"use strict";var J5=Ra&&Ra.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.TypeGuardError=void 0;var $5=function(i){J5(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);Ra.TypeGuardError=$5});var Tm=ie(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var Q5=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};pu.$any=Q5});var vm=ie(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var X5=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$guard=void 0;var Y5=Os(),Z5=function(i){return function(e,t){if(e===!0)throw new Y5.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};cu.$guard=Z5});var _m=ie(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_between=void 0;var e1=function(i,e,t){return e<=i&&i<=t};fu.$is_between=e1});var Am=ie(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var t1=Kd(),n1=function(i,e,t,n){var r,a=(r=t1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};mu.$is_custom=n1});var km=ie(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var i1=function(i){return r1.test(i)};hu.$is_date=i1;var r1=/^(\d{4})-(\d{2})-(\d{2})$/});var Mm=ie(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_datetime=void 0;var a1=function(i){return!isNaN(new Date(i).getTime())};bu.$is_datetime=a1});var Em=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_email=void 0;var s1=function(i){return o1.test(i)};xu.$is_email=s1;var o1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Cm=ie(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var u1=function(i){return l1.test(i)};gu.$is_ipv4=u1;var l1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Im=ie(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var d1=function(i){return p1.test(i)};Tu.$is_ipv6=d1;var p1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Sm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var y1=function(i){return c1.test(i)};vu.$is_url=y1;var c1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Rm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var f1=function(i){return m1.test(i)};wu.$is_uuid=f1;var m1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Pm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var h1=function(i){return b1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};_u.$join=h1;var b1=function(i){return x1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},x1=function(i){return g1.has(i)},g1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Nm=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$number=void 0;var T1=Os(),v1=function(i){if(isFinite(i)===!1)throw new T1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Au.$number=v1});var Dm=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$report=void 0;var w1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};ku.$report=w1});var Om=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var _1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Mu.$rest=_1});var Bm=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var A1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Eu.$string=A1});var Fm=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$tail=void 0;var k1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Cu.$tail=k1});var Vm=ie(kr=>{"use strict";var jt=kr&&kr.__assign||function(){return jt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return jt(jt({},i.is()),{number:L1.$number,string:V1.$string,tail:H1.$tail,rest:j1.$rest,throws:e(t)})},i.clone=function(t){return jt(jt({},i.is()),{throws:e(t),any:M1.$any})},i.prune=function(t){return jt(jt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Lm.RandomGenerator,pick:Lm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Um.TypeGuardError(jt(jt({},n),{method:"typia.".concat(t)}))}}})(q1=kr.Namespace||(kr.Namespace={}))});var Hm=ie(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.MapUtil=void 0;var G1;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(G1=Bs.MapUtil||(Bs.MapUtil={}))});var Gm=ie(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Wm=ie(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ie(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var Qm=ie($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var Ym=ie(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ie(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var lp=ie(z=>{"use strict";var z1=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Mr=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&z1(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pa=Kd(),Me=Vm(),W1=Hm();Mr(Gm(),z);Mr(Wm(),z);Mr(Jm(),z);Mr(Qm(),z);Mr(Ym(),z);Mr(eh(),z);Mr(Os(),z);function Xd(){ae("assert")}z.assert=Xd;Object.assign(Xd,Me.Namespace.assert("assert"));function Yd(){ae("assertType")}z.assertType=Yd;Object.assign(Yd,Me.Namespace.assert("assertType"));function Iu(){ae("is")}z.is=Iu;Object.assign(Iu,Me.Namespace.assert("is"));function Su(){ae("validate")}z.validate=Su;Object.assign(Su,Me.Namespace.validate());function Zd(){ae("assertEquals")}z.assertEquals=Zd;Object.assign(Zd,Me.Namespace.assert("assertEquals"));function ep(){ae("equals")}z.equals=ep;Object.assign(ep,Me.Namespace.is());function tp(){ae("validateEquals")}z.validateEquals=tp;Object.assign(tp,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Pa.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pa.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=W1.MapUtil.take(Pa.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Pa.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function K1(){ae("application")}z.application=K1;function np(){ae("assertParse")}z.assertParse=np;Object.assign(np,Me.Namespace.assert("assertParse"));function ip(){ae("isParse")}z.isParse=ip;Object.assign(ip,Iu);function rp(){ae("validateParse")}z.validateParse=rp;Object.assign(rp,Su);function ap(){ae("stringify")}z.stringify=ap;Object.assign(ap,Me.Namespace.stringify("stringify"));function Ru(){ae("assertStringify")}z.assertStringify=Ru;Object.assign(Ru,Me.Namespace.assert("assertStringify"));Object.assign(Ru,Me.Namespace.stringify("assertStringify"));function Pu(){ae("isStringify")}z.isStringify=Pu;Object.assign(Pu,Me.Namespace.is());Object.assign(Pu,Me.Namespace.stringify("isStringify"));function Nu(){ae("validateStringify")}z.validateStringify=Nu;Object.assign(Nu,Me.Namespace.validate());Object.assign(Nu,Me.Namespace.stringify("validateStringify"));function J1(){ae("metadata")}z.metadata=J1;function sp(){ae("random")}z.random=sp;Object.assign(sp,Me.Namespace.random());function $1(){ae("literals")}z.literals=$1;function op(){ae("clone")}z.clone=op;Object.assign(op,Me.Namespace.clone("clone"));function Du(){ae("assertClone")}z.assertClone=Du;Object.assign(Du,Me.Namespace.assert("assertClone"));Object.assign(Du,Me.Namespace.clone("assertClone"));function Ou(){ae("isClone")}z.isClone=Ou;Object.assign(Ou,Me.Namespace.is());Object.assign(Ou,Me.Namespace.clone("isClone"));function Bu(){ae("validateClone")}z.validateClone=Bu;Object.assign(Bu,Me.Namespace.validate());Object.assign(Bu,Me.Namespace.clone("validateClone"));function up(){ae("prune")}z.prune=up;Object.assign(up,Me.Namespace.prune("prune"));function Fu(){ae("assertPrune")}z.assertPrune=Fu;Object.assign(Fu,Me.Namespace.assert("assertPrune"));Object.assign(Fu,Me.Namespace.prune("assertPrune"));function Lu(){ae("isPrune")}z.isPrune=Lu;Object.assign(Lu,Me.Namespace.is());Object.assign(Lu,Me.Namespace.prune("isPrune"));function Uu(){ae("validatePrune")}z.validatePrune=Uu;Object.assign(Uu,Me.Namespace.prune("validatePrune"));Object.assign(Uu,Me.Namespace.validate());function th(){ae("createAssert")}z.createAssert=th;Object.assign(th,Xd);function nh(){ae("createAssertType")}z.createAssertType=nh;Object.assign(nh,Yd);function ih(){ae("createIs")}z.createIs=ih;Object.assign(ih,Iu);function rh(){ae("createValidate")}z.createValidate=rh;Object.assign(rh,Su);function ah(){ae("createAssertEquals")}z.createAssertEquals=ah;Object.assign(ah,Zd);function sh(){ae("createEquals")}z.createEquals=sh;Object.assign(sh,ep);function oh(){ae("createValidateEquals")}z.createValidateEquals=oh;Object.assign(oh,tp);function uh(){ae("createIsParse")}z.createIsParse=uh;Object.assign(uh,ip);function lh(){ae("createAssertParse")}z.createAssertParse=lh;Object.assign(lh,np);function dh(){ae("createValidateParse")}z.createValidateParse=dh;Object.assign(dh,rp);function ph(){ae("createStringify")}z.createStringify=ph;Object.assign(ph,ap);function yh(){ae("createAssertStringify")}z.createAssertStringify=yh;Object.assign(yh,Ru);function ch(){ae("createIsStringify")}z.createIsStringify=ch;Object.assign(ch,Pu);function fh(){ae("createValidateStringify")}z.createValidateStringify=fh;Object.assign(fh,Nu);function mh(){ae("createRandom")}z.createRandom=mh;Object.assign(mh,sp);function hh(){ae("createClone")}z.createClone=hh;Object.assign(hh,op);function bh(){ae("createAssertClone")}z.createAssertClone=bh;Object.assign(bh,Du);function xh(){ae("createIsClone")}z.createIsClone=xh;Object.assign(xh,Ou);function gh(){ae("createValidateClone")}z.createValidateClone=gh;Object.assign(gh,Bu);function Th(){ae("createPrune")}z.createPrune=Th;Object.assign(Th,up);function vh(){ae("createAssertPrune")}z.createAssertPrune=vh;Object.assign(vh,Fu);function wh(){ae("createIsPrune")}z.createIsPrune=wh;Object.assign(wh,Lu);function _h(){ae("createValidatePrune")}z.createValidatePrune=_h;Object.assign(_h,Uu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var kh=ie(gn=>{"use strict";var Ah=gn&&gn.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Q1=gn&&gn.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),X1=gn&&gn.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Ah(e,i,t);return Q1(e,i),e},Y1=gn&&gn.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ah(e,i,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Z1=X1(lp());gn.default=Z1;Y1(lp(),gn)});var Rd={};Hr(Rd,{BaseContract:()=>pa,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>fr,FixedNumber:()=>yt,Signer:()=>St,VoidSigner:()=>ui,Wallet:()=>In,Wordlist:()=>hn,constants:()=>mt,errors:()=>Wt,getDefaultProvider:()=>tu,logger:()=>kf,providers:()=>ei,utils:()=>ne,version:()=>iu,wordlists:()=>hr});var e0=_n(al());var qp="logger/5.7.0";var Gp=!1,zp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},Wp=zs.default,sl=null;function qh(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var Kp=qh(),ol;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(ol||(ol={}));var Wt;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();zs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>zs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=Jp[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Kp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Kp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return sl||(sl=new M(qp)),sl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Wp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=ol;var $p="bytes/5.7.0";var vt=new M($p);function Xp(i){return!!i.toHexString}function qr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return qr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function ii(i){return re(i)&&!(i.length%2)||on(i)}function Qp(i){return typeof i=="number"&&i==i&&i%1===0}function on(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!Qp(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),qr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Xp(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":vt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),qr(n)}function Zt(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&vt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),qr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var ul="0123456789abcdef";function W(i,e){if(e||(e={}),typeof i=="number"){vt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=ul[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),Xp(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":vt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(on(i)){let t="0x";for(let n=0;n>4]+ul[r&15]}return t}return vt.throwArgumentError("invalid hexlify value","value",i)}function Nt(i){if(typeof i!="string")i=W(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ee(i,e,t){return typeof i!="string"?i=W(i):(!re(i)||i.length%2)&&vt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function _t(i){let e="0x";return i.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(i){let e=ll(W(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function ll(i){typeof i!="string"&&(i=W(i)),re(i)||vt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&vt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function Un(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ii(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):vt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:vt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=rr(V(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&vt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?vt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&vt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?vt.throwArgumentError("signature missing or invalid r","signature",i):e.r=me(e.r,32),e.s==null||!re(e.s)?vt.throwArgumentError("signature missing or invalid s","signature",i):e.s=me(e.s,32);let t=V(e.s);t[0]>=128&&vt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(re(e._vs)||vt.throwArgumentError("signature invalid _vs","signature",i),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&vt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fa(i){return i=Un(i),W(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var La=e0.default.BN,ri=new M(Ws),dl={},Yp=9007199254740991;function t0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||on(i))}var Zp=!1,F=class{constructor(e,t){e!==dl&&ri.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ri.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zp||(Zp=!0,ri.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ri.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ri.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(dl,Ua(e)):e.match(/^-?[0-9]+$/)?new F(dl,Ua(new La(e))):ri.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Yp||e<=-Yp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return ri.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ua(i){if(typeof i!="string")return Ua(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ri.throwArgumentError("invalid hex","value",i),i=Ua(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Kt(i){return F.from(Ua(i))}function be(i){let e=F.from(i).toHexString();return e[0]==="-"?new La("-"+e.substring(3),16):new La(e.substring(2),16)}function un(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ri.throwError(i,M.errors.NUMERIC_FAULT,n)}function pl(i){return new La(i,36).toString(16)}function yl(i){return new La(i,16).toString(36)}var Vt=new M(Ws),ja={},i0=F.from(0),r0=F.from(-1);function a0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),Vt.throwError(i,M.errors.NUMERIC_FAULT,r)}var Va="0";for(;Va.length<256;)Va+=Va;function cl(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Va.substring(0,i):Vt.throwArgumentError("invalid decimal size","decimals",i)}function Gr(i,e){e==null&&(e=0);let t=cl(e);i=F.from(i);let n=i.lt(i0);n&&(i=i.mul(r0));let r=i.mod(t).toString();for(;r.length2&&Vt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&a0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new ai(ja,t,n,r)}},yt=class{constructor(e,t,n,r){e!==ja&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),n=ln(e._value,e.format.decimals);return yt.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(n0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=yt.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(n0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=yt.from("1"+Va.substring(0,e),this.format),r=Gh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return yt.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!t0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),yt.fromString(Gr(e,t),ai.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ai.from(t),r=ln(e,n.decimals);!n.signed&&r.lt(i0)&&a0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=me(a,n.width/8));let s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ai.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gr(r,n.decimals);return new yt(ja,a,s,n)}static from(e,t){if(typeof e=="string")return yt.fromString(e,t);if(on(e))return yt.fromBytes(e,t);try{return yt.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},n0=yt.from(1),Gh=yt.from("0.5");var s0="properties/5.7.0";var zh=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ks=new M(s0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function ft(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ce(i){return zh(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function zr(i,e){(!i||typeof i!="object")&&Ks.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||Ks.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var Wh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function o0(i){if(i==null||Wh[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tct(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ct(n))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ct(i){return Kh(i)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var jn="abi/5.7.0";var ge=new M(jn),ar={},u0={calldata:!0,memory:!0,storage:!0},Jh={calldata:!0,memory:!0};function Js(i,e){if(i==="bytes"||i==="string"){if(u0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&Jh[e])return!0;return(u0[e]||e==="payable")&&ge.throwArgumentError("invalid modifier","name",e),!1}function $h(i,e){let t=i;function n(o){ge.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?dt.fromString(e,t):dt.fromObject(e)}static fromObject(e){return dt.isParamType(e)?e:new dt(ar,{name:e.name||null,type:Wr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(dt.fromObject):null})}static fromString(e,t){function n(r){return dt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n($h(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Ha(i,e){return Yh(i).map(t=>dt.fromString(t,e))}var qt=class{constructor(e,t){e!==ar&&ge.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),$s(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&ge.throwArgumentError("invalid event object","value",e);let t={name:qa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dt.fromObject):[],type:"event"};return new Ht(ar,t)}static fromString(e){let t=e.match(Ga);t||ge.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:ge.warn("unknown modifier: "+r)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Ha(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function d0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&ge.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||ge.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function p0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function y0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ge.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e}var Dt=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&ge.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&ge.throwArgumentError("invalid constructor object","value",e);let t=y0(e);t.constant&&ge.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ar,n)}static fromString(e){let t={type:"constructor"};e=d0(e,t);let n=e.match(Ga);return(!n||n[1].trim()!=="constructor")&&ge.throwArgumentError("invalid constructor string","value",e),t.inputs=Ha(n[2].trim(),!1),p0(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&ge.throwArgumentError("invalid function object","value",e);let t=y0(e),n={type:e.type,name:qa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(dt.fromObject):[],outputs:e.outputs?e.outputs.map(dt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ar,n)}static fromString(e){let t={type:"function"};e=d0(e,t);let n=e.split(" returns ");n.length>2&&ge.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ga);if(r||ge.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&qa(t.name),t.inputs=Ha(r[2],!1),p0(r[3].trim(),t),n.length>1){let a=n[1].match(Ga);(a[1].trim()!=""||a[3].trim()!="")&&ge.throwArgumentError("unexpected tokens","value",e),t.outputs=Ha(a[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function l0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var tn=class extends qt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&ge.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qa(e.name),inputs:e.inputs?e.inputs.map(dt.fromObject):[]};return l0(new tn(ar,t))}static fromString(e){let t={type:"error"},n=e.match(Ga);return n||ge.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qa(t.name),t.inputs=Ha(n[2],!1),l0(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Wr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var Xh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qa(i){return(!i||!i.match(Xh))&&ge.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ga=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Yh(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&fl.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},or=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):or.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:fl.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new or(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var f0=_n(c0());function ce(i){return"0x"+f0.default.keccak_256(V(i))}var Xs={};Hr(Xs,{decode:()=>za,encode:()=>si});var m0="rlp/5.7.0";var Vn=new M(m0);function h0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function b0(i,e,t){let n=0;for(let r=0;re+1+n&&Vn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function T0(i,e){if(i.length===0&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&Vn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=b0(i,e+1,t);return e+1+t+n>i.length&&Vn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),x0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),x0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=b0(i,e+1,t);e+1+t+n>i.length&&Vn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=W(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&Vn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(i[e])}}function za(i){let e=V(i),t=T0(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",i),t.result}var v0="address/5.7.0";var Mi=new M(v0);function w0(i){re(i,20)||Mi.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var Zh=9007199254740991;function e6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var ml={};for(let i=0;i<10;i++)ml[String(i)]=String(i);for(let i=0;i<26;i++)ml[String.fromCharCode(65+i)]=String(10+i);var _0=Math.floor(e6(Zh));function A0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>ml[n]).join("");for(;e.length>=_0;){let n=e.substring(0,_0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Mi.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=w0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Mi.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==A0(i)&&Mi.throwArgumentError("bad icap checksum","address",i),e=pl(i.substring(4));e.length<40;)e="0"+e;e=w0("0x"+e)}else Mi.throwArgumentError("invalid address","address",i);return e}function k0(i){try{return fe(i),!0}catch{}return!1}function M0(i){let e=yl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+A0("XE00"+e)+e}function ur(i){let e=null;try{e=fe(i.from)}catch{Mi.throwArgumentError("missing from address","transaction",i)}let t=Zt(V(F.from(i.nonce).toHexString()));return fe(Ee(ce(si([e,t])),12))}function E0(i,e,t){return Nt(e)!==32&&Mi.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Mi.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ee(ce(ye(["0xff",fe(i),e,t])),12))}var Ys=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var Zs=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Jr=new M(jn);function hl(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Jr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Jr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Jr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Jr.throwArgumentError("types/value length mismatch","tuple",t);let r=new sr(i.wordSize),a=new sr(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function bl(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var eo=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Jr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rao,EtherSymbol:()=>P0,HashZero:()=>Qr,MaxInt256:()=>R0,MaxUint256:()=>uo,MinInt256:()=>S0,NegativeOne:()=>so,One:()=>oo,Two:()=>C0,WeiPerEther:()=>I0,Zero:()=>$r});var ao="0x0000000000000000000000000000000000000000";var so=F.from(-1),$r=F.from(0),oo=F.from(1),C0=F.from(2),I0=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),S0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),R0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qr="0x0000000000000000000000000000000000000000000000000000000000000000";var P0="\u039E";var lo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=uo.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(n.lt($r)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var N0="strings/5.7.0";var D0=new M(N0),Gt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(Bt||(Bt={}));function t6(i,e,t,n,r){return D0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function O0(i,e,t,n,r){if(i===Bt.BAD_PREFIX||i===Bt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===Bt.OVERRUN?t.length-e-1:0}function n6(i,e,t,n,r){return i===Bt.OVERLONG?(n.push(r),0):(n.push(65533),O0(i,e,t,n,r))}var po=Object.freeze({error:t6,ignore:O0,replace:n6});function gl(i,e){e==null&&(e=po.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(Bt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(Bt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(Bt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function Te(i,e=Gt.current){e!=Gt.current&&(D0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function xl(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function Tl(i,e){return'"'+gl(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?xl(t):(t-=65536,xl((t>>10&1023)+55296)+xl((t&1023)+56320))}).join("")+'"'}function yo(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(i,e){return yo(gl(i,e))}function Ei(i,e=Gt.current){return gl(Te(i,e))}function vl(i){let e=Te(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Qr]).slice(0,32))}function wl(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function i6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function B0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Al(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var r6=B0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),a6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),s6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],o6=_l("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),u6=_l("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l6=_l("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",i6),d6=B0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function p6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function y6(i){return!!Al(i,r6)}function c6(i){let e=Al(i,s6);if(e)return[i+e.s];let t=o6[i];if(t)return t;let n=u6[i];if(n)return[i+n[0]];let r=l6[i];return r||null}function f6(i){return!!Al(i,d6)}function kl(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Ei(i);e=p6(e.map(n=>{if(a6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=c6(n);return r||[n]})),e=Ei(yo(e),Gt.NFKC),e.forEach(n=>{if(f6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(y6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=yo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var co=class extends Wa{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Te(t))}decode(e){return Jt(super.decode(e))}};var lr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return hl(e,this.coders,t)}decode(e){return e.coerce(this.name,bl(e,this.coders))}};var fo=new M(jn),m6=new RegExp(/^bytes([0-9]*)$/),h6=new RegExp(/^(u?int)([0-9]*)$/),Xr=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ys(e.name);case"bool":return new to(e.name);case"string":return new co(e.name);case"bytes":return new no(e.name);case"array":return new eo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new lr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new ro(e.name)}let t=e.type.match(h6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&fo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(n/8,t[1]==="int",e.name)}if(t=e.type.match(m6),t){let n=parseInt(t[1]);return(n===0||n>32)&&fo.throwArgumentError("invalid bytes length","param",e),new io(n,e.name)}return fo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new or(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new sr(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(dt.from(r)));return new lr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&fo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(dt.from(s))),r=new lr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(dt.from(s)));return new lr(r,"_").decode(this._getReader(V(t),n))}},Ka=new Xr;function nn(i){return ce(Te(i))}var mo="hash/5.7.0";var Ml={};Hr(Ml,{decode:()=>Yr,encode:()=>Zr});function Yr(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function b6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function g6(i){let e=0;return()=>i[e++]}function U0(i){return g6(x6(i))}function T6(i){return i&1?~i>>1:i>>1}function v6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function j0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(A6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(k6(t,i))}return b6(L0(e))}function _6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function V0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function A6(i,e){let t=1+e(),n=e(),r=_6(e),a=V0(r.length,1+i,e);return L0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function k6(i,e){let t=1+e();return V0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function H0(i){let e=Ja(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=Ja(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function q0(){return U0(Yr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var ho=q0(),M6=new Set(Ja(ho)),E6=new Set(Ja(ho)),C6=j0(ho),I6=H0(ho),G0=45,z0=95;function W0(i){return Ei(i)}function S6(i){return i.filter(e=>e!=65039)}function K0(i){for(let e of i.split(".")){let t=W0(e);try{for(let n=t.lastIndexOf(z0)-1;n>=0;n--)if(t[n]!==z0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===G0&&t[3]===G0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function J0(i){return K0(R6(i,S6))}function R6(i,e){let t=W0(i).reverse(),n=[];for(;t.length;){let r=N6(t);if(r){n.push(...e(r));continue}let a=t.pop();if(M6.has(a)){n.push(a);continue}if(E6.has(a))continue;let s=C6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return K0(P6(String.fromCodePoint(...n)))}function P6(i){return i.normalize("NFC")}function N6(i,e){var t;let n=I6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var D6=new M(mo),Q0=new Uint8Array(32);Q0.fill(0);function $0(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function El(i){let e=Te(J0(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push($0(e.slice(n))),t}function Cl(i){try{return El(i).length!==0}catch{}return!1}function Ci(i){typeof i!="string"&&D6.throwArgumentError("invalid ENS name; not a string","name",i);let e=Q0,t=El(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function $a(i){return W(ye(El(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var X0=`Ethereum Signed Message: -`;function ea(i){return typeof i=="string"&&(i=Te(i)),ce(ye([Te(X0),Te(String(i.length)),i]))}var O6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ht=new M(mo),ty=new Uint8Array(32);ty.fill(0);var B6=F.from(-1),ny=F.from(0),iy=F.from(1),F6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function L6(i){let e=V(i),t=e.length%32;return t?_t([e,ty.slice(t)]):W(e)}var U6=me(iy.toHexString(),32),j6=me(ny.toHexString(),32),Y0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Il=["name","version","chainId","verifyingContract","salt"];function Z0(i){return function(e){return typeof e!="string"&&ht.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var V6={name:Z0("name"),version:Z0("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function Sl(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",i);let r=F6.mask(t?n-1:n),a=t?r.add(iy).mul(B6):ny;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&ht.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&ht.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&ht.throwArgumentError(`invalid length for ${i}`,"value",n),L6(n)}}}switch(i){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?U6:j6};case"bytes":return function(e){return ce(e)};case"string":return function(e){return nn(e)}}return null}function ey(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&ht.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Sl(c)&&(n[c]||ht.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?ht.throwArgumentError("missing primary type","types",e):a.length>1&&ht.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&ht.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=ey(o,e[o])+d.map(p=>ey(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=Sl(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(_t(d))}}let n=this.types[e];if(n){let r=nn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),_t(s)}}return ht.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||ht.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Sl(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):ht.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=Y0[n];r||ht.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Il.indexOf(n.name)-Il.indexOf(r.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return ce(bt.encode(e,t,n))}static resolveNames(e,t,n,r){return O6(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let r={},a=[];Il.forEach(d=>{let p=e[d];p!=null&&(r[d]=V6[d](p),a.push({name:d,type:Y0[d]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&ht.throwArgumentError("invalid string","value",p),p}return ht.throwArgumentError("unsupported type","type",d)})}}};var xt=new M(jn);var ta=class extends en{},na=class extends en{},Rl=class extends en{},oi=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},H6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ry(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Ii=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ft(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){xt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){xt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&&xt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Ka}static getAddress(e){return fe(e)}static getSighash(e){return Ee(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];xt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching function","name",n):r.length>1&&xt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];xt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching event","name",n):r.length>1&&xt.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Ht.fromString(e).format()];return t||xt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=ft(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}xt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?xt.throwArgumentError("no matching error","name",n):r.length>1&&xt.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ot.fromString(e).format()];return t||xt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ft(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ft(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&&xt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=H6[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return xt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&xt.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?nn(s):a.type==="bytes"?ce(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&&xt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&xt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(nn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&&xt.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(dt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new oi({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oi({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw ry(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw ry(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new na({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ta({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Rl({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var ay="abstract-provider/5.7.0";var q6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},G6=new M(ay),bo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){G6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return q6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var sy="abstract-signer/5.7.0";var An=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},dn=new M(sy),z6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],W6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){dn.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return An(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return An(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return An(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return An(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return An(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return An(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return An(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return An(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)z6.indexOf(n)===-1&&dn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&dn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return An(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>An(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&dn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?dn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&dn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&dn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):dn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(W6.indexOf(r.code)>=0)throw r;return dn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&dn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ce(t)})}_checkProvider(e){this.provider||dn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ui=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{dn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ui(this.address,e)}};var pe=_n(al()),Jn=_n(Vl());function da(i,e,t){return t={path:e,exports:{},require:function(n,r){return mb(n,r??t.path)}},i(t,t.exports),t.exports}function mb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zl=Gy;function Gy(i,e){if(!i)throw new Error(e||"Assertion failed")}Gy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Cn=da(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),wo=rn.getNAF,hb=rn.getJSF,_o=rn.assert;function Pi(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pr=Pi;Pi.prototype.point=function(){throw new Error("Not implemented")};Pi.prototype.validate=function(){throw new Error("Not implemented")};Pi.prototype._fixedNafMul=function(e,t){_o(e.precomputed);var n=e._getDoubles(),r=wo(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];_o(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Pi.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=wo(n[v],s[v],this._bitLength),d[S]=wo(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=hb(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};cn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};cn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};cn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};cn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Et.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(i,e,t,n){pr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wl(Pt,pr.BasePoint);cn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=da(function(i,e){"use strict";var t=e;t.base=pr,t.short=xb,t.mont=null,t.edwards=null}),vo=da(function(i,e){"use strict";var t=e,n=rn.assert;function r(o){o.type==="short"?this.curve=new To.short(o):o.type==="edwards"?this.curve=new To.edwards(o):this.curve=new To.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ri(i){if(!(this instanceof Ri))return new Ri(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Cn.toArray(i.entropy,i.entropyEnc||"hex"),t=Cn.toArray(i.nonce,i.nonceEnc||"hex"),n=Cn.toArray(i.pers,i.persEnc||"hex");zl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var zy=Ri;Ri.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ri.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=Cn.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var gb=rn.assert;function Ao(i,e){if(i instanceof Ao)return i;this._importDER(i,e)||(gb(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var ko=Ao;function Tb(){this.place=0}function Hl(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function qy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Ao.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=qy(t),n=qy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];ql(r,t.length),r=r.concat(t),r.push(2),ql(r,n.length);var a=r.concat(n),s=[48];return ql(s,a.length),s=s.concat(a),rn.encode(s,e)};var vb=function(){throw new Error("unsupported")},Wy=rn.assert;function pn(i){if(!(this instanceof pn))return new pn(i);typeof i=="string"&&(Wy(Object.prototype.hasOwnProperty.call(vo,i),"Unknown curve "+i),i=vo[i]),i instanceof vo.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var wb=pn;pn.prototype.keyPair=function(e){return new Kl(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Kl.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Kl.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new zy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||vb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new zy({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new ko({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new ko(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};pn.prototype.recoverPubKey=function(i,e,t,n){Wy((3&t)===t,"The recovery param is more than two bits"),e=new ko(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};pn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new ko(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var _b=da(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=rn,t.rand=function(){throw new Error("unsupported")},t.curve=To,t.curves=vo,t.ec=wb,t.eddsa=null}),Ky=_b.ec;var Jy="signing-key/5.7.0";var $l=new M(Jy),Jl=null;function $n(){return Jl||(Jl=new Ky("secp256k1")),Jl}var fn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&$l.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(V(this.publicKey)),n=$n().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&$l.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return Un({recoveryParam:r.recoveryParam,r:me("0x"+r.r.toString(16),32),s:me("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(V(this.privateKey)),n=$n().keyFromPublic(V(Ya(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(i,e){let t=Un(e),n={r:V(t.r),s:V(t.s)};return"0x"+$n().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function Ya(i,e){let t=V(i);if(t.length===32){let n=new fn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return $l.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $y="transactions/5.7.0";var Ut=new M($y),Eo;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xl(i){return i==="0x"?null:fe(i)}function Lt(i){return i==="0x"?$r:F.from(i)}var Ab=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],kb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(i){let e=Ya(i);return fe(Ee(ce(Ee(e,1)),12))}function yr(i,e){return mn(Mo(V(i),e))}function an(i,e){let t=Zt(F.from(i).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function Ql(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function sn(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Ql(t[0],t[1])):Ql(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return Ql(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Qy(i){return sn(i).map(e=>[e.address,e.storageKeys])}function Xy(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),an(i.maxFeePerGas||0,"maxFeePerGas"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Qy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x02",si(t)])}function Yy(i,e){let t=[an(i.chainId||0,"chainId"),an(i.nonce||0,"nonce"),an(i.gasPrice||0,"gasPrice"),an(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",an(i.value||0,"value"),i.data||"0x",Qy(i.accessList||[])];if(e){let n=Un(e);t.push(an(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return _t(["0x01",si(t)])}function Mb(i,e){zr(i,kb);let t=[];Ab.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!ii(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return si(t);let r=Un(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(Zt(V(r.r))),t.push(Zt(V(r.s))),si(t)}function Za(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),Mb(i,e);switch(i.type){case 1:return Yy(i,e);case 2:return Xy(i,e);default:break}return Ut.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function Zy(i,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=me(e[1],32),i.s=me(e[2],32);try{let n=ce(t(i));i.from=yr(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function Eb(i){let e=za(i.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(i));let t=Lt(e[2]),n=Lt(e[3]),r={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Xl(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(r.hash=ce(i),Zy(r,e.slice(9),Xy)),r}function Cb(i){let e=za(i.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(i));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Xl(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=ce(i),Zy(t,e.slice(8),Yy)),t}function Ib(i){let e=za(i);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Xl(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(si(r));try{t.from=yr(a,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function Co(i){let e=V(i);if(e[0]>127)return Ib(e);switch(e[0]){case 1:return Cb(e);case 2:return Eb(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ec="contracts/5.7.0";var Ni=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Ie=new M(ec),Sb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Io(i,e){return Ni(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Ie.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(i,e,t){return Ni(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>es(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield Io(i,e):t.type==="tuple"?yield es(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(i,n,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(i,e,t){return Ni(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ce({override:Io(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Ni(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=Io(i.provider,n.from));let r=yield Ce({args:es(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ce(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Ie.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function Rb(i,e){return function(...t){return Po(i,e,t)}}function Pb(i,e){let t=i.signer||i.provider;return function(...n){return Ni(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Po(i,e,n);return yield t.estimateGas(r)})}}function nc(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ct(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function ic(i,e,t){let n=i.signer||i.provider;return function(...r){return Ni(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Po(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function Nb(i,e){return function(...t){return Ni(this,void 0,void 0,function*(){i.signer||Ie.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Po(i,e,t),r=yield i.signer.sendTransaction(n);return nc(i,r),r})}}function tc(i,e,t){return e.constant?ic(i,e,t):Nb(i,e)}function rc(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var cr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Yl=class extends cr{constructor(){super("error",null)}},So=class extends cr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Ie.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(rc(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Kr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Ro=class extends cr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},pa=class{constructor(e,t,n){B(this,"interface",ft(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Ie.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Io(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,tc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,tc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,ic(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Rb(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Pb(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return ur(e)}static getInterface(e){return Ii.isInterface(e)?e:new Ii(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ui(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oi.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Yl);if(e==="event")return this._normalizeRunningEvent(new cr("event",null));if(e==="*")return this._normalizeRunningEvent(new Ro(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new So(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new So(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new cr(rc(t),t))}return this._normalizeRunningEvent(new Ro(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ct(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pa{},fr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:on(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Ie.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",ft(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!Sb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Ie.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ni(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=ft(this.constructor,"getContractAddress")(a),o=ft(this.constructor,"getContract")(s,this.interface,this.signer);return nc(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ur(e)}static getContract(e,t,n){return new oe(e,t,n)}};var No=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(ci(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var Bh=Object.create;var Gs=Object.defineProperty;var Fh=Object.getOwnPropertyDescriptor;var Lh=Object.getOwnPropertyNames;var Uh=Object.getPrototypeOf,Vh=Object.prototype.hasOwnProperty;var jh=(a,e,t)=>e in a?Gs(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Hi=(a,e)=>{for(var t in e)Gs(a,t,{get:e[t],enumerable:!0})},Hh=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Lh(e))!Vh.call(a,i)&&i!==t&&Gs(a,i,{get:()=>e[i],enumerable:!(n=Fh(e,i))||n.enumerable});return a};var _n=(a,e,t)=>(t=a!=null?Bh(Uh(a)):{},Hh(e||!a||!a.__esModule?Gs(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(jh(a,typeof e!="symbol"?e+"":e,t),t);var jp=ae(()=>{});var rd=ae((Hp,id)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=jp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var G=this.clone();for(G.negative=0;!G.isZero();){var c=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?b=c+b:b=x[d-c.length]+c+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,c=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=c;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[d]=G|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,G=w[0]|0,c=G&8191,P=G>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,le=yt>>>13,Ha=w[4]|0,Ne=Ha&8191,De=Ha>>>13,qa=w[5]|0,Oe=qa&8191,Be=qa>>>13,Ga=w[6]|0,Fe=Ga&8191,Le=Ga>>>13,za=w[7]|0,Ue=za&8191,Ve=za>>>13,Wa=w[8]|0,je=Wa&8191,He=Wa>>>13,Ka=w[9]|0,qe=Ka&8191,Ge=Ka>>>13,Ja=A[0]|0,ze=Ja&8191,We=Ja>>>13,$a=A[1]|0,Ke=$a&8191,Je=$a>>>13,Qa=A[2]|0,$e=Qa&8191,Qe=Qa>>>13,Xa=A[3]|0,Xe=Xa&8191,Ye=Xa>>>13,Ya=A[4]|0,Ze=Ya&8191,et=Ya>>>13,Za=A[5]|0,tt=Za&8191,nt=Za>>>13,ei=A[6]|0,at=ei&8191,it=ei>>>13,ti=A[7]|0,rt=ti&8191,st=ti>>>13,ni=A[8]|0,ot=ni&8191,ut=ni>>>13,ai=A[9]|0,dt=ai&8191,lt=ai>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,ze),d=Math.imul(c,We),d=d+Math.imul(P,ze)|0,m=Math.imul(P,We);var va=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul(V,ze),d=Math.imul(V,We),d=d+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var wa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(X,ze),d=Math.imul(X,We),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(V,Ke)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(c,$e)|0,d=d+Math.imul(c,Qe)|0,d=d+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var _a=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(Z,ze),d=Math.imul(Z,We),d=d+Math.imul(le,ze)|0,m=Math.imul(le,We),g=g+Math.imul(X,Ke)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(V,$e)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(c,Xe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ye)|0;var ka=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ka>>>26)|0,ka&=67108863,g=Math.imul(Ne,ze),d=Math.imul(Ne,We),d=d+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,Ke)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(X,$e)|0,d=d+Math.imul(X,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(c,Ze)|0,d=d+Math.imul(c,et)|0,d=d+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Aa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,g=Math.imul(Oe,ze),d=Math.imul(Oe,We),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(le,$e)|0,m=m+Math.imul(le,Qe)|0,g=g+Math.imul(X,Xe)|0,d=d+Math.imul(X,Ye)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(c,tt)|0,d=d+Math.imul(c,nt)|0,d=d+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Gu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,We),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,d=d+Math.imul(Ne,Qe)|0,d=d+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(X,Ze)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(V,tt)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(c,at)|0,d=d+Math.imul(c,it)|0,d=d+Math.imul(P,at)|0,m=m+Math.imul(P,it)|0;var zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,We),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,We),g=g+Math.imul(Fe,Ke)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,d=d+Math.imul(Oe,Qe)|0,d=d+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Xe)|0,d=d+Math.imul(Ne,Ye)|0,d=d+Math.imul(De,Xe)|0,m=m+Math.imul(De,Ye)|0,g=g+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,et)|0,d=d+Math.imul(le,Ze)|0,m=m+Math.imul(le,et)|0,g=g+Math.imul(X,tt)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(V,at)|0,d=d+Math.imul(V,it)|0,d=d+Math.imul(K,at)|0,m=m+Math.imul(K,it)|0,g=g+Math.imul(c,rt)|0,d=d+Math.imul(c,st)|0,d=d+Math.imul(P,rt)|0,m=m+Math.imul(P,st)|0;var Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(je,ze),d=Math.imul(je,We),d=d+Math.imul(He,ze)|0,m=Math.imul(He,We),g=g+Math.imul(Ue,Ke)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,Ke)|0,m=m+Math.imul(Ve,Je)|0,g=g+Math.imul(Fe,$e)|0,d=d+Math.imul(Fe,Qe)|0,d=d+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Xe)|0,d=d+Math.imul(Oe,Ye)|0,d=d+Math.imul(Be,Xe)|0,m=m+Math.imul(Be,Ye)|0,g=g+Math.imul(Ne,Ze)|0,d=d+Math.imul(Ne,et)|0,d=d+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,d=d+Math.imul(Z,nt)|0,d=d+Math.imul(le,tt)|0,m=m+Math.imul(le,nt)|0,g=g+Math.imul(X,at)|0,d=d+Math.imul(X,it)|0,d=d+Math.imul(Q,at)|0,m=m+Math.imul(Q,it)|0,g=g+Math.imul(V,rt)|0,d=d+Math.imul(V,st)|0,d=d+Math.imul(K,rt)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(c,ot)|0,d=d+Math.imul(c,ut)|0,d=d+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,We),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(je,Ke)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,Ke)|0,m=m+Math.imul(He,Je)|0,g=g+Math.imul(Ue,$e)|0,d=d+Math.imul(Ue,Qe)|0,d=d+Math.imul(Ve,$e)|0,m=m+Math.imul(Ve,Qe)|0,g=g+Math.imul(Fe,Xe)|0,d=d+Math.imul(Fe,Ye)|0,d=d+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,Ye)|0,g=g+Math.imul(Oe,Ze)|0,d=d+Math.imul(Oe,et)|0,d=d+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,d=d+Math.imul(Ne,nt)|0,d=d+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,at)|0,d=d+Math.imul(Z,it)|0,d=d+Math.imul(le,at)|0,m=m+Math.imul(le,it)|0,g=g+Math.imul(X,rt)|0,d=d+Math.imul(X,st)|0,d=d+Math.imul(Q,rt)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(V,ot)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(c,dt)|0,d=d+Math.imul(c,lt)|0,d=d+Math.imul(P,dt)|0,m=m+Math.imul(P,lt)|0;var Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(qe,Ke),d=Math.imul(qe,Je),d=d+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(je,$e)|0,d=d+Math.imul(je,Qe)|0,d=d+Math.imul(He,$e)|0,m=m+Math.imul(He,Qe)|0,g=g+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ue,Ye)|0,d=d+Math.imul(Ve,Xe)|0,m=m+Math.imul(Ve,Ye)|0,g=g+Math.imul(Fe,Ze)|0,d=d+Math.imul(Fe,et)|0,d=d+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,d=d+Math.imul(Oe,nt)|0,d=d+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,at)|0,d=d+Math.imul(Ne,it)|0,d=d+Math.imul(De,at)|0,m=m+Math.imul(De,it)|0,g=g+Math.imul(Z,rt)|0,d=d+Math.imul(Z,st)|0,d=d+Math.imul(le,rt)|0,m=m+Math.imul(le,st)|0,g=g+Math.imul(X,ot)|0,d=d+Math.imul(X,ut)|0,d=d+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(V,dt)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(K,dt)|0,m=m+Math.imul(K,lt)|0;var $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Xe)|0,d=d+Math.imul(je,Ye)|0,d=d+Math.imul(He,Xe)|0,m=m+Math.imul(He,Ye)|0,g=g+Math.imul(Ue,Ze)|0,d=d+Math.imul(Ue,et)|0,d=d+Math.imul(Ve,Ze)|0,m=m+Math.imul(Ve,et)|0,g=g+Math.imul(Fe,tt)|0,d=d+Math.imul(Fe,nt)|0,d=d+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,at)|0,d=d+Math.imul(Oe,it)|0,d=d+Math.imul(Be,at)|0,m=m+Math.imul(Be,it)|0,g=g+Math.imul(Ne,rt)|0,d=d+Math.imul(Ne,st)|0,d=d+Math.imul(De,rt)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,d=d+Math.imul(Z,ut)|0,d=d+Math.imul(le,ot)|0,m=m+Math.imul(le,ut)|0,g=g+Math.imul(X,dt)|0,d=d+Math.imul(X,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,lt)|0;var Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=67108863,g=Math.imul(qe,Xe),d=Math.imul(qe,Ye),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(je,Ze)|0,d=d+Math.imul(je,et)|0,d=d+Math.imul(He,Ze)|0,m=m+Math.imul(He,et)|0,g=g+Math.imul(Ue,tt)|0,d=d+Math.imul(Ue,nt)|0,d=d+Math.imul(Ve,tt)|0,m=m+Math.imul(Ve,nt)|0,g=g+Math.imul(Fe,at)|0,d=d+Math.imul(Fe,it)|0,d=d+Math.imul(Le,at)|0,m=m+Math.imul(Le,it)|0,g=g+Math.imul(Oe,rt)|0,d=d+Math.imul(Oe,st)|0,d=d+Math.imul(Be,rt)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,d=d+Math.imul(Ne,ut)|0,d=d+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,dt)|0,d=d+Math.imul(Z,lt)|0,d=d+Math.imul(le,dt)|0,m=m+Math.imul(le,lt)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,Ze),d=Math.imul(qe,et),d=d+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(je,tt)|0,d=d+Math.imul(je,nt)|0,d=d+Math.imul(He,tt)|0,m=m+Math.imul(He,nt)|0,g=g+Math.imul(Ue,at)|0,d=d+Math.imul(Ue,it)|0,d=d+Math.imul(Ve,at)|0,m=m+Math.imul(Ve,it)|0,g=g+Math.imul(Fe,rt)|0,d=d+Math.imul(Fe,st)|0,d=d+Math.imul(Le,rt)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,d=d+Math.imul(Oe,ut)|0,d=d+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,dt)|0,d=d+Math.imul(Ne,lt)|0,d=d+Math.imul(De,dt)|0,m=m+Math.imul(De,lt)|0;var Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,tt),d=Math.imul(qe,nt),d=d+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(je,at)|0,d=d+Math.imul(je,it)|0,d=d+Math.imul(He,at)|0,m=m+Math.imul(He,it)|0,g=g+Math.imul(Ue,rt)|0,d=d+Math.imul(Ue,st)|0,d=d+Math.imul(Ve,rt)|0,m=m+Math.imul(Ve,st)|0,g=g+Math.imul(Fe,ot)|0,d=d+Math.imul(Fe,ut)|0,d=d+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,dt)|0,d=d+Math.imul(Oe,lt)|0,d=d+Math.imul(Be,dt)|0,m=m+Math.imul(Be,lt)|0;var Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(qe,at),d=Math.imul(qe,it),d=d+Math.imul(Ge,at)|0,m=Math.imul(Ge,it),g=g+Math.imul(je,rt)|0,d=d+Math.imul(je,st)|0,d=d+Math.imul(He,rt)|0,m=m+Math.imul(He,st)|0,g=g+Math.imul(Ue,ot)|0,d=d+Math.imul(Ue,ut)|0,d=d+Math.imul(Ve,ot)|0,m=m+Math.imul(Ve,ut)|0,g=g+Math.imul(Fe,dt)|0,d=d+Math.imul(Fe,lt)|0,d=d+Math.imul(Le,dt)|0,m=m+Math.imul(Le,lt)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(qe,rt),d=Math.imul(qe,st),d=d+Math.imul(Ge,rt)|0,m=Math.imul(Ge,st),g=g+Math.imul(je,ot)|0,d=d+Math.imul(je,ut)|0,d=d+Math.imul(He,ot)|0,m=m+Math.imul(He,ut)|0,g=g+Math.imul(Ue,dt)|0,d=d+Math.imul(Ue,lt)|0,d=d+Math.imul(Ve,dt)|0,m=m+Math.imul(Ve,lt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(qe,ot),d=Math.imul(qe,ut),d=d+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(je,dt)|0,d=d+Math.imul(je,lt)|0,d=d+Math.imul(He,dt)|0,m=m+Math.imul(He,lt)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var ad=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=Gu,h[6]=zu,h[7]=Wu,h[8]=Ku,h[9]=Ju,h[10]=$u,h[11]=Qu,h[12]=Xu,h[13]=Yu,h[14]=Zu,h[15]=ed,h[16]=td,h[17]=nd,h[18]=ad,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function E(I,u){this.x=I,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var G=this.words[d]|0;this.words[d]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var P=(w.words[A.length+c]|0)*67108864+(w.words[A.length+c-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,c);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,c),w.isZero()||(w.negative^=1);d&&(d.words[c]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var G=0,c=1;(y.words[0]&c)===0&&G<26;++G,c<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),G=this.pow(u,w.addn(1).iushrn(1)),c=this.pow(u,w),P=A;c.cmp(h)!==0;){for(var D=c,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],G=d-1;G>=0;G--){var c=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),c===0&&k===0){g=0;continue}k<<=1,k|=c,g++,!(g!==b&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof id>"u"||id,Hp)});var fy=ae((Lg,Qs)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var E=function(c,P,D){return function(V){return new d(c,P,c).update(V)[D]()}},J=function(c,P,D){return function(V,K){return new d(c,P,K).update(V)[D]()}},$=function(c,P,D){return function(V,K,ee,X){return u["cshake"+c].update(V,K,ee,X)[D]()}},de=function(c,P,D){return function(V,K,ee,X){return u["kmac"+c].update(V,K,ee,X)[D]()}},T=function(c,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,X=this.blockCount,Q=0,yt=this.s,Z,le;Q>2]|=c[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)K.unshift(D),c=c>>8,D=c&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(a);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(X=65536+((X&1023)<<10|c.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(c),V},d.prototype.bytepad=function(c,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(c[0]=c[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%c===0&&(G(P),K=0)}return V&&(Q=P[K],X+=p[Q>>4&15]+p[Q&15],V>1&&(X+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(X+=p[Q>>20&15]+p[Q>>16&15])),X},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,X=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(X);for(var yt=new Uint32Array(Q);ee>8&255,X[Q+2]=yt>>16&255,X[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],X[Q]=yt&255,V>1&&(X[Q+1]=yt>>8&255),V>2&&(X[Q+2]=yt>>16&255)),X};function m(c,P,D){d.call(this,c,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var G=function(c){var P,D,V,K,ee,X,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Wa,je,He,Ka,qe,Ge,Ja,ze,We,$a,Ke,Je,Qa,$e,Qe,Xa,Xe,Ye,Ya,Ze,et,Za,tt,nt,ei,at,it,ti,rt,st,ni,ot,ut,ai,dt,lt,va,wa,_a,ka,Aa;for(V=0;V<48;V+=2)K=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],X=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],Z=c[5]^c[15]^c[25]^c[35]^c[45],le=c[6]^c[16]^c[26]^c[36]^c[46],Ha=c[7]^c[17]^c[27]^c[37]^c[47],Ne=c[8]^c[18]^c[28]^c[38]^c[48],De=c[9]^c[19]^c[29]^c[39]^c[49],P=Ne^(X<<1|Q>>>31),D=De^(Q<<1|X>>>31),c[0]^=P,c[1]^=D,c[10]^=P,c[11]^=D,c[20]^=P,c[21]^=D,c[30]^=P,c[31]^=D,c[40]^=P,c[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),c[2]^=P,c[3]^=D,c[12]^=P,c[13]^=D,c[22]^=P,c[23]^=D,c[32]^=P,c[33]^=D,c[42]^=P,c[43]^=D,P=X^(le<<1|Ha>>>31),D=Q^(Ha<<1|le>>>31),c[4]^=P,c[5]^=D,c[14]^=P,c[15]^=D,c[24]^=P,c[25]^=D,c[34]^=P,c[35]^=D,c[44]^=P,c[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),c[6]^=P,c[7]^=D,c[16]^=P,c[17]^=D,c[26]^=P,c[27]^=D,c[36]^=P,c[37]^=D,c[46]^=P,c[47]^=D,P=le^(K<<1|ee>>>31),D=Ha^(ee<<1|K>>>31),c[8]^=P,c[9]^=D,c[18]^=P,c[19]^=D,c[28]^=P,c[29]^=D,c[38]^=P,c[39]^=D,c[48]^=P,c[49]^=D,qa=c[0],Oe=c[1],nt=c[11]<<4|c[10]>>>28,ei=c[10]<<4|c[11]>>>28,Ge=c[20]<<3|c[21]>>>29,Ja=c[21]<<3|c[20]>>>29,wa=c[31]<<9|c[30]>>>23,_a=c[30]<<9|c[31]>>>23,Ze=c[40]<<18|c[41]>>>14,et=c[41]<<18|c[40]>>>14,Je=c[2]<<1|c[3]>>>31,Qa=c[3]<<1|c[2]>>>31,Be=c[13]<<12|c[12]>>>20,Ga=c[12]<<12|c[13]>>>20,at=c[22]<<10|c[23]>>>22,it=c[23]<<10|c[22]>>>22,ze=c[33]<<13|c[32]>>>19,We=c[32]<<13|c[33]>>>19,ka=c[42]<<2|c[43]>>>30,Aa=c[43]<<2|c[42]>>>30,ot=c[5]<<30|c[4]>>>2,ut=c[4]<<30|c[5]>>>2,$e=c[14]<<6|c[15]>>>26,Qe=c[15]<<6|c[14]>>>26,Fe=c[25]<<11|c[24]>>>21,Le=c[24]<<11|c[25]>>>21,ti=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,$a=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,je=c[6]<<28|c[7]>>>4,He=c[7]<<28|c[6]>>>4,ai=c[17]<<23|c[16]>>>9,dt=c[16]<<23|c[17]>>>9,Xa=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,za=c[36]<<21|c[37]>>>11,Ue=c[37]<<21|c[36]>>>11,st=c[47]<<24|c[46]>>>8,ni=c[46]<<24|c[47]>>>8,Za=c[8]<<27|c[9]>>>5,tt=c[9]<<27|c[8]>>>5,Ka=c[18]<<20|c[19]>>>12,qe=c[19]<<20|c[18]>>>12,lt=c[29]<<7|c[28]>>>25,va=c[28]<<7|c[29]>>>25,Ye=c[38]<<8|c[39]>>>24,Ya=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Wa=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Ka&Ge,c[11]=He^~qe&Ja,c[20]=Je^~$e&Xa,c[21]=Qa^~Qe&Xe,c[30]=Za^~nt&at,c[31]=tt^~ei&it,c[40]=ot^~ai<,c[41]=ut^~dt&va,c[2]=Be^~Fe&za,c[3]=Ga^~Le&Ue,c[12]=Ka^~Ge&ze,c[13]=qe^~Ja&We,c[22]=$e^~Xa&Ye,c[23]=Qe^~Xe&Ya,c[32]=nt^~at&ti,c[33]=ei^~it&rt,c[42]=ai^~lt&wa,c[43]=dt^~va&_a,c[4]=Fe^~za&Ve,c[5]=Le^~Ue&Wa,c[14]=Ge^~ze&$a,c[15]=Ja^~We&Ke,c[24]=Xa^~Ye&Ze,c[25]=Xe^~Ya&et,c[34]=at^~ti&st,c[35]=it^~rt&ni,c[44]=lt^~wa&ka,c[45]=va^~_a&Aa,c[6]=za^~Ve&qa,c[7]=Ue^~Wa&Oe,c[16]=ze^~$a&je,c[17]=We^~Ke&He,c[26]=Ye^~Ze&Je,c[27]=Ya^~et&Qa,c[36]=ti^~st&Za,c[37]=rt^~ni&tt,c[46]=wa^~ka&ot,c[47]=_a^~Aa&ut,c[8]=Ve^~qa&Be,c[9]=Wa^~Oe&Ga,c[18]=$a^~je&Ka,c[19]=Ke^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Qa&Qe,c[38]=st^~Za&nt,c[39]=ni^~tt&ei,c[48]=ka^~ot&ai,c[49]=Aa^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)Qs.exports=u;else{for(b=0;b{u0.exports=o0;function o0(a,e){if(!a)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var d0=ae((S3,Pd)=>{typeof Object.create=="function"?Pd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pd.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var K6=ar(),J6=d0();Pe.inherits=J6;function $6(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function Q6(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):$6(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Pe.htonl=l0;function Y6(a,e){for(var t="",n=0;n>>0}return r}Pe.join32=Z6;function e2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Pe.split32=e2;function t2(a,e){return a>>>e|a<<32-e}Pe.rotr32=t2;function n2(a,e){return a<>>32-e}Pe.rotl32=n2;function a2(a,e){return a+e>>>0}Pe.sum32=a2;function i2(a,e,t){return a+e+t>>>0}Pe.sum32_3=i2;function r2(a,e,t,n){return a+e+t+n>>>0}Pe.sum32_4=r2;function s2(a,e,t,n,i){return a+e+t+n+i>>>0}Pe.sum32_5=s2;function o2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Pe.sum64=o2;function u2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Pe.sum64_hi=u2;function d2(a,e,t,n){var i=e+n;return i>>>0}Pe.sum64_lo=d2;function l2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Pe.sum64_4_hi=l2;function p2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Pe.sum64_4_lo=p2;function y2(a,e,t,n,i,r,s,o,l,p){var f=0,x=e;x=x+n>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=y2;function f2(a,e,t,n,i,r,s,o,l,p){var f=e+n+r+o+p;return f>>>0}Pe.sum64_5_lo=f2;function c2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Pe.rotr64_hi=c2;function m2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=m2;function h2(a,e,t){return a>>>t}Pe.shr64_hi=h2;function x2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=x2});var ir=ae(c0=>{"use strict";var f0=An(),b2=ar();function bo(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}c0.BlockHash=bo;bo.prototype.update=function(e,t){if(e=f0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=f0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var g2=An(),Hn=g2.rotr32;function T2(a,e,t,n){if(a===0)return m0(e,t,n);if(a===1||a===3)return x0(e,t,n);if(a===2)return h0(e,t,n)}da.ft_1=T2;function m0(a,e,t){return a&e^~a&t}da.ch32=m0;function h0(a,e,t){return a&e^a&t^e&t}da.maj32=h0;function x0(a,e,t){return a^e^t}da.p32=x0;function v2(a){return Hn(a,2)^Hn(a,13)^Hn(a,22)}da.s0_256=v2;function w2(a){return Hn(a,6)^Hn(a,11)^Hn(a,25)}da.s1_256=w2;function _2(a){return Hn(a,7)^Hn(a,18)^a>>>3}da.g0_256=_2;function k2(a){return Hn(a,17)^Hn(a,19)^a>>>10}da.g1_256=k2});var T0=ae((D3,g0)=>{"use strict";var rr=An(),A2=ir(),M2=Nd(),Dd=rr.rotl32,Qr=rr.sum32,E2=rr.sum32_5,I2=M2.ft_1,b0=A2.BlockHash,C2=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;b0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}rr.inherits(qn,b0);g0.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;qn.padLength=64;qn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var sr=An(),S2=ir(),or=Nd(),R2=ar(),Mn=sr.sum32,P2=sr.sum32_4,N2=sr.sum32_5,D2=or.ch32,O2=or.maj32,B2=or.s0_256,F2=or.s1_256,L2=or.g0_256,U2=or.g1_256,v0=S2.BlockHash,V2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gn(){if(!(this instanceof Gn))return new Gn;v0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=V2,this.W=new Array(64)}sr.inherits(Gn,v0);w0.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var Bd=An(),_0=Od();function la(){if(!(this instanceof la))return new la;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Bd.inherits(la,_0);k0.exports=la;la.blockSize=512;la.outSize=224;la.hmacStrength=192;la.padLength=64;la.prototype._digest=function(e){return e==="hex"?Bd.toHex32(this.h.slice(0,7),"big"):Bd.split32(this.h.slice(0,7),"big")}});var Ud=ae((F3,C0)=>{"use strict";var Qt=An(),j2=ir(),H2=ar(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,M0=Qt.shr64_hi,E0=Qt.shr64_lo,Sa=Qt.sum64,Fd=Qt.sum64_hi,Ld=Qt.sum64_lo,q2=Qt.sum64_4_hi,G2=Qt.sum64_4_lo,z2=Qt.sum64_5_hi,W2=Qt.sum64_5_lo,I0=j2.BlockHash,K2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;I0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=K2,this.W=new Array(160)}Qt.inherits(En,I0);C0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Vd=An(),S0=Ud();function pa(){if(!(this instanceof pa))return new pa;S0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Vd.inherits(pa,S0);R0.exports=pa;pa.blockSize=1024;pa.outSize=384;pa.hmacStrength=192;pa.padLength=128;pa.prototype._digest=function(e){return e==="hex"?Vd.toHex32(this.h.slice(0,12),"big"):Vd.split32(this.h.slice(0,12),"big")}});var N0=ae(ur=>{"use strict";ur.sha1=T0();ur.sha224=A0();ur.sha256=Od();ur.sha384=P0();ur.sha512=Ud()});var U0=ae(L0=>{"use strict";var li=An(),s5=ir(),go=li.rotl32,D0=li.sum32,Xr=li.sum32_3,O0=li.sum32_4,F0=s5.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;F0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Kn,F0);L0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,f=r,x=s,C=o,_=0;_<80;_++){var v=D0(go(O0(n,B0(_,i,r,s),e[d5[_]+t],o5(_)),p5[_]),o);n=o,o=s,s=go(r,10),r=i,i=v,v=D0(go(O0(l,B0(79-_,p,f,x),e[l5[_]+t],u5(_)),y5[_]),C),l=C,C=x,x=go(f,10),f=p,p=v}v=Xr(this.h[1],r,x),this.h[1]=Xr(this.h[2],s,C),this.h[2]=Xr(this.h[3],o,l),this.h[3]=Xr(this.h[4],n,p),this.h[4]=Xr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function B0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function o5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function u5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var d5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var j0=ae((j3,V0)=>{"use strict";var f5=An(),c5=ar();function dr(a,e,t){if(!(this instanceof dr))return new dr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(f5.toArray(e,t))}V0.exports=dr;dr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),c5(e.length<=this.blockSize);for(var t=e.length;t{var Rt=H0;Rt.utils=An();Rt.common=ir();Rt.sha=N0();Rt.ripemd=U0();Rt.hmac=j0();Rt.sha1=Rt.sha.sha1;Rt.sha256=Rt.sha.sha256;Rt.sha224=Rt.sha.sha224;Rt.sha384=Rt.sha.sha384;Rt.sha512=Rt.sha.sha512;Rt.ripemd160=Rt.ripemd.ripemd160});var sl=ae((rl,xf)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&G<224?(d.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],G=0;G>4]+k[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],f=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],E=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var c=0,P=d,D;P>16&255]<<24^f[D>>8&255]<<16^f[D&255]<<8^f[D>>24&255]^p[c]<<24,c+=1,d!=8)for(var k=1;k>8&255]<<8^f[D>>16&255]<<16^f[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],c[4*m]=(f[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^P>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^P)&255;return c},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[G][m];d=g.slice()}for(var c=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],c[4*m]=(x[d[m]>>24&255]^P>>24)&255,c[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,c[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,c[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return c};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,E=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=E,G=J,c=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&G)|0)+(c+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,c=G,G=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,E=E+m|0,J=J+G|0,$=$+c|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,E=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function f(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=f(S,"N"),L=f(L,"r"),O=f(O,"p"),U=f(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let G=0;Gh&&(d=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(E,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),E(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof pl<"u"?gf.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(pl)});var Gf=ae((S4,qf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hl={};for(os=0;os>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function jf(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=br(e)^n>>5}for(e=br(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=jf(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=br(n)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)n=br(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=qo.charAt(o)}return i}function Hf(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=jf(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function Y5(){var a=Hf.apply(null,arguments);if(typeof a=="object")return a}function Z5(a){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(zl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var Kl=ae(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Ss=ae((qA,um)=>{um.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(La=>{var Me=Ss(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],dm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),lm=()=>[{type:Me.CHAR,value:9},{type:Me.CHAR,value:10},{type:Me.CHAR,value:11},{type:Me.CHAR,value:12},{type:Me.CHAR,value:13},{type:Me.CHAR,value:32},{type:Me.CHAR,value:160},{type:Me.CHAR,value:5760},{type:Me.RANGE,from:8192,to:8202},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233},{type:Me.CHAR,value:8239},{type:Me.CHAR,value:8287},{type:Me.CHAR,value:12288},{type:Me.CHAR,value:65279}],Hx=()=>[{type:Me.CHAR,value:10},{type:Me.CHAR,value:13},{type:Me.CHAR,value:8232},{type:Me.CHAR,value:8233}];La.words=()=>({type:Me.SET,set:dm(),not:!1});La.notWords=()=>({type:Me.SET,set:dm(),not:!0});La.ints=()=>({type:Me.SET,set:Jl(),not:!1});La.notInts=()=>({type:Me.SET,set:Jl(),not:!0});La.whitespace=()=>({type:Me.SET,set:lm(),not:!1});La.notWhitespace=()=>({type:Me.SET,set:lm(),not:!0});La.anyChar=()=>({type:Me.SET,set:Hx(),not:!0})});var ym=ae(Rs=>{var pm=Ss(),Cr=$l(),qx="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",Gx={0:0,t:9,n:10,v:11,f:12,r:13};Rs.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var f=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?qx.indexOf(l):Gx[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Rs.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Cr.words());else if(i[2])t.push(Cr.ints());else if(i[3])t.push(Cr.whitespace());else if(i[4])t.push(Cr.notWords());else if(i[5])t.push(Cr.notInts());else if(i[6])t.push(Cr.notWhitespace());else if(i[7])t.push({type:pm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:pm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Rs.error(e,"Unterminated character class")};Rs.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var fm=ae(Ps=>{var uu=Ss();Ps.wordBoundary=()=>({type:uu.POSITION,value:"b"});Ps.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Ps.begin=()=>({type:uu.POSITION,value:"^"});Ps.end=()=>({type:uu.POSITION,value:"$"})});var cm=ae((KA,Ql)=>{var Sr=ym(),xn=Ss(),wi=$l(),du=fm();Ql.exports=a=>{var e=0,t,n,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Sr.error(a,`Nothing to repeat at column ${O-1}`)},p=Sr.strToChars(a);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};mm.exports=Ua});var bm=ae(($A,xm)=>{var lu=cm(),Ns=hm(),_i=lu.types;xm.exports=class Ds{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=lu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ds.prototype.max!=null?Ds.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case _i.ROOT:case _i.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var zx=ki&&ki.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ki,"__esModule",{value:!0});ki.RandomGenerator=void 0;var Wx=zx(bm()),Kx;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new Wx.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(Kx=ki.RandomGenerator||(ki.RandomGenerator={}))});var Os=ae(Rr=>{"use strict";var Jx=Rr&&Rr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TypeGuardError=void 0;var $x=function(a){Jx(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Rr.TypeGuardError=$x});var Tm=ae(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var Qx=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};pu.$any=Qx});var vm=ae(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var Xx=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$guard=void 0;var Yx=Os(),Zx=function(a){return function(e,t){if(e===!0)throw new Yx.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};fu.$guard=Zx});var _m=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_between=void 0;var eb=function(a,e,t){return e<=a&&a<=t};cu.$is_between=eb});var km=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var tb=Kl(),nb=function(a,e,t,n){var i,r=(i=tb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};mu.$is_custom=nb});var Am=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var ab=function(a){return ib.test(a)};hu.$is_date=ab;var ib=/^(\d{4})-(\d{2})-(\d{2})$/});var Mm=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_datetime=void 0;var rb=function(a){return!isNaN(new Date(a).getTime())};xu.$is_datetime=rb});var Em=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_email=void 0;var sb=function(a){return ob.test(a)};bu.$is_email=sb;var ob=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Im=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var ub=function(a){return db.test(a)};gu.$is_ipv4=ub;var db=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Cm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var lb=function(a){return pb.test(a)};Tu.$is_ipv6=lb;var pb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Sm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var yb=function(a){return fb.test(a)};vu.$is_url=yb;var fb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Rm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var cb=function(a){return mb.test(a)};wu.$is_uuid=cb;var mb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Pm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var hb=function(a){return xb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};_u.$join=hb;var xb=function(a){return bb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},bb=function(a){return gb.has(a)},gb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Nm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$number=void 0;var Tb=Os(),vb=function(a){if(isFinite(a)===!1)throw new Tb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};ku.$number=vb});var Dm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$report=void 0;var wb=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Au.$report=wb});var Om=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var _b=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Mu.$rest=_b});var Bm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var kb=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Eu.$string=kb});var Fm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$tail=void 0;var Ab=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Iu.$tail=Ab});var jm=ae(Ai=>{"use strict";var Vt=Ai&&Ai.__assign||function(){return Vt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return Vt(Vt({},a.is()),{number:Lb.$number,string:jb.$string,tail:Hb.$tail,rest:Vb.$rest,throws:e(t)})},a.clone=function(t){return Vt(Vt({},a.is()),{throws:e(t),any:Mb.$any})},a.prune=function(t){return Vt(Vt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Lm.RandomGenerator,pick:Lm.RandomGenerator.pick}};var e=function(t){return function(n){throw new Um.TypeGuardError(Vt(Vt({},n),{method:"typia.".concat(t)}))}}})(qb=Ai.Namespace||(Ai.Namespace={}))});var Hm=ae(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.MapUtil=void 0;var Gb;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(Gb=Bs.MapUtil||(Bs.MapUtil={}))});var Gm=ae(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Wm=ae(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ae(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var Qm=ae($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var Ym=ae(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var eh=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var dp=ae(z=>{"use strict";var zb=z&&z.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Mi=z&&z.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&zb(e,a,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Pr=Kl(),Ee=jm(),Wb=Hm();Mi(Gm(),z);Mi(Wm(),z);Mi(Jm(),z);Mi(Qm(),z);Mi(Ym(),z);Mi(eh(),z);Mi(Os(),z);function Xl(){re("assert")}z.assert=Xl;Object.assign(Xl,Ee.Namespace.assert("assert"));function Yl(){re("assertType")}z.assertType=Yl;Object.assign(Yl,Ee.Namespace.assert("assertType"));function Cu(){re("is")}z.is=Cu;Object.assign(Cu,Ee.Namespace.assert("is"));function Su(){re("validate")}z.validate=Su;Object.assign(Su,Ee.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Ee.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Ee.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Ee.Namespace.validate());z.customValidators={size:function(a){var e,t;return a?(t=(e=Pr.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Pr.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=Wb.MapUtil.take(Pr.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Pr.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function Kb(){re("application")}z.application=Kb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Cu);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Su);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Ru(){re("assertStringify")}z.assertStringify=Ru;Object.assign(Ru,Ee.Namespace.assert("assertStringify"));Object.assign(Ru,Ee.Namespace.stringify("assertStringify"));function Pu(){re("isStringify")}z.isStringify=Pu;Object.assign(Pu,Ee.Namespace.is());Object.assign(Pu,Ee.Namespace.stringify("isStringify"));function Nu(){re("validateStringify")}z.validateStringify=Nu;Object.assign(Nu,Ee.Namespace.validate());Object.assign(Nu,Ee.Namespace.stringify("validateStringify"));function Jb(){re("metadata")}z.metadata=Jb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function $b(){re("literals")}z.literals=$b;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Du(){re("assertClone")}z.assertClone=Du;Object.assign(Du,Ee.Namespace.assert("assertClone"));Object.assign(Du,Ee.Namespace.clone("assertClone"));function Ou(){re("isClone")}z.isClone=Ou;Object.assign(Ou,Ee.Namespace.is());Object.assign(Ou,Ee.Namespace.clone("isClone"));function Bu(){re("validateClone")}z.validateClone=Bu;Object.assign(Bu,Ee.Namespace.validate());Object.assign(Bu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Fu(){re("assertPrune")}z.assertPrune=Fu;Object.assign(Fu,Ee.Namespace.assert("assertPrune"));Object.assign(Fu,Ee.Namespace.prune("assertPrune"));function Lu(){re("isPrune")}z.isPrune=Lu;Object.assign(Lu,Ee.Namespace.is());Object.assign(Lu,Ee.Namespace.prune("isPrune"));function Uu(){re("validatePrune")}z.validatePrune=Uu;Object.assign(Uu,Ee.Namespace.prune("validatePrune"));Object.assign(Uu,Ee.Namespace.validate());function th(){re("createAssert")}z.createAssert=th;Object.assign(th,Xl);function nh(){re("createAssertType")}z.createAssertType=nh;Object.assign(nh,Yl);function ah(){re("createIs")}z.createIs=ah;Object.assign(ah,Cu);function ih(){re("createValidate")}z.createValidate=ih;Object.assign(ih,Su);function rh(){re("createAssertEquals")}z.createAssertEquals=rh;Object.assign(rh,Zl);function sh(){re("createEquals")}z.createEquals=sh;Object.assign(sh,ep);function oh(){re("createValidateEquals")}z.createValidateEquals=oh;Object.assign(oh,tp);function uh(){re("createIsParse")}z.createIsParse=uh;Object.assign(uh,ap);function dh(){re("createAssertParse")}z.createAssertParse=dh;Object.assign(dh,np);function lh(){re("createValidateParse")}z.createValidateParse=lh;Object.assign(lh,ip);function ph(){re("createStringify")}z.createStringify=ph;Object.assign(ph,rp);function yh(){re("createAssertStringify")}z.createAssertStringify=yh;Object.assign(yh,Ru);function fh(){re("createIsStringify")}z.createIsStringify=fh;Object.assign(fh,Pu);function ch(){re("createValidateStringify")}z.createValidateStringify=ch;Object.assign(ch,Nu);function mh(){re("createRandom")}z.createRandom=mh;Object.assign(mh,sp);function hh(){re("createClone")}z.createClone=hh;Object.assign(hh,op);function xh(){re("createAssertClone")}z.createAssertClone=xh;Object.assign(xh,Du);function bh(){re("createIsClone")}z.createIsClone=bh;Object.assign(bh,Ou);function gh(){re("createValidateClone")}z.createValidateClone=gh;Object.assign(gh,Bu);function Th(){re("createPrune")}z.createPrune=Th;Object.assign(Th,up);function vh(){re("createAssertPrune")}z.createAssertPrune=vh;Object.assign(vh,Fu);function wh(){re("createIsPrune")}z.createIsPrune=wh;Object.assign(wh,Lu);function _h(){re("createValidatePrune")}z.createValidatePrune=_h;Object.assign(_h,Uu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Ah=ae(gn=>{"use strict";var kh=gn&&gn.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Qb=gn&&gn.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),Xb=gn&&gn.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&kh(e,a,t);return Qb(e,a),e},Yb=gn&&gn.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kh(e,a,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Zb=Xb(dp());gn.default=Zb;Yb(dp(),gn)});var Rl={};Hi(Rl,{BaseContract:()=>pr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>tu,logger:()=>Ac,providers:()=>ea,utils:()=>ne,version:()=>au,wordlists:()=>hi});var ey=_n(rd());var qp="logger/5.7.0";var Gp=!1,zp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},Wp=zs.default,sd=null;function qh(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var Kp=qh(),od;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(od||(od={}));var Wt;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();zs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>zs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=Jp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Wt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Wt.CALL_EXCEPTION:case Wt.INSUFFICIENT_FUNDS:case Wt.MISSING_NEW:case Wt.NONCE_EXPIRED:case Wt.REPLACEMENT_UNDERPRICED:case Wt.TRANSACTION_REPLACED:case Wt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Kp&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Kp})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return sd||(sd=new M(qp)),sd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}Wp=t}static from(e){return new M(e)}};M.errors=Wt;M.levels=od;var $p="bytes/5.7.0";var wt=new M($p);function Xp(a){return!!a.toHexString}function qi(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return qi(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function aa(a){return ie(a)&&!(a.length%2)||on(a)}function Qp(a){return typeof a=="number"&&a==a&&a%1===0}function on(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!Qp(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),qi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),qi(n)}function Zt(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),qi(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var ud="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){wt.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=ud[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),Xp(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":wt.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(on(a)){let t="0x";for(let n=0;n>4]+ud[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",a)}function Nt(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ie(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&wt.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function kt(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(a){let e=dd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function dd(a){typeof a!="string"&&(a=W(a)),ie(a)||wt.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function Un(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=ii(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Fr(a){return a=Un(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var Lr=ey.default.BN,ia=new M(Ws),ld={},Yp=9007199254740991;function ty(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||on(a))}var Zp=!1,F=class{constructor(e,t){e!==ld&&ia.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Kt(be(this).fromTwos(e))}toTwos(e){return Kt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Kt(be(this).add(be(e)))}sub(e){return Kt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&un("division-by-zero","div"),Kt(be(this).div(be(e)))}mul(e){return Kt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&un("division-by-zero","mod"),Kt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&un("negative-power","pow"),Kt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Kt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Kt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Kt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Kt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Kt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Kt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ia.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zp||(Zp=!0,ia.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ia.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ia.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(ld,Ur(e)):e.match(/^-?[0-9]+$/)?new F(ld,Ur(new Lr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Yp||e<=-Yp)&&un("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(on(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Ur(a){if(typeof a!="string")return Ur(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&ia.throwArgumentError("invalid hex","value",a),a=Ur(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Kt(a){return F.from(Ur(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Lr("-"+e.substring(3),16):new Lr(e.substring(2),16)}function un(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),ia.throwError(a,M.errors.NUMERIC_FAULT,n)}function pd(a){return new Lr(a,36).toString(16)}function yd(a){return new Lr(a,16).toString(36)}var jt=new M(Ws),Vr={},ay=F.from(0),iy=F.from(-1);function ry(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),jt.throwError(a,M.errors.NUMERIC_FAULT,i)}var jr="0";for(;jr.length<256;)jr+=jr;function fd(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+jr.substring(0,a):jt.throwArgumentError("invalid decimal size","decimals",a)}function Gi(a,e){e==null&&(e=0);let t=fd(e);a=F.from(a);let n=a.lt(ay);n&&(a=a.mul(iy));let i=a.mod(t).toString();for(;i.length2&&jt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&ry("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&jt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Vr,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Vr&&jt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ny.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ny.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&jt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+jr.substring(0,e),this.format),i=Gh.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&jt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ty(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString(Gi(e,t),ra.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=ra.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=ra.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=Gi(i,n.decimals);return new ft(Vr,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(on(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ft.from(1),Gh=ft.from("0.5");var sy="properties/5.7.0";var zh=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Ks=new M(sy);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function mt(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Ce(a){return zh(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function zi(a,e){(!a||typeof a!="object")&&Ks.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||Ks.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var Wh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(a){if(a==null||Wh[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tct(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,ct(n))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function ct(a){return Kh(a)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var Te=new M(Vn),ri={},uy={calldata:!0,memory:!0,storage:!0},Jh={calldata:!0,memory:!0};function Js(a,e){if(a==="bytes"||a==="string"){if(uy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&Jh[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function $h(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(ri,{name:e.name||null,type:Wi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n($h(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Hr(a,e){return Yh(a).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),$s(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qt.isFragment(e)?e:typeof e=="string"?qt.fromString(e):qt.fromObject(e)}static fromObject(e){if(qt.isFragment(e))return e;switch(e.type){case"function":return Ot.fromObject(e);case"event":return Ht.fromObject(e);case"constructor":return Dt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Ht.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ot.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Dt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Ht=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:qr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Ht(ri,t)}static fromString(e){let t=e.match(Gr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:n,inputs:Hr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function py(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function yy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Dt=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=yy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Dt(ri,n)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let n=e.match(Gr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Hr(n[2].trim(),!1),py(n[3].trim(),t),Dt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ot=class extends Dt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=yy(e),n={type:e.type,name:qr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ot(ri,n)}static fromString(e){let t={type:"function"};e=ly(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(Gr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&qr(t.name),t.inputs=Hr(i[2],!1),py(i[3].trim(),t),n.length>1){let r=n[1].match(Gr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Hr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var tn=class extends qt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:qr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return dy(new tn(ri,t))}static fromString(e){let t={type:"error"},n=e.match(Gr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&qr(t.name),t.inputs=Hr(n[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Wi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var Xh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qr(a){return(!a||!a.match(Xh))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Gr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Yh(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&cd.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},oi=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):oi.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:cd.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new oi(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var cy=_n(fy());function fe(a){return"0x"+cy.default.keccak_256(j(a))}var Xs={};Hi(Xs,{decode:()=>zr,encode:()=>sa});var my="rlp/5.7.0";var jn=new M(my);function hy(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function xy(a,e,t){let n=0;for(let i=0;ie+1+n&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Ty(a,e){if(a.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);return e+1+t+n>a.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),by(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=xy(a,e+1,t);e+1+t+n>a.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function zr(a){let e=j(a),t=Ty(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",a),t.result}var vy="address/5.7.0";var Ma=new M(vy);function wy(a){ie(a,20)||Ma.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(fe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var Zh=9007199254740991;function e6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var md={};for(let a=0;a<10;a++)md[String(a)]=String(a);for(let a=0;a<26;a++)md[String.fromCharCode(65+a)]=String(10+a);var _y=Math.floor(e6(Zh));function ky(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>md[n]).join("");for(;e.length>=_y;){let n=e.substring(0,_y);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function ce(a){let e=null;if(typeof a!="string"&&Ma.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=wy(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ma.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==ky(a)&&Ma.throwArgumentError("bad icap checksum","address",a),e=pd(a.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Ma.throwArgumentError("invalid address","address",a);return e}function Ay(a){try{return ce(a),!0}catch{}return!1}function My(a){let e=yd(ce(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function ui(a){let e=null;try{e=ce(a.from)}catch{Ma.throwArgumentError("missing from address","transaction",a)}let t=Zt(j(F.from(a.nonce).toHexString()));return ce(Ie(fe(sa([e,t])),12))}function Ey(a,e,t){return Nt(e)!==32&&Ma.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ma.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ie(fe(ye(["0xff",ce(a),e,t])),12))}var Ys=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Ji=new M(Vn);function hd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let f=p.localName;return f||Ji.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ji.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Ji.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Ji.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(a.wordSize),r=new si(a.wordSize),s=[];e.forEach((l,p)=>{let f=n[p];if(l.dynamic){let x=r.length;l.encode(r,f);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function xd(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var eo=class extends At{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Ji.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;iro,EtherSymbol:()=>Py,HashZero:()=>Qi,MaxInt256:()=>Ry,MaxUint256:()=>uo,MinInt256:()=>Sy,NegativeOne:()=>so,One:()=>oo,Two:()=>Iy,WeiPerEther:()=>Cy,Zero:()=>$i});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),$i=F.from(0),oo=F.from(1),Iy=F.from(2),Cy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Qi="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var lo=class extends At{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(n.lt($i)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Ny="strings/5.7.0";var Dy=new M(Ny),Gt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Bt||(Bt={}));function t6(a,e,t,n,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function Oy(a,e,t,n,i){if(a===Bt.BAD_PREFIX||a===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Bt.OVERRUN?t.length-e-1:0}function n6(a,e,t,n,i){return a===Bt.OVERLONG?(n.push(i),0):(n.push(65533),Oy(a,e,t,n,i))}var po=Object.freeze({error:t6,ignore:Oy,replace:n6});function gd(a,e){e==null&&(e=po.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Bt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Bt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Bt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Bt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Bt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Bt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Gt.current){e!=Gt.current&&(Dy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function bd(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function Td(a,e){return'"'+gd(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?bd(t):(t-=65536,bd((t>>10&1023)+55296)+bd((t&1023)+56320))}).join("")+'"'}function yo(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(a,e){return yo(gd(a,e))}function Ea(a,e=Gt.current){return gd(ve(a,e))}function vd(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Qi]).slice(0,32))}function wd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function a6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function By(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function kd(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var i6=By("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),r6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),s6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],o6=_d("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),u6=_d("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d6=_d("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",a6),l6=By("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function p6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function y6(a){return!!kd(a,i6)}function f6(a){let e=kd(a,s6);if(e)return[a+e.s];let t=o6[a];if(t)return t;let n=u6[a];if(n)return[a+n[0]];let i=d6[a];return i||null}function c6(a){return!!kd(a,l6)}function Ad(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Ea(a);e=p6(e.map(n=>{if(r6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=f6(n);return i||[n]})),e=Ea(yo(e),Gt.NFKC),e.forEach(n=>{if(c6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(y6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=yo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var fo=class extends Wr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Jt(super.decode(e))}};var di=class extends At{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return hd(e,this.coders,t)}decode(e){return e.coerce(this.name,xd(e,this.coders))}};var co=new M(Vn),m6=new RegExp(/^bytes([0-9]*)$/),h6=new RegExp(/^(u?int)([0-9]*)$/),Xi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ys(e.name);case"bool":return new to(e.name);case"string":return new fo(e.name);case"bytes":return new no(e.name);case"array":return new eo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new di((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new io(e.name)}let t=e.type.match(h6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(n/8,t[1]==="int",e.name)}if(t=e.type.match(m6),t){let n=parseInt(t[1]);return(n===0||n>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(n,e.name)}return co.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new oi(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new si(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(pt.from(i)));return new di(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&co.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),i=new di(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),n))}},Kr=new Xi;function nn(a){return fe(ve(a))}var mo="hash/5.7.0";var Md={};Hi(Md,{decode:()=>Yi,encode:()=>Zi});function Yi(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function x6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|f(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return E+256+(a[o++]<<8|a[o++]);case 1:return E+a[o++];default:return J-1}})}function g6(a){let e=0;return()=>a[e++]}function Uy(a){return g6(b6(a))}function T6(a){return a&1?~a>>1:a>>1}function v6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function Vy(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(k6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(A6(t,a))}return x6(Ly(e))}function _6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function jy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function k6(a,e){let t=1+e(),n=e(),i=_6(e),r=jy(i.length,1+a,e);return Ly(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function A6(a,e){let t=1+e();return jy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function Hy(a){let e=Jr(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=Jr(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,f)=>f.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function qy(){return Uy(Yi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var ho=qy(),M6=new Set(Jr(ho)),E6=new Set(Jr(ho)),I6=Vy(ho),C6=Hy(ho),Gy=45,zy=95;function Wy(a){return Ea(a)}function S6(a){return a.filter(e=>e!=65039)}function Ky(a){for(let e of a.split(".")){let t=Wy(e);try{for(let n=t.lastIndexOf(zy)-1;n>=0;n--)if(t[n]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function Jy(a){return Ky(R6(a,S6))}function R6(a,e){let t=Wy(a).reverse(),n=[];for(;t.length;){let i=N6(t);if(i){n.push(...e(i));continue}let r=t.pop();if(M6.has(r)){n.push(r);continue}if(E6.has(r))continue;let s=I6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(P6(String.fromCodePoint(...n)))}function P6(a){return a.normalize("NFC")}function N6(a,e){var t;let n=C6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var D6=new M(mo),Qy=new Uint8Array(32);Qy.fill(0);function $y(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Ed(a){let e=ve(Jy(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push($y(e.slice(n))),t}function Id(a){try{return Ed(a).length!==0}catch{}return!1}function Ia(a){typeof a!="string"&&D6.throwArgumentError("invalid ENS name; not a string","name",a);let e=Qy,t=Ed(a);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function $r(a){return W(ye(Ed(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Xy=`Ethereum Signed Message: +`;function er(a){return typeof a=="string"&&(a=ve(a)),fe(ye([ve(Xy),ve(String(a.length)),a]))}var O6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xt=new M(mo),t0=new Uint8Array(32);t0.fill(0);var B6=F.from(-1),n0=F.from(0),a0=F.from(1),F6=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function L6(a){let e=j(a),t=e.length%32;return t?kt([e,t0.slice(t)]):W(e)}var U6=me(a0.toHexString(),32),V6=me(n0.toHexString(),32),Yy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Cd=["name","version","chainId","verifyingContract","salt"];function Zy(a){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var j6={name:Zy("name"),version:Zy("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return ce(a).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Sd(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&xt.throwArgumentError("invalid numeric width","type",a);let i=F6.mask(t?n-1:n),r=t?i.add(a0).mul(B6):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&xt.throwArgumentError(`invalid length for ${a}`,"value",n),L6(n)}}}switch(a){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?U6:V6};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Sd(f)&&(n[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(o),t[o][f]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=e0(o,e[o])+l.map(p=>e0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Sd(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(kt(l))}}let n=this.types[e];if(n){let i=nn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?fe(p):p});return s.unshift(i),kt(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return fe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Sd(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,n){return bt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=Yy[n];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Cd.indexOf(n.name)-Cd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",bt.hashDomain(e),bt.from(t).hash(n)])}static hash(e,t,n){return fe(bt.encode(e,t,n))}static resolveNames(e,t,n,i){return O6(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){bt.hashDomain(e);let i={},r=[];Cd.forEach(l=>{let p=e[l];p!=null&&(i[l]=j6[l](p),r.push({name:l,type:Yy[l]}))});let s=bt.from(t),o=_e(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Vn);var tr=class extends en{},nr=class extends en{},Rd=class extends en{},oa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},H6={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function i0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Ca=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>qt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Dt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching function","name",n):i.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching event","name",n):i.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Ht.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?gt.throwArgumentError("no matching error","name",n):i.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ot.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),f=H6[p];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return gt.throwError("call revert exception"+r,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(nn(l));else if(s.type==="bytes")n.push(fe(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new oa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new oa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw i0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new nr({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new tr({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Rd({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var r0="abstract-provider/5.7.0";var q6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},G6=new M(r0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){G6.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return q6(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var s0="abstract-signer/5.7.0";var kn=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ln=new M(s0),z6=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],W6=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],St=class{constructor(){ln.checkAbstract(new.target,St),B(this,"_isSigner",!0)}getBalance(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return kn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return kn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ce(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return kn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return kn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return kn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)z6.indexOf(n)===-1&&ln.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return kn(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>kn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&ln.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(W6.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ua=class extends St{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=_n(rd()),Jn=_n(jd());function lr(a,e,t){return t={path:e,exports:{},require:function(n,i){return m5(n,i??t.path)}},a(t,t.exports),t.exports}function m5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zd=G0;function G0(a,e){if(!a)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var In=lr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=f&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),f[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),wo=an.getNAF,h5=an.getJSF,_o=an.assert;function Pa(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var pi=Pa;Pa.prototype.point=function(){throw new Error("Not implemented")};Pa.prototype.validate=function(){throw new Error("Not implemented")};Pa.prototype._fixedNafMul=function(e,t){_o(e.precomputed);var n=e._getDoubles(),i=wo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];_o(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Pa.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,C;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(n[v],s[v],this._bitLength),l[S]=wo(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=h5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;f--){for(var de=0;f>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),f<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),f=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(f).neg();return{k1:x,k2:C}};fn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Et.prototype.isInfinity=function(){return this.inf};Et.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Et.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Et.prototype.getX=function(){return this.x.fromRed()};Et.prototype.getY=function(){return this.y.fromRed()};Et.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Et.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Et.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Et.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Et.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Pt(a,e,t,n){pi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wd(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,n){return new Pt(this,e,t,n)};Pt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Pt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Pt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),x=f.redMul(l),C=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Pt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Pt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=lr(function(a,e){"use strict";var t=e;t.base=pi,t.short=b5,t.mont=null,t.edwards=null}),vo=lr(function(a,e){"use strict";var t=e,n=an.assert;function i(o){o.type==="short"?this.curve=new To.short(o):o.type==="edwards"?this.curve=new To.edwards(o):this.curve=new To.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ra(a){if(!(this instanceof Ra))return new Ra(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(a.entropy,a.entropyEnc||"hex"),t=In.toArray(a.nonce,a.nonceEnc||"hex"),n=In.toArray(a.pers,a.persEnc||"hex");zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var z0=Ra;Ra.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ra.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=In.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var g5=an.assert;function ko(a,e){if(a instanceof ko)return a;this._importDER(a,e)||(g5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var Ao=ko;function T5(){this.place=0}function Hd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function q0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}ko.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=q0(t),n=q0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];qd(i,t.length),i=i.concat(t),i.push(2),qd(i,n.length);var r=i.concat(n),s=[48];return qd(s,r.length),s=s.concat(r),an.encode(s,e)};var v5=function(){throw new Error("unsupported")},W0=an.assert;function pn(a){if(!(this instanceof pn))return new pn(a);typeof a=="string"&&(W0(Object.prototype.hasOwnProperty.call(vo,a),"Unknown curve "+a),a=vo[a]),a instanceof vo.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var w5=pn;pn.prototype.keyPair=function(e){return new Kd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Kd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Kd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||v5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new z0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),f=0;;f++){var x=i.k?i.k(f):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Ao({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new Ao(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,n.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(a,e,t,n){W0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),C=o.mul(f).umod(i);return this.g.mulAdd(x,s,C)};pn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new Ao(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var _5=lr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=To,t.curves=vo,t.ec=w5,t.eddsa=null}),K0=_5.ec;var J0="signing-key/5.7.0";var $d=new M(J0),Jd=null;function $n(){return Jd||(Jd=new K0("secp256k1")),Jd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&$d.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=$n().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=$n().keyFromPublic(j(this.publicKey)),n=$n().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&$d.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return Un({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=$n().keyFromPrivate(j(this.privateKey)),n=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(a,e){let t=Un(e),n={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function Yr(a,e){let t=j(a);if(t.length===32){let n=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+$n().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+$n().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return $d.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $0="transactions/5.7.0";var Ut=new M($0),Eo;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xd(a){return a==="0x"?null:ce(a)}function Lt(a){return a==="0x"?$i:F.from(a)}var k5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],A5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(a){let e=Yr(a);return ce(Ie(fe(Ie(e,1)),12))}function yi(a,e){return mn(Mo(j(a),e))}function rn(a,e){let t=Zt(F.from(a).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function Qd(a,e){return{address:ce(a),storageKeys:(e||[]).map((t,n)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function sn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Qd(t[0],t[1])):Qd(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return Qd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Q0(a){return sn(a).map(e=>[e.address,e.storageKeys])}function X0(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(a.maxFeePerGas||0,"maxFeePerGas"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",Q0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x02",sa(t)])}function Y0(a,e){let t=[rn(a.chainId||0,"chainId"),rn(a.nonce||0,"nonce"),rn(a.gasPrice||0,"gasPrice"),rn(a.gasLimit||0,"gasLimit"),a.to!=null?ce(a.to):"0x",rn(a.value||0,"value"),a.data||"0x",Q0(a.accessList||[])];if(e){let n=Un(e);t.push(rn(n.recoveryParam,"recoveryParam")),t.push(Zt(n.r)),t.push(Zt(n.s))}return kt(["0x01",sa(t)])}function M5(a,e){zi(a,A5);let t=[];k5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Ut.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!aa(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Zr(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),M5(a,e);switch(a.type){case 1:return Y0(a,e);case 2:return X0(a,e);default:break}return Ut.throwError(`unsupported transaction type: ${a.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function Z0(a,e,t){try{let n=Lt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=fe(t(a));a.from=yi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function E5(a){let e=zr(a.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Lt(e[2]),n=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Lt(e[4]),to:Xd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(a),Z0(i,e.slice(9),X0)),i}function I5(a){let e=zr(a.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Xd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(a),Z0(t,e.slice(8),Y0)),t}function C5(a){let e=zr(a);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Xd(e[3]),value:Lt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=fe(a)}return t.type=null,t}function Io(a){let e=j(a);if(e[0]>127)return C5(e);switch(e[0]){case 1:return I5(e);case 2:return E5(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ef="contracts/5.7.0";var Na=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Se=new M(ef),S5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Co(a,e){return Na(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return ce(t)}catch{}a||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function es(a,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>es(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Co(a,e):t.type==="tuple"?yield es(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>es(a,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(a,e,t){return Na(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Ce({override:Co(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>Na(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Co(a.provider,n.from));let i=yield Ce({args:es(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Ce(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xn[p]!=null);return l.length&&Se.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function R5(a,e){return function(...t){return Po(a,e,t)}}function P5(a,e){let t=a.signer||a.provider;return function(...n){return Na(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Po(a,e,n);return yield t.estimateGas(i)})}}function nf(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function af(a,e,t){let n=a.signer||a.provider;return function(...i){return Na(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Po(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===M.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function N5(a,e){return function(...t){return Na(this,void 0,void 0,function*(){a.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Po(a,e,t),i=yield a.signer.sendTransaction(n);return nf(a,i),i})}}function tf(a,e,t){return e.constant?af(a,e,t):N5(a,e)}function rf(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var fi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Yd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(rf(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Ki(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Ro=class extends fi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},pr=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):$t.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Se.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Co(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(ce(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,tf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,tf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,af(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,R5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,P5(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return ui(e)}static getInterface(e){return Ca.isInterface(e)?e:new Ca(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ua(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return oa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Yd);if(e==="event")return this._normalizeRunningEvent(new fi("event",null));if(e==="*")return this._normalizeRunningEvent(new Ro(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new So(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new So(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fi(rf(t),t))}return this._normalizeRunningEvent(new Ro(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=ct(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends pr{},ci=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:on(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!St.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!S5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Na(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield es(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return nf(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ui(e)}static getContract(e,t,n){return new oe(e,t,n)}};var No=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(fa(i,a,l));r||(r=C.length,f=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),f.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return dc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(ca,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fa));let n=new Uint8Array(37);if(e&fa){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(ci(Qn.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Do(F.from(a).add(this.privateKey).mod(Fb)):d=new fn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(ca,o,d,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=fa)throw new Error("invalid path index - "+a);n=n._derive(fa+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=fa)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(ci(Qn.sha512,Lb,n));return new Ct(ca,Do(r.slice(0,32)),null,"0x00000000",Do(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=nd(n),e=br(ma(e,n),n),Ct._fromSeed(id(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=yi.decode(e);(t.length!==82||dc(t.slice(0,78))!==e)&&is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(ca,null,W(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(ca,W(o.slice(1)),null,r,s,a,n,null)}return is.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function id(i,e){e||(e="");let t=Te("mnemonic"+e,Gt.NFKD);return mr(Te(i,Gt.NFKD),t,2048,64,"sha512")}function ma(i,e){e=nd(e),is.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=pc(s);if((V(Xt(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,a/8))}function br(i,e){if(e=nd(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&Ub(8-n)),n+=3);let r=i.length/4,a=V(Xt(i))[0]&pc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function yc(i,e){try{return ma(i,e),!0}catch{}return!1}function cc(i){return(typeof i!="number"||i<0||i>=fa||i%1)&&is.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var fc="random/5.7.0";var rd=new M(fc);function jb(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var mc=jb(),Oo=mc.crypto||mc.msCrypto;(!Oo||!Oo.getRandomValues)&&(rd.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(i){return rd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(i){(i<=0||i>1024||i%1||i!=i)&&rd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return Oo.getRandomValues(e),V(e)}function rs(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var od=_n(sd());var Bo="json-wallets/5.7.0";function mi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function ha(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new hi.default.Counter(b),J=new hi.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:bc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=Xn(16),N=new hi.default.Counter(R),q=new hi.default.ModeOfOperation.ctr(H,N),se=V(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+ha(C.getUTCMonth()+1,2)+"-"+ha(C.getUTCDate(),2)+"T"+ha(C.getUTCHours(),2)+"-"+ha(C.getUTCMinutes(),2)+"-"+ha(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Mc(i,e,t){if(Fo(i)){t&&t(0);let n=ld(i,e);return t&&t(1),Promise.resolve(n)}return Lo(i)?kc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ec(i,e){if(Fo(i))return ld(i,e);if(Lo(i))return Ac(i,e);throw new Error("invalid JSON wallet")}var Cc="wallet/5.7.0";var Ic=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ba=new M(Cc);function zb(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function Wb(i){let e=i.mnemonic;return e&&e.phrase}var In=class extends St{constructor(e,t){if(super(),zb(e)){let n=new fn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==fe(e.address)&&ba.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Wb(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||fi,locale:r.locale||"en"}));let a=this.mnemonic,s=Ct.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);mn(s.privateKey)!==this.address&&ba.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(fn.isSigningKey(e))e.curve!=="secp256k1"&&ba.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new fn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&ba.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new In(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&ba.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(Za(t)));return Za(t,n)})}signMessage(e){return Ic(this,void 0,void 0,function*(){return Fa(this._signingKey().signDigest(ea(e)))})}_signTypedData(e,t,n){return Ic(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,a=>(this.provider==null&&ba.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Fa(this._signingKey().signDigest(bt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),fd(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=V(Ee(ce(ye([t,e.extraEntropy])),0,16)));let n=br(t,e.locale);return In.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Mc(e,t,n).then(r=>new In(r))}static fromEncryptedJsonSync(e,t){return new In(Ec(e,t))}static fromMnemonic(e,t,n){return t||(t=fi),new In(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Sc(i,e){return yr(ea(i),e)}function Rc(i,e,t,n){return yr(bt.hash(i,e,t),n)}var ei={};Hr(ei,{AlchemyProvider:()=>_a,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>bs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>ka,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>Ed,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>va,NodesmithProvider:()=>As,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>Ta,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Ms,WebSocketProvider:()=>gi,getDefaultProvider:()=>tu,getNetwork:()=>ss,isCommunityResourcable:()=>bd,isCommunityResource:()=>ls,showThrottleMessage:()=>Yn});var Pc="networks/5.7.1";var Nc=new M(Pc);function Kb(i){return i&&typeof i.renetwork=="function"}function bi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return bi(t)},e}function Vo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return Vo(i,n)},t}var Dc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:bi("homestead")},Oc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:bi("ropsten")},Bc={chainId:63,name:"classicMordor",_defaultProvider:Vo("https://www.ethercluster.com/mordor","classicMordor")},jo={unspecified:{chainId:0,name:"unspecified"},homestead:Dc,mainnet:Dc,morden:{chainId:2,name:"morden"},ropsten:Oc,testnet:Oc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:bi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:bi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:bi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:bi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Vo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Bc,classicTestnet:Bc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Vo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:bi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:bi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(i){if(i==null)return null;if(typeof i=="number"){for(let n in jo){let r=jo[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=jo[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=jo[i.name];if(!e)return typeof i.chainId!="number"&&Nc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&Nc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(Kb(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Fc="web/5.7.1";var Jb=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function Lc(i,e){return Jb(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var $b=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Sn=new M(Fc);function Uc(i){return new Promise(e=>{setTimeout(e,i)})}function Di(i,e){if(i==null)return null;if(typeof i=="string")return i;if(ii(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(i)}catch{}return W(i)}return i}function Qb(i){return Te(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function md(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Sn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+Zr(Te(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yr(_[3]):Qb(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Di(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return $b(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Di(H,U.headers?U.headers["content-type"]:null),requestBody:Di(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Jt(a))}catch(d){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=Te(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return md(i,r,n)}function Pn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var vd=_n(qc());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(d,null),transactionIndex:Y.allowNull(d,null),confirmations:Y.allowNull(d,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:d,data:a,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(d),creates:Y.allowNull(t,null),raw:Y.allowNull(a)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(d),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(c),type:Y.allowNull(d),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:Y.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:d,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(a),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:Y.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(d),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:a,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(r,void 0),toBlock:Y.allowNull(r,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(d),blockHash:Y.allowNull(s),transactionIndex:d,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(a,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ee(e,12));return t===ao?null:t}contractAddress(e){return ur(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=Y.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Co(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function bd(i){return i&&typeof i.isCommunityResource=="function"}function ls(i){return bd(i)&&i.isCommunityResource()}var Gc=!1;function Yn(){Gc||(Gc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},he=new M(Ae),r5=10;function zc(i){return i==null?"null":(Nt(i)!==32&&he.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function Wc(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[zc(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return zc(e)}).join("&")}function a5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function ga(i){if(typeof i=="string"){if(i=i.toLowerCase(),Nt(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+Wc(i);if(bo.isForkEvent(i))throw he.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+Wc(i.topics||[])}throw new Error("invalid event - "+i)}function ds(){return new Date().getTime()}function Kc(i){return new Promise(e=>{setTimeout(e,i)})}var s5=["block","network","pending","poll"],wd=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=a5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||s5.indexOf(this.tag)>=0}},o5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function xd(i){return me(F.from(i).toHexString(),32)}function Jc(i){return yi.encode(ye([i,Ee(Xt(Xt(i)),0,4)]))}var Xc=new RegExp("^(ipfs)://(.*)$","i"),$c=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(i,e){try{return Jt(ps(i,e))}catch{}return null}function ps(i,e){if(i==="0x")return null;let t=F.from(Ee(i,e,e+32)).toNumber(),n=F.from(Ee(i,t,t+32)).toNumber();return Ee(i,t+32,t+32+n)}function gd(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):he.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function Qc(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function u5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function Yc(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:_t([e,Ci(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=_t(["0x9061b923",Yc([$a(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=ps(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=o5[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return Jc(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return Jc(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=vd.default.toWords(r.slice(2));return o.unshift(s),vd.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===Qr?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",xd(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;n<$c.length;n++){let r=t.match($c[n]);if(r==null)continue;let a=r[1].toLowerCase();switch(a){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:gd(t)};case"erc721":case"erc1155":{let s=a==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:a,content:t});let o=this._resolvedAddress||(yield this.getAddress()),d=(r[2]||"").split("/");if(d.length!==2)return null;let p=yield this.provider.formatter.address(d[0]),c=me(F.from(d[1]).toHexString(),32);if(a==="erc721"){let S=this.provider.formatter.callAddress(yield this.provider.call({to:p,data:_t(["0x6352211e",c])}));if(o!==S)return null;e.push({type:"owner",content:S})}else if(a==="erc1155"){let S=F.from(yield this.provider.call({to:p,data:_t(["0x00fdd58e",me(o,32),c])}));if(S.isZero())return null;e.push({type:"balance",content:S.toString()})}let b={to:this.provider.formatter.address(d[0]),data:_t([s,c])},I=zo(yield this.provider.call(b),0);if(I==null)return null;e.push({type:"metadata-url-base",content:I}),a==="erc1155"&&(I=I.replace("{id}",c.substring(2)),e.push({type:"metadata-url-expanded",content:I})),I.match(/^ipfs:/i)&&(I=gd(I)),e.push({type:"metadata-url",content:I});let _=yield Rn(I);if(!_)return null;e.push({type:"metadata",content:JSON.stringify(_)});let v=_.image;if(typeof v!="string")return null;if(!v.match(/^(https:\/\/|data:)/i)){if(v.match(Xc)==null)return null;e.push({type:"url-ipfs",content:v}),v=gd(v)}return e.push({type:"url",content:v}),{linkage:e,url:v}}}}}catch{}return null})}getContentHash(){return ue(this,void 0,void 0,function*(){let e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;let t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let s=parseInt(t[3],16);if(t[4].length===s*2)return"ipfs://"+yi.encode("0x"+t[1])}let n=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){let s=parseInt(n[3],16);if(n[4].length===s*2)return"ipns://"+yi.encode("0x"+n[1])}let r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===32*2)return"bzz://"+r[1];let a=e.match(/^0x90b2c605([0-9a-f]*)$/);if(a&&a[1].length===34*2){let s={"=":"","+":"-","/":"_"},o=Zr("0x"+a[1]).replace(/[=+\/]/g,d=>s[d]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=Te(e);t=ye([xd(64),xd(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Td=null,l5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ft(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Td==null&&(Td=new Y),Td}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield Rn({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(ds()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=ds(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=ds();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=l5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Kc(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Kc(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return W(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=r5&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Nt(a)%32===4)try{let s=Ee(a,4),o=Ee(s,0,32);F.from(o).eq(r)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ee(s,32,64)).toNumber(),c=F.from(Ee(s,p,p+32)).toNumber(),b=Ee(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new Ta(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ci(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=zo(yield this.call({to:n,data:"0x691f3431"+Ci(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new Ta(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ci(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new wd(ga(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=ga(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=ga(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=ga(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=ga(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=ga(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var xi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},kt=new M(Ae),d5=["call","estimateGas"];function cs(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=cs(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return cs(JSON.parse(i),e)}catch{}return null}function ef(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=cs(e,!0);if(a)return a.data;kt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=cs(e.body,!1);a==null&&(a=cs(e,!1)),a&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&kt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&kt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&kt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&kt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),d5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&kt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function Zc(i){return new Promise(function(e){setTimeout(e,i)})}function p5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function ys(i){return i&&i.toLowerCase()}var _d={},va=class extends St{constructor(e,t,n){if(super(),e!==_d)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):kt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return kt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ad(_d,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&kt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>xi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&kt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&kt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),ef("sendTransaction",s,a)))})}signTransaction(e){return kt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>xi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return xi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return xi(this,void 0,void 0,function*(){let r=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(bt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&kt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return xi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Ad=class extends va{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},y5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=ft(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xi(this,void 0,void 0,function*(){yield Zc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ft(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return kt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new va(_d,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=Rn(this.connection,JSON.stringify(n),p5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ft(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&kt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return ef(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return Zc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(y5);if(t)for(let a in t)t[a]&&(n[a]=!0);zr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=Ln(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=sn(e.accessList)),r}};var wa=null;try{if(wa=WebSocket,wa==null)throw new Error("inject please")}catch{let e=new M(Ae);wa=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var kd=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Wo=new M(Ae),c5=1,gi=class extends Yt{constructor(e,t){t==="any"&&Wo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wa(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Wo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Wo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return kd(this,void 0,void 0,function*(){return null})}set polling(e){!e||Wo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=c5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return kd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return kd(this,void 0,void 0,function*(){this.websocket.readyState===wa.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var f5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},fs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return f5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ms{constructor(e,t){fs.checkAbstract(new.target,It),e=ft(new.target,"getNetwork")(e),t=ft(new.target,"getApiKey")(t);let n=ft(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var tf=new M(Ae),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends gi{constructor(e,t){let n=new _a(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Ko}},_a=class extends It{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?Ko:(e&&typeof e!="string"&&tf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:tf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===Ko&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var m5=new M(Ae),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function h5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return m5.throwArgumentError("unsupported network","name",i)}var bs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let n={allowGzip:!0,url:"https://"+h5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var b5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},nf=new M(Ae),xs=class extends It{static getApiKey(e){return e!=null&&nf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:nf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return b5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var $o=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Oi=new M(Ae);function rf(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(W(n)):t==="accessList"?n="["+sn(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function x5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function af(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function sf(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Md(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;Oi.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oi.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oi.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&Oi.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oi.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return $o(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?af:x5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield Rn(o,d,s||af);return this.emit("debug",{action:"response",request:r,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Md("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=rf(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Md("call",a,t.transaction)}}case"estimateGas":{let r=rf(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Md("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=sf(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=sf(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oi.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oi.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Yo=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},xr=new M(Ae);function Qo(){return new Date().getTime()}function of(i){let e=null;for(let t=0;te?null:(n+r)/2}function Aa(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Aa(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Aa(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var g5=1;function lf(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var T5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],v5=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function w5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function _5(i,e,t){let n=Aa;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=uf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return uf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Aa(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Aa(r))}:n=function(r){return r==null?null:Aa(r)};break;default:throw new Error("unknown method: "+e)}return w5(n,i.quorum)}function Ts(i,e){return Yo(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function A5(i,e,t,n){return Yo(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield Ts(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield Ts(i,e)),r.getLogs(a)}}return xr.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&xr.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let c=ls(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=ls(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&xr.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&xr.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=of(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return of(e)})}perform(e,t){return Yo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=Qo(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=A5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield lf(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return T5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};v5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),xr.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),xr.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>Xo(d)),provider:this})})}};var Ed=null;var Zo=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends gi{constructor(e,t){let n=new ka(e,t),r=n.connection;r.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},ka=class extends It{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===ws}};var eu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Cd=new M(Ae),k5="ETHERS_JS_SHARED",As=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cd.throwArgumentError("invalid apiKey","apiKey",e),e||k5}static getUrl(e,t){Cd.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Cd.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var df=new M(Ae),pf="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:df.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:df.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===pf}};var yf=new M(Ae),M5=1;function cf(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:M5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function E5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Ms=class extends Yt{constructor(e,t){e==null&&yf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=E5(e)):e.sendAsync?r=cf(e,e.sendAsync.bind(e)):e.send?r=cf(e,e.send.bind(e)):yf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var ff=new M(Ae);function tu(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(i);case"ws":case"wss":return new gi(i);default:ff.throwArgumentError("unsupported URL scheme","network",i)}}let t=ss(i);return(!t||!t._defaultProvider)&&ff.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_a,AnkrProvider:bs,CloudflareProvider:xs,EtherscanProvider:gs,InfuraProvider:ka,JsonRpcProvider:Yt,NodesmithProvider:As,PocketProvider:ks,Web3Provider:Ms,IpcProvider:null},e)}var ne={};Hr(ne,{AbiCoder:()=>Xr,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>xe,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oi,Interface:()=>Ii,LogDescription:()=>ta,Logger:()=>M,ParamType:()=>dt,RLP:()=>Xs,SigningKey:()=>fn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>na,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>md,_toEscapedUtf8String:()=>Tl,accessListify:()=>sn,arrayify:()=>V,base58:()=>yi,base64:()=>Ml,checkProperties:()=>zr,checkResultErrors:()=>Kr,commify:()=>wf,computeAddress:()=>mn,computeHmac:()=>ci,computePublicKey:()=>Ya,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Ka,defaultPath:()=>fi,defineReadOnly:()=>B,dnsEncode:()=>$a,entropyToMnemonic:()=>br,fetchJson:()=>Rn,formatBytes32String:()=>vl,formatEther:()=>_f,formatUnits:()=>Id,getAccountPath:()=>cc,getAddress:()=>fe,getContractAddress:()=>ur,getCreate2Address:()=>E0,getIcapAddress:()=>M0,getJsonWalletAddress:()=>dd,getStatic:()=>ft,hashMessage:()=>ea,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ee,hexStripZeros:()=>ll,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>k0,isBytes:()=>on,isBytesLike:()=>ii,isHexString:()=>re,isValidMnemonic:()=>yc,isValidName:()=>Cl,joinSignature:()=>Fa,keccak256:()=>ce,mnemonicToEntropy:()=>ma,mnemonicToSeed:()=>id,namehash:()=>Ci,nameprep:()=>kl,parseBytes32String:()=>wl,parseEther:()=>Af,parseTransaction:()=>Co,parseUnits:()=>Sd,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yr,recoverPublicKey:()=>Mo,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Za,sha256:()=>Xt,sha512:()=>Zl,shallowCopy:()=>we,shuffled:()=>rs,solidityKeccak256:()=>bf,solidityPack:()=>nu,soliditySha256:()=>xf,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>Te,toUtf8CodePoints:()=>Ei,toUtf8String:()=>Jt,verifyMessage:()=>Sc,verifyTypedData:()=>Rc,zeroPad:()=>rr});var mf="solidity/5.7.0";var C5=new RegExp("^bytes([0-9]+)$"),I5=new RegExp("^(u?int)([0-9]*)$"),S5=new RegExp("^(.*)\\[([0-9]*)\\]$"),R5="0000000000000000000000000000000000000000000000000000000000000000",Ma=new M(mf);function hf(i,e,t){switch(i){case"address":return t?rr(e,32):V(e);case"string":return Te(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?rr(e,32):V(e)}let n=i.match(I5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ma.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),rr(e,r/8)}if(n=i.match(C5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ma.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ma.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+R5).substring(0,66)):e}if(n=i.match(S5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ma.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(hf(r,o,!0))}),ye(s)}return Ma.throwArgumentError("invalid type","type",i)}function nu(i,e){i.length!=e.length&&Ma.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(hf(n,e[r]))}),W(ye(t))}function bf(i,e){return ce(nu(i,e))}function xf(i,e){return Xt(nu(i,e))}var gf="units/5.7.0";var Tf=new M(gf),vf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wf(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&Tf.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Id(i,e){if(typeof e=="string"){let t=vf.indexOf(e);t!==-1&&(e=3*t)}return Gr(i,e??18)}function Sd(i,e){if(typeof i!="string"&&Tf.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=vf.indexOf(e);t!==-1&&(e=3*t)}return ln(i,e??18)}function _f(i){return Id(i,18)}function Af(i){return Sd(i,18)}var iu="ethers/5.7.2";var kf=new M(iu);try{let i=window;i._ethers==null&&(i._ethers=Rd)}catch{}var Nn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Nn||(Nn={}));var ru;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(ru||(ru={}));var Ea;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Ea||(Ea={}));var au;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(au||(au={}));var Pd;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(Pd||(Pd={}));var Es;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Es||(Es={}));var Cs;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Cs||(Cs={}));var Nd;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Nd||(Nd={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(zt||(zt={}));var Od="0x12345678",Dd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(Dd||(Dd={}));var Tt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(Tt||(Tt={}));var ve;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ve||(ve={}));var Bd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gr=class{static createInterface(){return new ne.Interface(Bd)}static connect(e,t){return new oe(e,Bd,t)}};Mt(gr,"abi",Bd);var Fd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Tr=class{static createInterface(){return new ne.Interface(Fd)}static connect(e,t){return new oe(e,Fd,t)}};Mt(Tr,"abi",Fd);var Mf=(i,e)=>{throw new Error(`${e}: ${i}`)},Ld=i=>i!=null;var{keccak256:N5,toUtf8Bytes:D5}=ne,{MaxUint256:O5}=mt;var Ud=i=>ne.formatEther(i);var jd=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(Tt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ld)},vr=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return O5;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Bi=i=>N5(D5(i));var Ca=async(i,e)=>(await Tr.connect(i,e).version()).toNumber(),Vd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ld);var{hexDataSlice:Hd}=ne,{MaxUint256:B5}=mt,Ef=i=>{let e=Hd(i,0,3),t=F.from(Hd(i,4,35)),n=F.from(Hd(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Cf=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),B5,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await vr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},F5=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>Cf(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ti(i,e,t,n[0],r):F5(i,e,t,n,r):Cf(i,e,t,n,r);var{MaxUint256:If}=mt,{AddressZero:L5}=mt;async function U5(i,e){let t;try{return t=await i.getCapabilityRoles(ne.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Is(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Ef(s),I=gr.connect(a,n.signer||n.provider),_=await U5(I,p);if(_.includes(Tt.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=If}else{let{skillId:U}=await e.getDomain(c),H=await i.getChildSkillId(U,b);if(H.eq(d))o=If;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,L5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:j5}=mt,ni=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Ea[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await ni.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await ni.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return ni.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${j5}/noProof`,s=await ni.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var wt=i=>Array.from(Array(i-1)).map(e=>e+1);var Sf=10,yA=wt(Sf),Rf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pf=Sf-1;var Nf=6,mA=wt(Nf),Df={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Of=Nf-1;var Bf=7,xA=wt(Bf),Ff={1:[],2:[],3:[],4:[],5:[],6:[]},Lf=Bf-1;var Uf=7,vA=wt(Uf),jf={1:[],2:[],3:[],4:[],5:[],6:[]},Vf=Uf-1;var Hf=4,AA=wt(Hf),qf={1:[],2:[],3:[]},Gf=Hf-1;var zf=5,EA=wt(zf),Wf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Kf=zf-1;var Jf=2,SA=wt(Jf),$f={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Qf=Jf-1;var Xf=4,NA=wt(Xf),Yf={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Zf=Xf-1;var em=7,BA=wt(em),tm={1:[],2:[],3:[],4:[],5:[],6:[]},nm=em-1;var im=11,UA=wt(im),qd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gd=im-1;var rm=6,HA=wt(rm),am={1:[],2:[],3:[],4:[],5:[]},sm=rm-1;var Fi=(i,e,t)=>{switch(i){case ve.CoinMachine:{let n=Rf[e];return!!n&&!n.includes(t)}case ve.EvaluatedExpenditure:{let n=Df[e];return!!n&&!n.includes(t)}case ve.FundingQueue:{let n=Ff[e];return!!n&&!n.includes(t)}case ve.IVotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.OneTxPayment:{let n=jf[e];return!!n&&!n.includes(t)}case ve.ReputationBootstrapper:{let n=qf[e];return!!n&&!n.includes(t)}case ve.StagedExpenditure:{let n=$f[e];return!!n&&!n.includes(t)}case ve.StakedExpenditure:{let n=Wf[e];return!!n&&!n.includes(t)}case ve.StreamingPayments:{let n=Yf[e];return!!n&&!n.includes(t)}case ve.TokenSupplier:{let n=tm[e];return!!n&&!n.includes(t)}case ve.VotingReputation:{let n=qd[e];return!!n&&!n.includes(t)}case ve.Whitelist:{let n=am[e];return!!n&&!n.includes(t)}default:return Mf(i,"Could not find extension with name")}};var V5={[ve.CoinMachine]:Pf,[ve.EvaluatedExpenditure]:Of,[ve.FundingQueue]:Lf,[ve.IVotingReputation]:Gd,[ve.OneTxPayment]:Vf,[ve.ReputationBootstrapper]:Gf,[ve.StagedExpenditure]:Qf,[ve.StakedExpenditure]:Kf,[ve.StreamingPayments]:Zf,[ve.TokenSupplier]:nm,[ve.VotingReputation]:Gd,[ve.Whitelist]:sm};var Ch=_n(om(),1);var yp=_n(kh(),1);var Se;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Se||(Se={}));var pp=2,dp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(dp||(dp={}));var Mh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,ex=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),cp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Se.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Mh(t.errors);throw new Error(n)};var Eh=(i,e)=>{let t=i===Se.Colony?ex(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:pp});if(!n.success){let r=Mh(n.errors);throw new Error(r)}return n.data};var fp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=fp;var hp=(0,Ch.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Fs={[Se.Annotation]:"Annotation(address,bytes32,string)",[Se.Colony]:"ColonyMetadata(address,string)",[Se.Decision]:"Annotation(address,bytes32,string)",[Se.Domain]:"DomainMetadata(address,uint256,string)",[Se.Misc]:"",[Se.DEFAULT]:""},Na=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Fs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await hp(n)).json();return cp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await hp(n)).json(),s=Object.entries(Fs).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return cp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Eh(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var mM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};Mt(Tn,"abi",bp);var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};Mt(vn,"abi",xp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Er=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};Mt(Er,"abi",gp);var ju=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Ih="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",rx=i=>i.length>1,Dn=class extends fr{constructor(...e){rx(e)?super(...e):super(ju,Ih,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(ju)}static connect(e,t){return new oe(e,ju,t)}};Mt(Dn,"bytecode",Ih),Mt(Dn,"abi",ju);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Cr=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};Mt(Cr,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ir=class{static createInterface(){return new ne.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};Mt(Ir,"abi",vp);var Sr;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Sr||(Sr={}));var wn;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(wn||(wn={}));var{AddressZero:Sh}=mt;async function ox(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var ux=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Dn.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await ox(t)}catch{n=!1}try{await t.getMetatransactionNonce(Sh)}catch{r=!1}try{await t.nonces(Sh)}catch{a=!1}return n?r?t.tokenClientType=wn.Colony:(t=Cr.connect(i,e),t.tokenClientType=wn.ColonyLegacy):a?(t=vn.connect(i,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(i,e),t.tokenClientType=wn.Erc20),t.clientType=Sr.TokenClient,t},wp=ux;var lx=(i,e)=>{let t=Ir.connect(i,e);return t.clientType=Sr.TokenLockingClient,t},_p=lx;var{AddressZero:Ap}=mt,dx=Tn.connect(Ap,new ei.BaseProvider(3656691)).interface,px=Er.connect(Ap,new ei.BaseProvider(3656691)).interface,yx=vn.connect(Ap,new ei.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Ls.abi=kp;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Rr=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Rr.abi=Ep;var Ti=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Fs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:fx,solidityKeccak256:mx,splitSignature:hx}=ne,Pr=class extends Ti{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Nn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=mx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=fx(d),c=await n.signMessage(p),{r:b,s:I,v:_}=hx(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Vu=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Nr=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Nr.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Dr=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Dr.abi=Ip;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Or=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Or.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Br=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Br.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fr=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fr.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Lr=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Lr.abi=Np;var{AddressZero:_x}=mt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(On.extensionType),e.address);if(t===_x)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=On.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,a,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding],this.oneTxPaymentContract.address),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Tt.Administration,Tt.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.OneTxPayment),t],async n=>({...te("ExtensionUpgraded",n)}))}},ji=On;ji.supportedVersions=[{version:3,factory:Br},{version:4,factory:Fr},{version:5,factory:Lr}],ji.extensionType=ve.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...te("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...te("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...te("Approval",n)}))}};var js=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...te("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...te("LogSetOwner",n)}))}};var Vs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...te("Approval",r)}))}};var Rh=async(i,e)=>{let t=await wp(e,i.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new js(i,t);case wn.Erc20:return new Bn(i,t);case wn.Erc2612:return new Vs(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ur=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ur.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],jr=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};jr.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new ne.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Vr.abi=Bp;var{AddressZero:Fp}=mt;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Bi(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ca(t,e.colonyNetwork.signerOrProvider);if(!Fi(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,a,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return ne.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Is(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Od);return[e,t,Fp,Od,n,r,a,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Se.Decision,t),[e,n]},async n=>({...te("Annotation",n)}),{metadataType:Se.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Vu("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ud(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ti(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Tt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...te("MotionStaked",a),...te("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...te("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...te("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...te("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...te("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Bi(ve.VotingReputation),t],async n=>({...te("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Vi=Fn;Vi.supportedVersions=[{version:7,factory:Ur},{version:8,factory:jr},{version:9,factory:Vr}],Vi.extensionType=ve.VotingReputation;var Ex={["motion"]:Vi,["oneTx"]:ji},Oa=class{static async connect(e,t){let n=await Ca(t,e.signerOrProvider),r=Oa.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await Rh(e,s),d=new Oa(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return Oa.supportedVersions[Oa.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new ni(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Da({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Vi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ji.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Se.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Se.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Se.Domain,e),[_e.RootDomain,t]},{roles:Tt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Se.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Tt.Architecture,domain:e},async n=>({...te("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...te("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ti(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,Tt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await vr(b,this.colony,a,s),_=await vr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...te("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...te("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Se.Annotation,t),[e,n]},async n=>({...te("Annotation",n)}),{metadataType:Se.Annotation})}installExtension(e){let t=Ex[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!Fi(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Bi(r),t.getLatestSupportedVersion()],async s=>({...Vu("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return su(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...te("ColonyRoleSet",r),...te("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=jd(a);return[e,n,s]},{roles:Tt.Architecture,domain:n},async r=>({...te("ColonyRoleSet",r),...te("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...te("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...te("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...te("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:Tt.Arbitration},async r=>({...te("ArbitraryReputationUpdate",r)}))}},Ba=Oa;Ba.supportedVersions=[{version:11,factory:Nr},{version:12,factory:Dr},{version:13,factory:Or}];var{splitSignature:Cx}=ne,qu=class extends Ti{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Cx(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Hs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...te("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...te("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Ph}=ne,{AddressZero:Lp}=mt,qs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Na(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||au[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Ea[this.network]},this.networkContract=Rr.connect(t?.customNetworkAddress||ru[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Hs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new Ti({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Pr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Se.Colony,n),a},async a=>({...te("TokenDeployed",a),...te("ColonyAdded",a),...te("TokenAuthorityDeployed",a)}),{metadataType:Se.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...te("TokenDeployed",a),...te("ColonyAdded",a),...te("TokenAuthorityDeployed",a)}))}async getColony(e){return Ba.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.network],""):null}async getColonyAddress(e){let t=Ph(`${e}${Es[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.network],""):null}async getUserAddress(e){let t=Ph(`${e}${Cs[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...te("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...te("TokenDeployed",r)}))}};var Nh=new ei.Web3Provider(window.ethereum),Ix=async i=>new qs(i).getMetaColony(),Sx=async()=>(await Nh.send("eth_requestAccounts",[]),Nh.getSigner()),Dh=document.querySelector("#button"),jp=document.querySelector("#error"),Oh=document.querySelector("#result");if(!Dh||!jp||!Oh)throw new Error("Could not find all required HTML elements");var Rx=i=>{jp.innerText=i},Px=()=>{jp.innerText=""},Up=i=>{Oh.innerText=i};Dh.addEventListener("click",async()=>{Px(),Up("Thinking...");try{let i=await Sx(),e=await Ix(i);Up(`Connected to metaColonyClient with version ${e.version}`)}catch(i){Rx(`Found an error: ${i.message}`),Up("")}});})(); +`)}static register(e,t){if(t||(t=e.locale),O5)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var B5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ns=null;function df(a){if(ns==null&&(ns=B5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ns=null,new Error("BIP39 Wordlist for en (English) FAILED")}var el=class extends hn{constructor(){super("en")}getWord(e){return df(this),ns[e]}getWordIndex(e){return df(this),ns.indexOf(e)}},tl=new el;hn.register(tl);var hi={en:tl};var lf="hdnode/5.7.0";var as=new M(lf),F5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),L5=ve("Bitcoin seed"),cr=2147483648;function yf(a){return(1<=256)throw new Error("Depth too large!");return pf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(fr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~cr));let n=new Uint8Array(37);if(e&cr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(F5)):l=new cn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(fr,o,l,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=cr)throw new Error("invalid path index - "+r);n=n._derive(cr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=cr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,L5,n));return new It(fr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=nl(n),e=xi(mr(e,n),n),It._fromSeed(al(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(fr,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(fr,W(o.slice(1)),null,i,s,r,n,null)}return as.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(a,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(a,Gt.NFKD),t,2048,64,"sha512")}function mr(a,e){e=nl(e),as.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=yf(s);if((j(Xt(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function xi(a,e){if(e=nl(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&U5(8-n)),n+=3);let i=a.length/4,r=j(Xt(a))[0]&yf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function ff(a,e){try{return mr(a,e),!0}catch{}return!1}function cf(a){return(typeof a!="number"||a<0||a>=cr||a%1)&&as.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var mf="random/5.7.0";var il=new M(mf);function V5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hf=V5(),Oo=hf.crypto||hf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(a){return il.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(a){(a<=0||a>1024||a%1||a!=a)&&il.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Oo.getRandomValues(e),j(e)}function is(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var ol=_n(sl());var Bo="json-wallets/5.7.0";function ma(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function hr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:bf(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Xn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+hr(I.getUTCMonth()+1,2)+"-"+hr(I.getUTCDate(),2)+"T"+hr(I.getUTCHours(),2)+"-"+hr(I.getUTCMinutes(),2)+"-"+hr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(a,e,t){if(Fo(a)){t&&t(0);let n=dl(a,e);return t&&t(1),Promise.resolve(n)}return Lo(a)?Mf(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function If(a,e){if(Fo(a))return dl(a,e);if(Lo(a))return Af(a,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var Sf=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},xr=new M(Cf);function z5(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function W5(a){let e=a.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),z5(e)){let n=new cn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&xr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),W5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&xr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&xr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new cn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&xr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&xr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(fe(Zr(t)));return Zr(t,n)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Fr(this._signingKey().signDigest(er(e)))})}_signTypedData(e,t,n){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,r=>(this.provider==null&&xr.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Fr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,n)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let n=xi(t,e.locale);return Cn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ef(e,t,n).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(If(e,t))}static fromMnemonic(e,t,n){return t||(t=ca),new Cn(It.fromMnemonic(e,null,n).derivePath(t))}};function Rf(a,e){return yi(er(a),e)}function Pf(a,e,t,n){return yi(bt.hash(a,e,t),n)}var ea={};Hi(ea,{AlchemyProvider:()=>_r,AlchemyWebSocketProvider:()=>hs,AnkrProvider:()=>xs,BaseProvider:()=>Zn,CloudflareProvider:()=>bs,EtherscanProvider:()=>gs,FallbackProvider:()=>vs,Formatter:()=>Y,InfuraProvider:()=>Ar,InfuraWebSocketProvider:()=>_s,IpcProvider:()=>El,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>vr,NodesmithProvider:()=>ks,PocketProvider:()=>As,Provider:()=>$t,Resolver:()=>Tr,StaticJsonRpcProvider:()=>ms,UrlJsonRpcProvider:()=>Ct,Web3Provider:()=>Ms,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>ss,isCommunityResourcable:()=>xl,isCommunityResource:()=>ds,showThrottleMessage:()=>Yn});var Nf="networks/5.7.1";var Df=new M(Nf);function K5(a){return a&&typeof a.renetwork=="function"}function xa(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function jo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return jo(a,n)},t}var Of={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Ff={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Of,mainnet:Of,morden:{chainId:2,name:"morden"},ropsten:Bf,testnet:Bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ss(a){if(a==null)return null;if(typeof a=="number"){for(let n in Vo){let i=Vo[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Vo[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Vo[a.name];if(!e)return typeof a.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(K5(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lf="web/5.7.1";var J5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Uf(a,e){return J5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var $5=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Sn=new M(Lf);function Vf(a){return new Promise(e=>{setTimeout(e,a)})}function Da(a,e){if(a==null)return null;if(typeof a=="string")return a;if(aa(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(a)}catch{}return W(a)}return a}function Q5(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Sn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Sn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+Zi(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):Q5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return $5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let E=yield t(H,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return ml(a,i,n)}function Pn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&n(f)})}p()})}var vl=_n(Gf());var Ae="providers/5.7.2";var us=new M(Ae),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),gasLimit:n,to:Y.allowNull(t,null),value:n,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(n),gasPrice:Y.allowNull(n),maxPriorityFeePerGas:Y.allowNull(n),maxFeePerGas:Y.allowNull(n),to:Y.allowNull(t),value:Y.allowNull(n),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:n,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:Y.allowNull(n),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():us.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===ro?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Nt(n)!==32?us.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Io(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&us.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):us.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&us.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function xl(a){return a&&typeof a.isCommunityResource=="function"}function ds(a){return xl(a)&&a.isCommunityResource()}var zf=!1;function Yn(){zf||(zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new M(Ae),ix=10;function Wf(a){return a==null?"null":(Nt(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function Kf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Wf(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return Wf(e)}).join("&")}function rx(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function gr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Nt(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+Kf(a);if(xo.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+Kf(a.topics||[])}throw new Error("invalid event - "+a)}function ls(){return new Date().getTime()}function Jf(a){return new Promise(e=>{setTimeout(e,a)})}var sx=["block","network","pending","poll"],wl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=rx(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||sx.indexOf(this.tag)>=0}},ox={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bl(a){return me(F.from(a).toHexString(),32)}function $f(a){return ya.encode(ye([a,Ie(Xt(Xt(a)),0,4)]))}var Yf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(a,e){try{return Jt(ps(a,e))}catch{}return null}function ps(a,e){if(a==="0x")return null;let t=F.from(Ie(a,e,e+32)).toNumber(),n=F.from(Ie(a,t,t+32)).toNumber();return Ie(a,t+32,t+32+n)}function gl(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function Xf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function ux(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function Zf(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=kt(["0x9061b923",Zf([$r(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=ps(r,0)),r}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?ps(n,0):null})}_getAddress(e,t){let n=ox[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=vl.default.toWords(i.slice(2));return o.unshift(s),vl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Qi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===M.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",bl(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([bl(64),bl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Jt(n)})}},Tl=null,dx=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Tl==null&&(Tl=new Y),Tl}static getNetwork(e){return ss(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,M.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ls()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ls(),n=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=ls();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=dx++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jf(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ls();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ce(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=ix&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new Tr(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ia(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=zo(yield this.call({to:n,data:"0x691f3431"+Ia(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Tr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ia(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new wl(gr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=gr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=gr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=gr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=gr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=gr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var ba=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new M(Ae),lx=["call","estimateGas"];function fs(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=fs(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return fs(JSON.parse(a),e)}catch{}return null}function tc(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=fs(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=fs(e.body,!1);r==null&&(r=fs(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),lx.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function ec(a){return new Promise(function(e){setTimeout(e,a)})}function px(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function ys(a){return a&&a.toLowerCase()}var _l={},vr=class extends St{constructor(e,t,n){if(super(),e!==_l)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kl(_l,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ba(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),tc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},kl=class extends vr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},yx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield ec(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new vr(_l,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(n),px).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ys(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ys(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ys(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ys(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ys(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return tc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return ec(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(yx);if(t)for(let r in t)t[r]&&(n[r]=!0);zi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var wr=null;try{if(wr=WebSocket,wr==null)throw new Error("inject please")}catch{let e=new M(Ae);wr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Wo=new M(Ae),fx=1,ga=class extends Yt{constructor(e,t){t==="any"&&Wo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new wr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Wo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Wo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Al(this,void 0,void 0,function*(){return null})}set polling(e){!e||Wo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=fx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Al(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Al(this,void 0,void 0,function*(){this.websocket.readyState===wr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var cx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},cs=new M(Ae),ms=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return cx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||cs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Ct=class extends ms{constructor(e,t){cs.checkAbstract(new.target,Ct),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){cs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return cs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return cs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new M(Ae),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",hs=class extends ga{constructor(e,t){let n=new _r(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Ko}},_r=class extends Ct{static getWebSocketProvider(e,t){return new hs(e,t)}static getApiKey(e){return e==null?Ko:(e&&typeof e!="string"&&nc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===Ko&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var mx=new M(Ae),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function hx(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return mx.throwArgumentError("unsupported network","name",a)}var xs=class extends Ct{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let n={allowGzip:!0,url:"https://"+hx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var xx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},ac=new M(Ae),bs=class extends Ct{static getApiKey(e){return e!=null&&ac.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return xx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var $o=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Oa=new M(Ae);function ic(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Ln(W(n)):t==="accessList"?n="["+sn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function bx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function rc(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function sc(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Ml(a,e,t){if(a==="call"&&e.code===M.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var gs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return $o(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?rc:bx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Ml("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ic(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ml("call",r,t.transaction)}}case"estimateGas":{let i=ic(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ml("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=sc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=sc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Yo=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(n.next(f))}catch(x){s(x)}}function l(f){try{p(n.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bi=new M(Ae);function Qo(){return new Date().getTime()}function oc(a){let e=null;for(let t=0;te?null:(n+i)/2}function kr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>kr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=kr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var gx=1;function dc(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var Tx=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],vx=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function wx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function _x(a,e,t){let n=kr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=uc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return uc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,kr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),kr(i))}:n=function(i){return i==null?null:kr(i)};break;default:throw new Error("unknown method: "+e)}return wx(n,a.quorum)}function Ts(a,e){return Yo(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function kx(a,e,t,n){return Yo(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield Ts(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Ts(a,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var vs=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if($t.isProvider(s)){let f=ds(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ds(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return oc(e)})}perform(e,t){return Yo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=kx(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return Tx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};vx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Xo(l)),provider:this})})}};var El=null;var Zo=new M(Ae),ws="84842078b09946638c03157f83405213",_s=class extends ga{constructor(e,t){let n=new Ar(e,t),i=n.connection;i.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ws}},Ar=class extends Ct{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){let t={apiKey:ws,projectId:ws,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===ws&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ws}};var eu=class extends Yt{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Il=new M(Ae),Ax="ETHERS_JS_SHARED",ks=class extends Ct{static getApiKey(e){return e&&typeof e!="string"&&Il.throwArgumentError("invalid apiKey","apiKey",e),e||Ax}static getUrl(e,t){Il.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Il.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var lc=new M(Ae),pc="62e1ad51b37b8e00394bda3b",As=class extends Ct{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:lc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:lc.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===pc}};var yc=new M(Ae),Mx=1;function fc(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:Mx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function Ex(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Ms=class extends Yt{constructor(e,t){e==null&&yc.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Ex(e)):e.sendAsync?i=fc(e,e.sendAsync.bind(e)):e.send?i=fc(e,e.send.bind(e)):yc.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new M(Ae);function tu(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Yt(a);case"ws":case"wss":return new ga(a);default:cc.throwArgumentError("unsupported URL scheme","network",a)}}let t=ss(a);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:vs,AlchemyProvider:_r,AnkrProvider:xs,CloudflareProvider:bs,EtherscanProvider:gs,InfuraProvider:Ar,JsonRpcProvider:Yt,NodesmithProvider:ks,PocketProvider:As,Web3Provider:Ms,IpcProvider:null},e)}var ne={};Hi(ne,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>It,Indexed:()=>oa,Interface:()=>Ca,LogDescription:()=>tr,Logger:()=>M,ParamType:()=>pt,RLP:()=>Xs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>nr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Md,checkProperties:()=>zi,checkResultErrors:()=>Ki,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>$r,entropyToMnemonic:()=>xi,fetchJson:()=>Rn,formatBytes32String:()=>vd,formatEther:()=>_c,formatUnits:()=>Cl,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ey,getIcapAddress:()=>My,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>er,hexConcat:()=>kt,hexDataLength:()=>Nt,hexDataSlice:()=>Ie,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Id,joinSignature:()=>Fr,keccak256:()=>fe,mnemonicToEntropy:()=>mr,mnemonicToSeed:()=>al,namehash:()=>Ia,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>kc,parseTransaction:()=>Io,parseUnits:()=>Sl,poll:()=>Pn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ce,ripemd160:()=>ts,serializeTransaction:()=>Zr,sha256:()=>Xt,sha512:()=>Zd,shallowCopy:()=>_e,shuffled:()=>is,solidityKeccak256:()=>xc,solidityPack:()=>nu,soliditySha256:()=>bc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ii});var mc="solidity/5.7.0";var Ix=new RegExp("^bytes([0-9]+)$"),Cx=new RegExp("^(u?int)([0-9]*)$"),Sx=new RegExp("^(.*)\\[([0-9]*)\\]$"),Rx="0000000000000000000000000000000000000000000000000000000000000000",Mr=new M(mc);function hc(a,e,t){switch(a){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let n=a.match(Cx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(n=a.match(Ix),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+Rx).substring(0,66)):e}if(n=a.match(Sx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",a)}function nu(a,e){a.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(hc(n,e[i]))}),W(ye(t))}function xc(a,e){return fe(nu(a,e))}function bc(a,e){return Xt(nu(a,e))}var gc="units/5.7.0";var Tc=new M(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Tc.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Cl(a,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return Gi(a,e??18)}function Sl(a,e){if(typeof a!="string"&&Tc.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(a,e??18)}function _c(a){return Cl(a,18)}function kc(a){return Sl(a,18)}var au="ethers/5.7.2";var Ac=new M(au);try{let a=window;a._ethers==null&&(a._ethers=Rl)}catch{}var Nn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Nn||(Nn={}));var iu;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(iu||(iu={}));var Er;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Er||(Er={}));var ru;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(ru||(ru={}));var Pl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Pl||(Pl={}));var Es;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Es||(Es={}));var Is;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Is||(Is={}));var Nl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(Nl||(Nl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new ne.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ne.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Mc=(a,e)=>{throw new Error(`${e}: ${a}`)},Ll=a=>a!=null;var{keccak256:Nx,toUtf8Bytes:Dx}=ne,{MaxUint256:Ox}=ht;var Ul=a=>ne.formatEther(a);var Vl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return Ox;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Ba=a=>Nx(Dx(a));var Ir=async(a,e)=>(await Ti.connect(a,e).version()).toNumber(),jl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ne,{MaxUint256:Bx}=ht,Ec=a=>{let e=Hl(a,0,3),t=F.from(Hl(a,4,35)),n=F.from(Hl(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ic=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),Bx,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await vi(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},Fx=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Ic(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ta(a,e,t,n[0],i):Fx(a,e,t,n,i):Ic(a,e,t,n,i);var{MaxUint256:Cc}=ht,{AddressZero:Lx}=ht;async function Ux(a,e){let t;try{return t=await a.getCapabilityRoles(ne.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),C=gi.connect(r,n.signer||n.provider),_=await Ux(C,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Cc}else{let{skillId:U}=await e.getDomain(f),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Cc;else{let{children:E}=await a.getSkill(l),J=E.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,Lx);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:Vx}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Nn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${Vx}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var _t=a=>Array.from(Array(a-1)).map(e=>e+1);var Sc=10,Rk=_t(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=6,Dk=_t(Nc),Dc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Oc=Nc-1;var Bc=7,Fk=_t(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[]},Lc=Bc-1;var Uc=7,Vk=_t(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=4,qk=_t(Hc),qc={1:[],2:[],3:[]},Gc=Hc-1;var zc=5,Wk=_t(zc),Wc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},Kc=zc-1;var Jc=2,$k=_t(Jc),$c={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Qc=Jc-1;var Xc=4,Yk=_t(Xc),Yc={1:[1,2,3],2:[1,2,3],3:[1,2,3]},Zc=Xc-1;var em=7,tA=_t(em),tm={1:[],2:[],3:[],4:[],5:[],6:[]},nm=em-1;var am=11,iA=_t(am),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Gl=am-1;var im=6,oA=_t(im),rm={1:[],2:[],3:[],4:[],5:[]},sm=im-1;var Fa=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Rc[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=Dc[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Fc[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=Vc[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=qc[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=$c[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=Wc[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=Yc[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=tm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=ql[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=rm[e];return!!n&&!n.includes(t)}default:return Mc(a,"Could not find extension with name")}};var jx={[we.CoinMachine]:Pc,[we.EvaluatedExpenditure]:Oc,[we.FundingQueue]:Lc,[we.IVotingReputation]:Gl,[we.OneTxPayment]:jc,[we.ReputationBootstrapper]:Gc,[we.StagedExpenditure]:Qc,[we.StakedExpenditure]:Kc,[we.StreamingPayments]:Zc,[we.TokenSupplier]:nm,[we.VotingReputation]:Gl,[we.Whitelist]:sm};var Ih=_n(om(),1);var yp=_n(Ah(),1);var Re;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var Mh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,e1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),fp=(a,e)=>{let t=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Mh(t.errors);throw new Error(n)};var Eh=(a,e)=>{let t=a===Re.Colony?e1(e):e,n=(i=>{let r=p=>{let f=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&x(E.data)&&typeof E.version=="number",x=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?f(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:pp});if(!n.success){let i=Mh(n.errors);throw new Error(i)}return n.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,Ih.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Fs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Nr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Fs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await hp(n)).json();return fp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await hp(n)).json(),s=Object.entries(Fs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await hp(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Eh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var DM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ei,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Ch="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",_1=a=>a.length>1,Dn=class extends ci{constructor(...e){_1(e)?super(...e):super(Vu,Ch,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Dn,"bytecode",Ch),xe(Dn,"abi",Vu);var Tp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Ci=class{static createInterface(){return new ne.Interface(vp)}static connect(e,t){return new oe(e,vp,t)}};xe(Ci,"abi",vp);var Si;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var wn;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(wn||(wn={}));var{AddressZero:Sh}=ht;async function M1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var E1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Dn.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await M1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Sh)}catch{i=!1}try{await t.nonces(Sh)}catch{r=!1}return n?i?t.tokenClientType=wn.Colony:(t=Ii.connect(a,e),t.tokenClientType=wn.ColonyLegacy):r?(t=vn.connect(a,e),t.tokenClientType=wn.Erc2612):(t=Tn.connect(a,e),t.tokenClientType=wn.Erc20),t.clientType=Si.TokenClient,t},wp=E1;var I1=(a,e)=>{let t=Ci.connect(a,e);return t.clientType=Si.TokenLockingClient,t},_p=I1;var{AddressZero:kp}=ht,C1=Tn.connect(kp,new ea.BaseProvider(3656691)).interface,S1=Ei.connect(kp,new ea.BaseProvider(3656691)).interface,R1=vn.connect(kp,new ea.BaseProvider(3656691)).interface;var Ap=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Us=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Us.abi=Mp;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Fs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:N1,solidityKeccak256:D1,splitSignature:O1}=ne,Pi=class extends Ta{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=D1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=N1(l),f=await n.signMessage(p),{r:x,s:C,v:_}=O1(f),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},ju=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Ni.abi=Ip;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Di.abi=Cp;var Sp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var{AddressZero:H1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===H1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(On.extensionType,n,e.version))throw new Error(`Version ${n} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new On(e,r,n)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,C,x,s,ke.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.OneTxPayment),t],async n=>({...te("ExtensionUpgraded",n)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Va.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...te("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...te("Approval",n)}))}};var Vs=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Dn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...te("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...te("LogSetOwner",n)}))}};var js=class extends Bn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=vn.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...te("Approval",i)}))}};var Rh=async(a,e)=>{let t=await wp(e,a.signerOrProvider);switch(t.tokenClientType){case wn.Colony:return new Vs(a,t);case wn.Erc20:return new Bn(a,t);case wn.Erc2612:return new js(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new ne.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};ji.abi=Bp;var{AddressZero:Fp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Fp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let n=await Ir(t,e.colonyNetwork.signerOrProvider);if(!Fa(Fn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Fn(e,r,n)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ne.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Fp,Ol);return[e,t,Fp,Ol,n,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...te("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Ul(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...te("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(we.VotingReputation),t],async n=>({...te("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],ja.extensionType=we.VotingReputation;var W1={["motion"]:ja,["oneTx"]:Va},Or=class{static async connect(e,t){let n=await Ir(t,e.signerOrProvider),i=Or.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Rh(e,s),l=new Or(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new Dr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:vt.Architecture,domain:ke.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...te("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...te("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,C,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...te("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...te("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=W1[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Fa(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return su(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,n,s]},{roles:vt.Architecture,domain:n},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...te("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...te("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Br=Or;Br.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:K1}=ne,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:f}),{r:C,s:_,v}=K1(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:f,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Hs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=_p(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...te("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...te("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Ph}=ne,{AddressZero:Lp}=ht,qs=class{constructor(e,t){this.network=t?.network||Nn.Gnosis,this.ipfs=new Nr(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||ru[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Er[this.network]},this.networkContract=Ri.connect(t?.customNetworkAddress||iu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new Hs(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new Ta({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Pi({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Lp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Re.Colony,n),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Br.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.network],""):null}async getColonyAddress(e){let t=Ph(`${e}${Es[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.network],""):null}async getUserAddress(e){let t=Ph(`${e}${Is[this.network]}`),n=await this.networkContract.addr(t);return n!==Lp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...te("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...te("TokenDeployed",i)}))}};var Nh=new ea.Web3Provider(window.ethereum),J1=async a=>new qs(a).getMetaColony(),$1=async()=>(await Nh.send("eth_requestAccounts",[]),Nh.getSigner()),Dh=document.querySelector("#button"),Vp=document.querySelector("#error"),Oh=document.querySelector("#result");if(!Dh||!Vp||!Oh)throw new Error("Could not find all required HTML elements");var Q1=a=>{Vp.innerText=a},X1=()=>{Vp.innerText=""},Up=a=>{Oh.innerText=a};Dh.addEventListener("click",async()=>{X1(),Up("Thinking...");try{let a=await $1(),e=await J1(a);Up(`Connected to metaColonyClient with version ${e.version}`)}catch(a){Q1(`Found an error: ${a.message}`),Up("")}});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/motions.js b/motions.js index 740beddc6..55f9bb708 100644 --- a/motions.js +++ b/motions.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var a6=Object.create;var Ys=Object.defineProperty;var s6=Object.getOwnPropertyDescriptor;var o6=Object.getOwnPropertyNames;var u6=Object.getPrototypeOf,l6=Object.prototype.hasOwnProperty;var d6=(i,e,t)=>e in i?Ys(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ie=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Kr=(i,e)=>{for(var t in e)Ys(i,t,{get:e[t],enumerable:!0})},p6=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of o6(e))!l6.call(i,r)&&r!==t&&Ys(i,r,{get:()=>e[r],enumerable:!(n=s6(e,r))||n.enumerable});return i};var En=(i,e,t)=>(t=i!=null?a6(u6(i)):{},p6(e||!i||!i.__esModule?Ys(t,"default",{value:i,enumerable:!0}):t,i));var Et=(i,e,t)=>(d6(i,typeof e!="symbol"?e+"":e,t),t);var Qp=ie(()=>{});var cl=ie((Yp,yl)=>{(function(i,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function n(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function r(C,u,y){if(r.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(C||0,u||10,y||"be"))}typeof i=="object"?i.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Qp().Buffer}catch{}r.isBN=function(u){return u instanceof r?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===r.wordSize&&Array.isArray(u.words)},r.max=function(u,y){return u.cmp(y)>0?u:y},r.min=function(u,y){return u.cmp(y)<0?u:y},r.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(x==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(C,u){var y=C.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+C)}function o(C,u,y){var x=s(C,y);return y-1>=u&&(x|=s(C,y-1)<<4),x}r.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function d(C,u,y,x){for(var w=0,A=0,h=Math.min(C.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{r.prototype.inspect=c}else r.prototype.inspect=c;function c(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(A!==0&&(x=A.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var l=I[u],m=_[u];x="";var G=this.clone();for(G.negative=0;!G.isZero();){var f=G.modrn(m).toString(u);G=G.idivn(m),G.isZero()?x=f+x:x=b[l-f.length]+f+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},r.prototype.toJSON=function(){return this.toString(16,2)},a&&(r.prototype.toBuffer=function(u,y){return this.toArrayLike(a,u,y)}),r.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};r.prototype.toArrayLike=function(u,y,x){this._strip();var w=this.byteLength(),A=x||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},r.prototype._toArrayLikeLE=function(u,y){for(var x=0,w=0,A=0,h=0;A>8&255),x>16&255),h===6?(x>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(x=0&&(u[x--]=k>>8&255),x>=0&&(u[x--]=k>>16&255),h===6?(x>=0&&(u[x--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(x>=0)for(u[x--]=w;x>=0;)u[x--]=0},Math.clz32?r.prototype._countBits=function(u){return 32-Math.clz32(u)}:r.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},r.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},r.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(C){for(var u=new Array(C.bitLength()),y=0;y>>w&1}return u}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},r.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},r.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},r.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},r.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},r.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},r.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-x),this._strip()},r.prototype.notn=function(u){return this.clone().inotn(u)},r.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,w=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,w=u):(x=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=x.length,A!==0)this.words[this.length]=A,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},r.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;x>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,G=g&67108863,f=Math.min(l,u.length-1),P=Math.max(0,l-C.length+1);P<=f;P++){var D=l-P|0;w=C.words[D]|0,A=u.words[P]|0,h=w*A+G,m+=h/67108864|0,G=h&67108863}y.words[l]=G|0,g=m|0}return g!==0?y.words[l]=g|0:y.length--,y._strip()}var O=function(u,y,x){var w=u.words,A=y.words,h=x.words,k=0,g,l,m,G=w[0]|0,f=G&8191,P=G>>>13,D=w[1]|0,j=D&8191,K=D>>>13,ee=w[2]|0,Y=ee&8191,Q=ee>>>13,yt=w[3]|0,Z=yt&8191,de=yt>>>13,Ki=w[4]|0,Ne=Ki&8191,De=Ki>>>13,Ji=w[5]|0,Oe=Ji&8191,Be=Ji>>>13,$i=w[6]|0,Fe=$i&8191,Le=$i>>>13,Qi=w[7]|0,Ue=Qi&8191,je=Qi>>>13,Yi=w[8]|0,Ve=Yi&8191,qe=Yi>>>13,Xi=w[9]|0,He=Xi&8191,Ge=Xi>>>13,Zi=A[0]|0,ze=Zi&8191,We=Zi>>>13,er=A[1]|0,Ke=er&8191,Je=er>>>13,tr=A[2]|0,$e=tr&8191,Qe=tr>>>13,nr=A[3]|0,Ye=nr&8191,Xe=nr>>>13,ir=A[4]|0,Ze=ir&8191,et=ir>>>13,rr=A[5]|0,tt=rr&8191,nt=rr>>>13,ar=A[6]|0,it=ar&8191,rt=ar>>>13,sr=A[7]|0,at=sr&8191,st=sr>>>13,or=A[8]|0,ot=or&8191,ut=or>>>13,ur=A[9]|0,lt=ur&8191,dt=ur>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(f,ze),l=Math.imul(f,We),l=l+Math.imul(P,ze)|0,m=Math.imul(P,We);var Mi=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,g=Math.imul(j,ze),l=Math.imul(j,We),l=l+Math.imul(K,ze)|0,m=Math.imul(K,We),g=g+Math.imul(f,Ke)|0,l=l+Math.imul(f,Je)|0,l=l+Math.imul(P,Ke)|0,m=m+Math.imul(P,Je)|0;var Ei=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,g=Math.imul(Y,ze),l=Math.imul(Y,We),l=l+Math.imul(Q,ze)|0,m=Math.imul(Q,We),g=g+Math.imul(j,Ke)|0,l=l+Math.imul(j,Je)|0,l=l+Math.imul(K,Ke)|0,m=m+Math.imul(K,Je)|0,g=g+Math.imul(f,$e)|0,l=l+Math.imul(f,Qe)|0,l=l+Math.imul(P,$e)|0,m=m+Math.imul(P,Qe)|0;var Ci=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,g=Math.imul(Z,ze),l=Math.imul(Z,We),l=l+Math.imul(de,ze)|0,m=Math.imul(de,We),g=g+Math.imul(Y,Ke)|0,l=l+Math.imul(Y,Je)|0,l=l+Math.imul(Q,Ke)|0,m=m+Math.imul(Q,Je)|0,g=g+Math.imul(j,$e)|0,l=l+Math.imul(j,Qe)|0,l=l+Math.imul(K,$e)|0,m=m+Math.imul(K,Qe)|0,g=g+Math.imul(f,Ye)|0,l=l+Math.imul(f,Xe)|0,l=l+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|0;var Ii=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,g=Math.imul(Ne,ze),l=Math.imul(Ne,We),l=l+Math.imul(De,ze)|0,m=Math.imul(De,We),g=g+Math.imul(Z,Ke)|0,l=l+Math.imul(Z,Je)|0,l=l+Math.imul(de,Ke)|0,m=m+Math.imul(de,Je)|0,g=g+Math.imul(Y,$e)|0,l=l+Math.imul(Y,Qe)|0,l=l+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(j,Ye)|0,l=l+Math.imul(j,Xe)|0,l=l+Math.imul(K,Ye)|0,m=m+Math.imul(K,Xe)|0,g=g+Math.imul(f,Ze)|0,l=l+Math.imul(f,et)|0,l=l+Math.imul(P,Ze)|0,m=m+Math.imul(P,et)|0;var Si=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Si>>>26)|0,Si&=67108863,g=Math.imul(Oe,ze),l=Math.imul(Oe,We),l=l+Math.imul(Be,ze)|0,m=Math.imul(Be,We),g=g+Math.imul(Ne,Ke)|0,l=l+Math.imul(Ne,Je)|0,l=l+Math.imul(De,Ke)|0,m=m+Math.imul(De,Je)|0,g=g+Math.imul(Z,$e)|0,l=l+Math.imul(Z,Qe)|0,l=l+Math.imul(de,$e)|0,m=m+Math.imul(de,Qe)|0,g=g+Math.imul(Y,Ye)|0,l=l+Math.imul(Y,Xe)|0,l=l+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(j,Ze)|0,l=l+Math.imul(j,et)|0,l=l+Math.imul(K,Ze)|0,m=m+Math.imul(K,et)|0,g=g+Math.imul(f,tt)|0,l=l+Math.imul(f,nt)|0,l=l+Math.imul(P,tt)|0,m=m+Math.imul(P,nt)|0;var Xu=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(Fe,ze),l=Math.imul(Fe,We),l=l+Math.imul(Le,ze)|0,m=Math.imul(Le,We),g=g+Math.imul(Oe,Ke)|0,l=l+Math.imul(Oe,Je)|0,l=l+Math.imul(Be,Ke)|0,m=m+Math.imul(Be,Je)|0,g=g+Math.imul(Ne,$e)|0,l=l+Math.imul(Ne,Qe)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Qe)|0,g=g+Math.imul(Z,Ye)|0,l=l+Math.imul(Z,Xe)|0,l=l+Math.imul(de,Ye)|0,m=m+Math.imul(de,Xe)|0,g=g+Math.imul(Y,Ze)|0,l=l+Math.imul(Y,et)|0,l=l+Math.imul(Q,Ze)|0,m=m+Math.imul(Q,et)|0,g=g+Math.imul(j,tt)|0,l=l+Math.imul(j,nt)|0,l=l+Math.imul(K,tt)|0,m=m+Math.imul(K,nt)|0,g=g+Math.imul(f,it)|0,l=l+Math.imul(f,rt)|0,l=l+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var Zu=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(Ue,ze),l=Math.imul(Ue,We),l=l+Math.imul(je,ze)|0,m=Math.imul(je,We),g=g+Math.imul(Fe,Ke)|0,l=l+Math.imul(Fe,Je)|0,l=l+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Je)|0,g=g+Math.imul(Oe,$e)|0,l=l+Math.imul(Oe,Qe)|0,l=l+Math.imul(Be,$e)|0,m=m+Math.imul(Be,Qe)|0,g=g+Math.imul(Ne,Ye)|0,l=l+Math.imul(Ne,Xe)|0,l=l+Math.imul(De,Ye)|0,m=m+Math.imul(De,Xe)|0,g=g+Math.imul(Z,Ze)|0,l=l+Math.imul(Z,et)|0,l=l+Math.imul(de,Ze)|0,m=m+Math.imul(de,et)|0,g=g+Math.imul(Y,tt)|0,l=l+Math.imul(Y,nt)|0,l=l+Math.imul(Q,tt)|0,m=m+Math.imul(Q,nt)|0,g=g+Math.imul(j,it)|0,l=l+Math.imul(j,rt)|0,l=l+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(f,at)|0,l=l+Math.imul(f,st)|0,l=l+Math.imul(P,at)|0,m=m+Math.imul(P,st)|0;var el=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(el>>>26)|0,el&=67108863,g=Math.imul(Ve,ze),l=Math.imul(Ve,We),l=l+Math.imul(qe,ze)|0,m=Math.imul(qe,We),g=g+Math.imul(Ue,Ke)|0,l=l+Math.imul(Ue,Je)|0,l=l+Math.imul(je,Ke)|0,m=m+Math.imul(je,Je)|0,g=g+Math.imul(Fe,$e)|0,l=l+Math.imul(Fe,Qe)|0,l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Qe)|0,g=g+Math.imul(Oe,Ye)|0,l=l+Math.imul(Oe,Xe)|0,l=l+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|0,g=g+Math.imul(Ne,Ze)|0,l=l+Math.imul(Ne,et)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,et)|0,g=g+Math.imul(Z,tt)|0,l=l+Math.imul(Z,nt)|0,l=l+Math.imul(de,tt)|0,m=m+Math.imul(de,nt)|0,g=g+Math.imul(Y,it)|0,l=l+Math.imul(Y,rt)|0,l=l+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(j,at)|0,l=l+Math.imul(j,st)|0,l=l+Math.imul(K,at)|0,m=m+Math.imul(K,st)|0,g=g+Math.imul(f,ot)|0,l=l+Math.imul(f,ut)|0,l=l+Math.imul(P,ot)|0,m=m+Math.imul(P,ut)|0;var tl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(tl>>>26)|0,tl&=67108863,g=Math.imul(He,ze),l=Math.imul(He,We),l=l+Math.imul(Ge,ze)|0,m=Math.imul(Ge,We),g=g+Math.imul(Ve,Ke)|0,l=l+Math.imul(Ve,Je)|0,l=l+Math.imul(qe,Ke)|0,m=m+Math.imul(qe,Je)|0,g=g+Math.imul(Ue,$e)|0,l=l+Math.imul(Ue,Qe)|0,l=l+Math.imul(je,$e)|0,m=m+Math.imul(je,Qe)|0,g=g+Math.imul(Fe,Ye)|0,l=l+Math.imul(Fe,Xe)|0,l=l+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|0,g=g+Math.imul(Oe,Ze)|0,l=l+Math.imul(Oe,et)|0,l=l+Math.imul(Be,Ze)|0,m=m+Math.imul(Be,et)|0,g=g+Math.imul(Ne,tt)|0,l=l+Math.imul(Ne,nt)|0,l=l+Math.imul(De,tt)|0,m=m+Math.imul(De,nt)|0,g=g+Math.imul(Z,it)|0,l=l+Math.imul(Z,rt)|0,l=l+Math.imul(de,it)|0,m=m+Math.imul(de,rt)|0,g=g+Math.imul(Y,at)|0,l=l+Math.imul(Y,st)|0,l=l+Math.imul(Q,at)|0,m=m+Math.imul(Q,st)|0,g=g+Math.imul(j,ot)|0,l=l+Math.imul(j,ut)|0,l=l+Math.imul(K,ot)|0,m=m+Math.imul(K,ut)|0,g=g+Math.imul(f,lt)|0,l=l+Math.imul(f,dt)|0,l=l+Math.imul(P,lt)|0,m=m+Math.imul(P,dt)|0;var nl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(nl>>>26)|0,nl&=67108863,g=Math.imul(He,Ke),l=Math.imul(He,Je),l=l+Math.imul(Ge,Ke)|0,m=Math.imul(Ge,Je),g=g+Math.imul(Ve,$e)|0,l=l+Math.imul(Ve,Qe)|0,l=l+Math.imul(qe,$e)|0,m=m+Math.imul(qe,Qe)|0,g=g+Math.imul(Ue,Ye)|0,l=l+Math.imul(Ue,Xe)|0,l=l+Math.imul(je,Ye)|0,m=m+Math.imul(je,Xe)|0,g=g+Math.imul(Fe,Ze)|0,l=l+Math.imul(Fe,et)|0,l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,et)|0,g=g+Math.imul(Oe,tt)|0,l=l+Math.imul(Oe,nt)|0,l=l+Math.imul(Be,tt)|0,m=m+Math.imul(Be,nt)|0,g=g+Math.imul(Ne,it)|0,l=l+Math.imul(Ne,rt)|0,l=l+Math.imul(De,it)|0,m=m+Math.imul(De,rt)|0,g=g+Math.imul(Z,at)|0,l=l+Math.imul(Z,st)|0,l=l+Math.imul(de,at)|0,m=m+Math.imul(de,st)|0,g=g+Math.imul(Y,ot)|0,l=l+Math.imul(Y,ut)|0,l=l+Math.imul(Q,ot)|0,m=m+Math.imul(Q,ut)|0,g=g+Math.imul(j,lt)|0,l=l+Math.imul(j,dt)|0,l=l+Math.imul(K,lt)|0,m=m+Math.imul(K,dt)|0;var il=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(il>>>26)|0,il&=67108863,g=Math.imul(He,$e),l=Math.imul(He,Qe),l=l+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(Ve,Ye)|0,l=l+Math.imul(Ve,Xe)|0,l=l+Math.imul(qe,Ye)|0,m=m+Math.imul(qe,Xe)|0,g=g+Math.imul(Ue,Ze)|0,l=l+Math.imul(Ue,et)|0,l=l+Math.imul(je,Ze)|0,m=m+Math.imul(je,et)|0,g=g+Math.imul(Fe,tt)|0,l=l+Math.imul(Fe,nt)|0,l=l+Math.imul(Le,tt)|0,m=m+Math.imul(Le,nt)|0,g=g+Math.imul(Oe,it)|0,l=l+Math.imul(Oe,rt)|0,l=l+Math.imul(Be,it)|0,m=m+Math.imul(Be,rt)|0,g=g+Math.imul(Ne,at)|0,l=l+Math.imul(Ne,st)|0,l=l+Math.imul(De,at)|0,m=m+Math.imul(De,st)|0,g=g+Math.imul(Z,ot)|0,l=l+Math.imul(Z,ut)|0,l=l+Math.imul(de,ot)|0,m=m+Math.imul(de,ut)|0,g=g+Math.imul(Y,lt)|0,l=l+Math.imul(Y,dt)|0,l=l+Math.imul(Q,lt)|0,m=m+Math.imul(Q,dt)|0;var rl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(rl>>>26)|0,rl&=67108863,g=Math.imul(He,Ye),l=Math.imul(He,Xe),l=l+Math.imul(Ge,Ye)|0,m=Math.imul(Ge,Xe),g=g+Math.imul(Ve,Ze)|0,l=l+Math.imul(Ve,et)|0,l=l+Math.imul(qe,Ze)|0,m=m+Math.imul(qe,et)|0,g=g+Math.imul(Ue,tt)|0,l=l+Math.imul(Ue,nt)|0,l=l+Math.imul(je,tt)|0,m=m+Math.imul(je,nt)|0,g=g+Math.imul(Fe,it)|0,l=l+Math.imul(Fe,rt)|0,l=l+Math.imul(Le,it)|0,m=m+Math.imul(Le,rt)|0,g=g+Math.imul(Oe,at)|0,l=l+Math.imul(Oe,st)|0,l=l+Math.imul(Be,at)|0,m=m+Math.imul(Be,st)|0,g=g+Math.imul(Ne,ot)|0,l=l+Math.imul(Ne,ut)|0,l=l+Math.imul(De,ot)|0,m=m+Math.imul(De,ut)|0,g=g+Math.imul(Z,lt)|0,l=l+Math.imul(Z,dt)|0,l=l+Math.imul(de,lt)|0,m=m+Math.imul(de,dt)|0;var al=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(al>>>26)|0,al&=67108863,g=Math.imul(He,Ze),l=Math.imul(He,et),l=l+Math.imul(Ge,Ze)|0,m=Math.imul(Ge,et),g=g+Math.imul(Ve,tt)|0,l=l+Math.imul(Ve,nt)|0,l=l+Math.imul(qe,tt)|0,m=m+Math.imul(qe,nt)|0,g=g+Math.imul(Ue,it)|0,l=l+Math.imul(Ue,rt)|0,l=l+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Fe,at)|0,l=l+Math.imul(Fe,st)|0,l=l+Math.imul(Le,at)|0,m=m+Math.imul(Le,st)|0,g=g+Math.imul(Oe,ot)|0,l=l+Math.imul(Oe,ut)|0,l=l+Math.imul(Be,ot)|0,m=m+Math.imul(Be,ut)|0,g=g+Math.imul(Ne,lt)|0,l=l+Math.imul(Ne,dt)|0,l=l+Math.imul(De,lt)|0,m=m+Math.imul(De,dt)|0;var sl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(sl>>>26)|0,sl&=67108863,g=Math.imul(He,tt),l=Math.imul(He,nt),l=l+Math.imul(Ge,tt)|0,m=Math.imul(Ge,nt),g=g+Math.imul(Ve,it)|0,l=l+Math.imul(Ve,rt)|0,l=l+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ue,at)|0,l=l+Math.imul(Ue,st)|0,l=l+Math.imul(je,at)|0,m=m+Math.imul(je,st)|0,g=g+Math.imul(Fe,ot)|0,l=l+Math.imul(Fe,ut)|0,l=l+Math.imul(Le,ot)|0,m=m+Math.imul(Le,ut)|0,g=g+Math.imul(Oe,lt)|0,l=l+Math.imul(Oe,dt)|0,l=l+Math.imul(Be,lt)|0,m=m+Math.imul(Be,dt)|0;var ol=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ol>>>26)|0,ol&=67108863,g=Math.imul(He,it),l=Math.imul(He,rt),l=l+Math.imul(Ge,it)|0,m=Math.imul(Ge,rt),g=g+Math.imul(Ve,at)|0,l=l+Math.imul(Ve,st)|0,l=l+Math.imul(qe,at)|0,m=m+Math.imul(qe,st)|0,g=g+Math.imul(Ue,ot)|0,l=l+Math.imul(Ue,ut)|0,l=l+Math.imul(je,ot)|0,m=m+Math.imul(je,ut)|0,g=g+Math.imul(Fe,lt)|0,l=l+Math.imul(Fe,dt)|0,l=l+Math.imul(Le,lt)|0,m=m+Math.imul(Le,dt)|0;var ul=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ul>>>26)|0,ul&=67108863,g=Math.imul(He,at),l=Math.imul(He,st),l=l+Math.imul(Ge,at)|0,m=Math.imul(Ge,st),g=g+Math.imul(Ve,ot)|0,l=l+Math.imul(Ve,ut)|0,l=l+Math.imul(qe,ot)|0,m=m+Math.imul(qe,ut)|0,g=g+Math.imul(Ue,lt)|0,l=l+Math.imul(Ue,dt)|0,l=l+Math.imul(je,lt)|0,m=m+Math.imul(je,dt)|0;var ll=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(ll>>>26)|0,ll&=67108863,g=Math.imul(He,ot),l=Math.imul(He,ut),l=l+Math.imul(Ge,ot)|0,m=Math.imul(Ge,ut),g=g+Math.imul(Ve,lt)|0,l=l+Math.imul(Ve,dt)|0,l=l+Math.imul(qe,lt)|0,m=m+Math.imul(qe,dt)|0;var dl=(k+g|0)+((l&8191)<<13)|0;k=(m+(l>>>13)|0)+(dl>>>26)|0,dl&=67108863,g=Math.imul(He,lt),l=Math.imul(He,dt),l=l+Math.imul(Ge,lt)|0,m=Math.imul(Ge,dt);var pl=(k+g|0)+((l&8191)<<13)|0;return k=(m+(l>>>13)|0)+(pl>>>26)|0,pl&=67108863,h[0]=Mi,h[1]=Ei,h[2]=Ci,h[3]=Ii,h[4]=Si,h[5]=Xu,h[6]=Zu,h[7]=el,h[8]=tl,h[9]=nl,h[10]=il,h[11]=rl,h[12]=al,h[13]=sl,h[14]=ol,h[15]=ul,h[16]=ll,h[17]=dl,h[18]=pl,k!==0&&(h[19]=k,x.length++),x};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.length+u.length;for(var x=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,x=h,h=w}return x!==0?y.words[A]=x:y.length--,y._strip()}function q(C,u,y){return U(C,u,y)}r.prototype.mulTo=function(u,y){var x,w=this.length+u.length;return this.length===10&&u.length===10?x=O(this,u,y):w<63?x=L(this,u,y):w<1024?x=U(this,u,y):x=q(this,u,y),x};function E(C,u){this.x=C,this.y=u}E.prototype.makeRBT=function(u){for(var y=new Array(u),x=r.prototype._countBits(u)-1,w=0;w>=1;return w},E.prototype.permute=function(u,y,x,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,x[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,x+=A/67108864|0,x+=h>>>26,this.words[w]=h&67108863}return x!==0&&(this.words[w]=x,this.length++),y?this.ineg():this},r.prototype.muln=function(u){return this.clone().imuln(u)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(u){var y=S(u);if(y.length===0)return new r(1);for(var x=this,w=0;w=0);var y=u%26,x=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(x!==0){for(A=this.length-1;A>=0;A--)this.words[A+x]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,l=0;l=0&&(m!==0||l>=w);l--){var G=this.words[l]|0;this.words[l]=m<<26-A|G>>>A,m=G&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},r.prototype.shln=function(u){return this.clone().ishln(u)},r.prototype.ushln=function(u){return this.clone().iushln(u)},r.prototype.shrn=function(u){return this.clone().ishrn(u)},r.prototype.ushrn=function(u){return this.clone().iushrn(u)},r.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,w=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},r.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+x]=h&67108863}for(;A>26,this.words[A+x]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(u,y){var x=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);x=26-k,x!==0&&(A=A.ushln(x),w.iushln(x),h=A.words[A.length-1]|0);var g=w.length-A.length,l;if(y!=="mod"){l=new r(null),l.length=g+1,l.words=new Array(l.length);for(var m=0;m=0;f--){var P=(w.words[A.length+f]|0)*67108864+(w.words[A.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,f),w.isZero()||(w.negative^=1);l&&(l.words[f]=P)}return l&&l._strip(),w._strip(),y!=="div"&&x!==0&&w.iushrn(x),{div:l||null,mod:w}},r.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),x&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),x&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new r(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new r(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new r(this.modrn(u.words[0]))}:this._wordDiv(u,y)},r.prototype.div=function(u){return this.divmod(u,"div",!1).div},r.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},r.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},r.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=x.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},r.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(x*w+(this.words[A]|0))%u;return y?-w:w},r.prototype.modn=function(u){return this.modrn(u)},r.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+x*67108864;this.words[w]=A/u|0,x=A%u}return this._strip(),y?this.ineg():this},r.prototype.divn=function(u){return this.clone().idivn(u)},r.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),A=new r(0),h=new r(0),k=new r(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var l=x.clone(),m=y.clone();!y.isZero();){for(var G=0,f=1;(y.words[0]&f)===0&&G<26;++G,f<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(l),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(x.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(x.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(l),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(h),A.isub(k)):(x.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:x.iushln(g)}},r.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new r(1),A=new r(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var l=0,m=1;(x.words[0]&m)===0&&l<26;++l,m<<=1);if(l>0)for(x.iushrn(l);l-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(x)>=0?(y.isub(x),w.isub(A)):(x.isub(y),A.isub(w))}var G;return y.cmpn(1)===0?G=w:G=A,G.cmpn(0)<0&&G.iadd(u),G},r.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var w=0;y.isEven()&&x.isEven();w++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var A=y.cmp(x);if(A<0){var h=y;y=x,x=h}else if(A===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(w)},r.prototype.invm=function(u){return this.egcd(u).a.umod(u)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(u){return this.words[0]&u},r.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;x=w===u?0:wu.length)return 1;if(this.length=0;x--){var w=this.words[x]|0,A=u.words[x]|0;if(w!==A){wA&&(y=1);break}}return y},r.prototype.gtn=function(u){return this.cmpn(u)===1},r.prototype.gt=function(u){return this.cmp(u)===1},r.prototype.gten=function(u){return this.cmpn(u)>=0},r.prototype.gte=function(u){return this.cmp(u)>=0},r.prototype.ltn=function(u){return this.cmpn(u)===-1},r.prototype.lt=function(u){return this.cmp(u)===-1},r.prototype.lten=function(u){return this.cmpn(u)<=0},r.prototype.lte=function(u){return this.cmp(u)<=0},r.prototype.eqn=function(u){return this.cmpn(u)===0},r.prototype.eq=function(u){return this.cmp(u)===0},r.red=function(u){return new H(u)},r.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(u){return this.red=u,this},r.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},r.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},r.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},r.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},r.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},r.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},r.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},r.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(C,u){this.name=C,this.p=new r(u,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new r(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var w=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function le(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(le,$),le.prototype.split=function(u,y){for(var x=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},le.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},r._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new le;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function H(C){if(typeof C=="string"){var u=r._prime(C);this.m=u.p,this.prime=u}else t(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}H.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},H.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},H.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},H.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},H.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},H.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},H.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},H.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},H.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},H.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},H.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},H.prototype.isqr=function(u){return this.imul(u,u.clone())},H.prototype.sqr=function(u){return this.mul(u,u)},H.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new r(1)).iushrn(2);return this.pow(u,x)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new r(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);this.pow(l,g).cmp(k)!==0;)l.redIAdd(k);for(var m=this.pow(l,w),G=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=A;f.cmp(h)!==0;){for(var D=f,j=0;D.cmp(h)!==0;j++)D=D.redSqr();t(j=0;A--){for(var m=y.words[A],G=l-1;G>=0;G--){var f=m>>G&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&k===0){g=0;continue}k<<=1,k|=f,g++,!(g!==x&&(A!==0||G!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}l=26}return h},H.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},H.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},r.mont=function(u){return new se(u)};function se(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,H),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=x.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new r(0)._forceRed(this);var x=u.mul(y),w=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=x.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof yl>"u"||yl,Yp)});var w0=ie((Yg,io)=>{(function(){"use strict";var i="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var r=!t&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:r&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof io=="object"&&io.exports,o=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],I=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],q={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var E=function(f,P,D){return function(j){return new l(f,P,f).update(j)[D]()}},J=function(f,P,D){return function(j,K){return new l(f,P,K).update(j)[D]()}},$=function(f,P,D){return function(j,K,ee,Y){return u["cshake"+f].update(j,K,ee,Y)[D]()}},le=function(f,P,D){return function(j,K,ee,Y){return u["kmac"+f].update(j,K,ee,Y)[D]()}},T=function(f,P,D,j){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}l.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}for(var j=this.blocks,K=this.byteCount,ee=f.length,Y=this.blockCount,Q=0,yt=this.s,Z,de;Q>2]|=f[Q]<>2]|=de<>2]|=(192|de>>6)<>2]|=(128|de&63)<=57344?(j[Z>>2]|=(224|de>>12)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<>2]|=(240|de>>18)<>2]|=(128|de>>12&63)<>2]|=(128|de>>6&63)<>2]|=(128|de&63)<=K){for(this.start=Z-K,this.block=j[Y],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++j;return P?K.push(j):K.unshift(j),this.update(K),K.length},l.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(i);if(d&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!d||!ArrayBuffer.isView(f)))throw new Error(i)}else throw new Error(i);P=!0}var j=0,K=f.length;if(P)j=K;else for(var ee=0;ee=57344?j+=3:(Y=65536+((Y&1023)<<10|f.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(f),j},l.prototype.bytepad=function(f,P){for(var D=this.encode(P),j=0;j>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(G(P),K=0)}return j&&(Q=P[K],Y+=p[Q>>4&15]+p[Q&15],j>1&&(Y+=p[Q>>12&15]+p[Q>>8&15]),j>2&&(Y+=p[Q>>20&15]+p[Q>>16&15])),Y},l.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,j=this.extraBytes,K=0,ee=0,Y=this.outputBits>>3,Q;j?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(Y);for(var yt=new Uint32Array(Q);ee>8&255,Y[Q+2]=yt>>16&255,Y[Q+3]=yt>>24&255;ee%f===0&&G(P)}return j&&(Q=ee<<2,yt=P[K],Y[Q]=yt&255,j>1&&(Y[Q+1]=yt>>8&255),j>2&&(Y[Q+2]=yt>>16&255)),Y};function m(f,P,D){l.call(this,f,P,D)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var G=function(f){var P,D,j,K,ee,Y,Q,yt,Z,de,Ki,Ne,De,Ji,Oe,Be,$i,Fe,Le,Qi,Ue,je,Yi,Ve,qe,Xi,He,Ge,Zi,ze,We,er,Ke,Je,tr,$e,Qe,nr,Ye,Xe,ir,Ze,et,rr,tt,nt,ar,it,rt,sr,at,st,or,ot,ut,ur,lt,dt,Mi,Ei,Ci,Ii,Si;for(j=0;j<48;j+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],Y=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],yt=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Ki=f[7]^f[17]^f[27]^f[37]^f[47],Ne=f[8]^f[18]^f[28]^f[38]^f[48],De=f[9]^f[19]^f[29]^f[39]^f[49],P=Ne^(Y<<1|Q>>>31),D=De^(Q<<1|Y>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(yt<<1|Z>>>31),D=ee^(Z<<1|yt>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=Y^(de<<1|Ki>>>31),D=Q^(Ki<<1|de>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=yt^(Ne<<1|De>>>31),D=Z^(De<<1|Ne>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=de^(K<<1|ee>>>31),D=Ki^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,Ji=f[0],Oe=f[1],nt=f[11]<<4|f[10]>>>28,ar=f[10]<<4|f[11]>>>28,Ge=f[20]<<3|f[21]>>>29,Zi=f[21]<<3|f[20]>>>29,Ei=f[31]<<9|f[30]>>>23,Ci=f[30]<<9|f[31]>>>23,Ze=f[40]<<18|f[41]>>>14,et=f[41]<<18|f[40]>>>14,Je=f[2]<<1|f[3]>>>31,tr=f[3]<<1|f[2]>>>31,Be=f[13]<<12|f[12]>>>20,$i=f[12]<<12|f[13]>>>20,it=f[22]<<10|f[23]>>>22,rt=f[23]<<10|f[22]>>>22,ze=f[33]<<13|f[32]>>>19,We=f[32]<<13|f[33]>>>19,Ii=f[42]<<2|f[43]>>>30,Si=f[43]<<2|f[42]>>>30,ot=f[5]<<30|f[4]>>>2,ut=f[4]<<30|f[5]>>>2,$e=f[14]<<6|f[15]>>>26,Qe=f[15]<<6|f[14]>>>26,Fe=f[25]<<11|f[24]>>>21,Le=f[24]<<11|f[25]>>>21,sr=f[34]<<15|f[35]>>>17,at=f[35]<<15|f[34]>>>17,er=f[45]<<29|f[44]>>>3,Ke=f[44]<<29|f[45]>>>3,Ve=f[6]<<28|f[7]>>>4,qe=f[7]<<28|f[6]>>>4,ur=f[17]<<23|f[16]>>>9,lt=f[16]<<23|f[17]>>>9,nr=f[26]<<25|f[27]>>>7,Ye=f[27]<<25|f[26]>>>7,Qi=f[36]<<21|f[37]>>>11,Ue=f[37]<<21|f[36]>>>11,st=f[47]<<24|f[46]>>>8,or=f[46]<<24|f[47]>>>8,rr=f[8]<<27|f[9]>>>5,tt=f[9]<<27|f[8]>>>5,Xi=f[18]<<20|f[19]>>>12,He=f[19]<<20|f[18]>>>12,dt=f[29]<<7|f[28]>>>25,Mi=f[28]<<7|f[29]>>>25,Xe=f[38]<<8|f[39]>>>24,ir=f[39]<<8|f[38]>>>24,je=f[48]<<14|f[49]>>>18,Yi=f[49]<<14|f[48]>>>18,f[0]=Ji^~Be&Fe,f[1]=Oe^~$i&Le,f[10]=Ve^~Xi&Ge,f[11]=qe^~He&Zi,f[20]=Je^~$e&nr,f[21]=tr^~Qe&Ye,f[30]=rr^~nt&it,f[31]=tt^~ar&rt,f[40]=ot^~ur&dt,f[41]=ut^~lt&Mi,f[2]=Be^~Fe&Qi,f[3]=$i^~Le&Ue,f[12]=Xi^~Ge&ze,f[13]=He^~Zi&We,f[22]=$e^~nr&Xe,f[23]=Qe^~Ye&ir,f[32]=nt^~it&sr,f[33]=ar^~rt&at,f[42]=ur^~dt&Ei,f[43]=lt^~Mi&Ci,f[4]=Fe^~Qi&je,f[5]=Le^~Ue&Yi,f[14]=Ge^~ze&er,f[15]=Zi^~We&Ke,f[24]=nr^~Xe&Ze,f[25]=Ye^~ir&et,f[34]=it^~sr&st,f[35]=rt^~at&or,f[44]=dt^~Ei&Ii,f[45]=Mi^~Ci&Si,f[6]=Qi^~je&Ji,f[7]=Ue^~Yi&Oe,f[16]=ze^~er&Ve,f[17]=We^~Ke&qe,f[26]=Xe^~Ze&Je,f[27]=ir^~et&tr,f[36]=sr^~st&rr,f[37]=at^~or&tt,f[46]=Ei^~Ii&ot,f[47]=Ci^~Si&ut,f[8]=je^~Ji&Be,f[9]=Yi^~Oe&$i,f[18]=er^~Ve&Xi,f[19]=Ke^~qe&He,f[28]=Ze^~Je&$e,f[29]=et^~tr&Qe,f[38]=st^~rr&nt,f[39]=or^~tt&ar,f[48]=Ii^~ot&ur,f[49]=Si^~ut<,f[0]^=S[j],f[1]^=S[j+1]};if(s)io.exports=u;else{for(x=0;x{by.exports=hy;function hy(i,e){if(!i)throw new Error(e||"Assertion failed")}hy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var xy=ie((H3,jl)=>{typeof Object.create=="function"?jl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var In=ie(Pe=>{"use strict";var h2=ua(),b2=xy();Pe.inherits=b2;function x2(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function g2(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),r=0;r>6|192,t[n++]=a&63|128):x2(i,r)?(a=65536+((a&1023)<<10)+(i.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}else for(r=0;r>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}Pe.htonl=gy;function v2(i,e){for(var t="",n=0;n>>0}return a}Pe.join32=w2;function _2(i,e){for(var t=new Array(i.length*4),n=0,r=0;n>>24,t[r+1]=a>>>16&255,t[r+2]=a>>>8&255,t[r+3]=a&255):(t[r+3]=a>>>24,t[r+2]=a>>>16&255,t[r+1]=a>>>8&255,t[r]=a&255)}return t}Pe.split32=_2;function k2(i,e){return i>>>e|i<<32-e}Pe.rotr32=k2;function A2(i,e){return i<>>32-e}Pe.rotl32=A2;function M2(i,e){return i+e>>>0}Pe.sum32=M2;function E2(i,e,t){return i+e+t>>>0}Pe.sum32_3=E2;function C2(i,e,t,n){return i+e+t+n>>>0}Pe.sum32_4=C2;function I2(i,e,t,n,r){return i+e+t+n+r>>>0}Pe.sum32_5=I2;function S2(i,e,t,n){var r=i[e],a=i[e+1],s=n+a>>>0,o=(s>>0,i[e+1]=s}Pe.sum64=S2;function R2(i,e,t,n){var r=e+n>>>0,a=(r>>0}Pe.sum64_hi=R2;function P2(i,e,t,n){var r=e+n;return r>>>0}Pe.sum64_lo=P2;function N2(i,e,t,n,r,a,s,o){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Pe.sum64_4_hi=N2;function D2(i,e,t,n,r,a,s,o){var d=e+n+a+o;return d>>>0}Pe.sum64_4_lo=D2;function O2(i,e,t,n,r,a,s,o,d,p){var c=0,b=e;b=b+n>>>0,c+=b>>0,c+=b>>0,c+=b>>0,c+=b>>0}Pe.sum64_5_hi=O2;function B2(i,e,t,n,r,a,s,o,d,p){var c=e+n+a+o+p;return c>>>0}Pe.sum64_5_lo=B2;function F2(i,e,t){var n=e<<32-t|i>>>t;return n>>>0}Pe.rotr64_hi=F2;function L2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Pe.rotr64_lo=L2;function U2(i,e,t){return i>>>t}Pe.shr64_hi=U2;function j2(i,e,t){var n=i<<32-t|e>>>t;return n>>>0}Pe.shr64_lo=j2});var la=ie(_y=>{"use strict";var wy=In(),V2=ua();function Ao(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}_y.BlockHash=Ao;Ao.prototype.update=function(e,t){if(e=wy.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=wy.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=e&255}else for(r[a++]=e&255,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s{"use strict";var q2=In(),Wn=q2.rotr32;function H2(i,e,t,n){if(i===0)return ky(e,t,n);if(i===1||i===3)return My(e,t,n);if(i===2)return Ay(e,t,n)}ci.ft_1=H2;function ky(i,e,t){return i&e^~i&t}ci.ch32=ky;function Ay(i,e,t){return i&e^i&t^e&t}ci.maj32=Ay;function My(i,e,t){return i^e^t}ci.p32=My;function G2(i){return Wn(i,2)^Wn(i,13)^Wn(i,22)}ci.s0_256=G2;function z2(i){return Wn(i,6)^Wn(i,11)^Wn(i,25)}ci.s1_256=z2;function W2(i){return Wn(i,7)^Wn(i,18)^i>>>3}ci.g0_256=W2;function K2(i){return Wn(i,17)^Wn(i,19)^i>>>10}ci.g1_256=K2});var Iy=ie((K3,Cy)=>{"use strict";var da=In(),J2=la(),$2=Vl(),ql=da.rotl32,is=da.sum32,Q2=da.sum32_5,Y2=$2.ft_1,Ey=J2.BlockHash,X2=[1518500249,1859775393,2400959708,3395469782];function Kn(){if(!(this instanceof Kn))return new Kn;Ey.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}da.inherits(Kn,Ey);Cy.exports=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=80;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var pa=In(),Z2=la(),ya=Vl(),eb=ua(),Sn=pa.sum32,tb=pa.sum32_4,nb=pa.sum32_5,ib=ya.ch32,rb=ya.maj32,ab=ya.s0_256,sb=ya.s1_256,ob=ya.g0_256,ub=ya.g1_256,Sy=Z2.BlockHash,lb=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Jn(){if(!(this instanceof Jn))return new Jn;Sy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=lb,this.W=new Array(64)}pa.inherits(Jn,Sy);Ry.exports=Jn;Jn.blockSize=512;Jn.outSize=256;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var Gl=In(),Py=Hl();function fi(){if(!(this instanceof fi))return new fi;Py.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Gl.inherits(fi,Py);Ny.exports=fi;fi.blockSize=512;fi.outSize=224;fi.hmacStrength=192;fi.padLength=64;fi.prototype._digest=function(e){return e==="hex"?Gl.toHex32(this.h.slice(0,7),"big"):Gl.split32(this.h.slice(0,7),"big")}});var Kl=ie((Q3,Ly)=>{"use strict";var Zt=In(),db=la(),pb=ua(),$n=Zt.rotr64_hi,Qn=Zt.rotr64_lo,Oy=Zt.shr64_hi,By=Zt.shr64_lo,Oi=Zt.sum64,zl=Zt.sum64_hi,Wl=Zt.sum64_lo,yb=Zt.sum64_4_hi,cb=Zt.sum64_4_lo,fb=Zt.sum64_5_hi,mb=Zt.sum64_5_lo,Fy=db.BlockHash,hb=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Rn(){if(!(this instanceof Rn))return new Rn;Fy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=hb,this.W=new Array(160)}Zt.inherits(Rn,Fy);Ly.exports=Rn;Rn.blockSize=1024;Rn.outSize=512;Rn.hmacStrength=192;Rn.padLength=128;Rn.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var Jl=In(),Uy=Kl();function mi(){if(!(this instanceof mi))return new mi;Uy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Jl.inherits(mi,Uy);jy.exports=mi;mi.blockSize=1024;mi.outSize=384;mi.hmacStrength=192;mi.padLength=128;mi.prototype._digest=function(e){return e==="hex"?Jl.toHex32(this.h.slice(0,12),"big"):Jl.split32(this.h.slice(0,12),"big")}});var qy=ie(ca=>{"use strict";ca.sha1=Iy();ca.sha224=Dy();ca.sha256=Hl();ca.sha384=Vy();ca.sha512=Kl()});var Jy=ie(Ky=>{"use strict";var mr=In(),Ib=la(),Mo=mr.rotl32,Hy=mr.sum32,rs=mr.sum32_3,Gy=mr.sum32_4,Wy=Ib.BlockHash;function Yn(){if(!(this instanceof Yn))return new Yn;Wy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}mr.inherits(Yn,Wy);Ky.ripemd160=Yn;Yn.blockSize=512;Yn.outSize=160;Yn.hmacStrength=192;Yn.padLength=64;Yn.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],d=n,p=r,c=a,b=s,I=o,_=0;_<80;_++){var v=Hy(Mo(Gy(n,zy(_,r,a,s),e[Pb[_]+t],Sb(_)),Db[_]),o);n=o,o=s,s=Mo(a,10),a=r,r=v,v=Hy(Mo(Gy(d,zy(79-_,p,c,b),e[Nb[_]+t],Rb(_)),Ob[_]),I),d=I,I=b,b=Mo(c,10),c=p,p=v}v=rs(this.h[1],a,b),this.h[1]=rs(this.h[2],s,I),this.h[2]=rs(this.h[3],o,d),this.h[3]=rs(this.h[4],n,p),this.h[4]=rs(this.h[0],r,c),this.h[0]=v};Yn.prototype._digest=function(e){return e==="hex"?mr.toHex32(this.h,"little"):mr.split32(this.h,"little")};function zy(i,e,t,n){return i<=15?e^t^n:i<=31?e&t|~e&n:i<=47?(e|~t)^n:i<=63?e&n|t&~n:e^(t|~n)}function Sb(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function Rb(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var Pb=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Nb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Db=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ob=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Qy=ie((e8,$y)=>{"use strict";var Bb=In(),Fb=ua();function fa(i,e,t){if(!(this instanceof fa))return new fa(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(Bb.toArray(e,t))}$y.exports=fa;fa.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Fb(e.length<=this.blockSize);for(var t=e.length;t{var Nt=Yy;Nt.utils=In();Nt.common=la();Nt.sha=qy();Nt.ripemd=Jy();Nt.hmac=Qy();Nt.sha1=Nt.sha.sha1;Nt.sha256=Nt.sha.sha256;Nt.sha224=Nt.sha.sha224;Nt.sha384=Nt.sha.sha384;Nt.sha512=Nt.sha.sha512;Nt.ripemd160=Nt.ripemd.ripemd160});var fd=ie((cd,Ac)=>{"use strict";(function(i){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function r(h){return new Uint8Array(h)}function a(h,k,g,l,m){(l!=null||m!=null)&&(h.slice?h=h.slice(l,m):h=Array.prototype.slice.call(h,l,m)),k.set(h,g)}var s=function(){function h(g){var l=[],m=0;for(g=encodeURI(g);m191&&G<224?(l.push(String.fromCharCode((G&31)<<6|g[m+1]&63)),m+=2):(l.push(String.fromCharCode((G&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return l.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(l){for(var m=[],G=0;G>4]+k[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),d={16:10,24:12,32:14},p=[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],c=[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],b=[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],I=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],q=[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],E=[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],J=[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],$=[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],le=[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 T(h){for(var k=[],g=0;g>2,this._Ke[G][k%4]=m[k],this._Kd[h-G][k%4]=m[k];for(var f=0,P=l,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,l!=8)for(var k=1;k>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var k=l/2+1;k>2,K=P%4,this._Ke[j][K]=m[k],this._Kd[h-j][K]=m[k++],P++}for(var j=1;j>24&255]^J[D>>16&255]^$[D>>8&255]^le[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Ke[0][m];for(var G=1;G>24&255]^_[l[(m+1)%4]>>16&255]^v[l[(m+2)%4]>>8&255]^S[l[(m+3)%4]&255]^this._Ke[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Ke[k][m],f[4*m]=(c[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[l[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[l[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],l=T(h),m=0;m<4;m++)l[m]^=this._Kd[0][m];for(var G=1;G>24&255]^O[l[(m+3)%4]>>16&255]^U[l[(m+2)%4]>>8&255]^q[l[(m+1)%4]&255]^this._Kd[G][m];l=g.slice()}for(var f=r(16),P,m=0;m<4;m++)P=this._Kd[k][m],f[4*m]=(b[l[m]>>24&255]^P>>24)&255,f[4*m+1]=(b[l[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(b[l[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(b[l[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=r(h.length),g=r(16),l=0;l=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,l=0;l{"use strict";(function(i){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,q=1359893119,E=2600822924,J=528734635,$=1541459225,le=new Uint32Array(64);function T(y){let x=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,l=q,m=E,G=J,f=$,P,D,j,K,ee;for(D=0;D<16;D++)j=x+D*4,le[D]=(y[j]&255)<<24|(y[j+1]&255)<<16|(y[j+2]&255)<<8|y[j+3]&255;for(D=16;D<64;D++)P=le[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=le[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,le[D]=(K+le[D-7]|0)+(ee+le[D-16]|0)|0;for(D=0;D<64;D++)K=(((l>>>6|l<<32-6)^(l>>>11|l<<32-11)^(l>>>25|l<<32-25))+(l&m^~l&G)|0)+(f+(v[D]+le[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,f=G,G=m,m=l,l=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,q=q+l|0,E=E+m|0,J=J+G|0,$=$+f|0,x+=64,w-=64}}T(_);let R,N=_.length%64,H=_.length/536870912|0,se=_.length<<3,C=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(H>>>16&255),u.push(H>>>8&255),u.push(H>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),q,E=[];for(q=0;q<64;q++)O[q]=54;for(q=0;q<_.length;q++)O[q]^=_[q];for(q=0;q=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),E=E.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),E=E.concat(t(U.concat(t(O))).slice(0,S))),E}function r(_,v,S,L,O){let U;for(d(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),d(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){d(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function b(_,v,S,L,O,U,q){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let E=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let l=0;lh&&(l=h);for(let G=0;Gh&&(l=h);for(let G=0;G>0&255),E.push(J[G]>>8&255),E.push(J[G]>>16&255),E.push(J[G]>>24&255);let m=n(_,E,U);return q&&q(null,1,m),m}q&&k(g)};if(!q)for(;;){let l=g();if(l!=null)return l}g()}let I={scrypt:function(_,v,S,L,O,U,q){return new Promise(function(E,J){let $=0;q&&q(0),b(_,v,S,L,O,U,function(le,T,R){if(le)J(le);else if(R)q&&$!==1&&q(1),E(new Uint8Array(R));else if(q&&T!==$)return $=T,q(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(b(_,v,S,L,O,U))}};typeof gd<"u"?Ec.exports=I:typeof define=="function"&&define.amd?define(I):i&&(i.scrypt&&(i._scrypt=i.scrypt),i.scrypt=I)})(gd)});var Xc=ie((H4,Yc)=>{"use strict";var Qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",kd={};for(fs=0;fs>25;return(i&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function $c(i){for(var e=1,t=0;t126)return"Invalid prefix ("+i+")";e=_a(e)^n>>5}for(e=_a(e),t=0;tt)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var n=$c(i);if(typeof n=="string")throw new Error(n);for(var r=i+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");n=_a(n)^s,r+=Qo.charAt(s)}for(a=0;a<6;++a)n=_a(n);for(n^=1,a=0;a<6;++a){var o=n>>(5-a)*5&31;r+=Qo.charAt(o)}return r}function Qc(i,e){if(e=e||90,i.length<8)return i+" too short";if(i.length>e)return"Exceeds length limit";var t=i.toLowerCase(),n=i.toUpperCase();if(i!==t&&i!==n)return"Mixed-case string "+i;i=t;var r=i.lastIndexOf("1");if(r===-1)return"No separator character for "+i;if(r===0)return"Missing prefix for "+i;var a=i.slice(0,r),s=i.slice(r+1);if(s.length<6)return"Data too short";var o=$c(a);if(typeof o=="string")return o;for(var d=[],p=0;p=s.length)&&d.push(b)}return o!==1?"Invalid checksum for "+i:{prefix:a,words:d}}function v5(){var i=Qc.apply(null,arguments);if(typeof i=="object")return i}function w5(i){var e=Qc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Yo(i,e,t,n){for(var r=0,a=0,s=(1<=t;)a-=t,o.push(r>>a&s);if(n)a>0&&o.push(r<=e)return"Excess padding";if(r<{(function(i,e){typeof Xd=="object"&&typeof Zd<"u"?Zd.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.fetchRetry=e())})(Xd,function(){"use strict";var i=function(n,r){if(r=r||{},typeof n!="function")throw new t("fetch must be a function");if(typeof r!="object")throw new t("defaults must be an object");if(r.retries!==void 0&&!e(r.retries))throw new t("retries must be a positive integer");if(r.retryDelay!==void 0&&!e(r.retryDelay)&&typeof r.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(r.retryOn!==void 0&&!Array.isArray(r.retryOn)&&typeof r.retryOn!="function")throw new t("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return r=Object.assign(a,r),function(o,d){var p=r.retries,c=r.retryDelay,b=r.retryOn;if(d&&d.retries!==void 0)if(e(d.retries))p=d.retries;else throw new t("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(e(d.retryDelay)||typeof d.retryDelay=="function")c=d.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")b=d.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(I,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,d).then(function(U){if(Array.isArray(b)&&b.indexOf(U.status)===-1)I(U);else if(typeof b=="function")try{return Promise.resolve(b(L,null,U)).then(function(q){q?S(L,null,U):I(U)}).catch(_)}catch(q){_(q)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return i})});var ep=ie(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$dictionary=void 0;fu.$dictionary=function(){var i,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(i=e.__typia_custom_validator)!==null&&i!==void 0?i:e.__typia_custom_validator=new Map}()});var Fs=ie((nM,bm)=>{bm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var np=ie(Hi=>{var Ae=Fs(),tp=()=>[{type:Ae.RANGE,from:48,to:57}],xm=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(tp()),gm=()=>[{type:Ae.CHAR,value:9},{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:11},{type:Ae.CHAR,value:12},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:32},{type:Ae.CHAR,value:160},{type:Ae.CHAR,value:5760},{type:Ae.RANGE,from:8192,to:8202},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233},{type:Ae.CHAR,value:8239},{type:Ae.CHAR,value:8287},{type:Ae.CHAR,value:12288},{type:Ae.CHAR,value:65279}],p1=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Hi.words=()=>({type:Ae.SET,set:xm(),not:!1});Hi.notWords=()=>({type:Ae.SET,set:xm(),not:!0});Hi.ints=()=>({type:Ae.SET,set:tp(),not:!1});Hi.notInts=()=>({type:Ae.SET,set:tp(),not:!0});Hi.whitespace=()=>({type:Ae.SET,set:gm(),not:!1});Hi.notWhitespace=()=>({type:Ae.SET,set:gm(),not:!0});Hi.anyChar=()=>({type:Ae.SET,set:p1(),not:!0})});var vm=ie(Ls=>{var Tm=Fs(),Ba=np(),y1="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",c1={0:0,t:9,n:10,v:11,f:12,r:13};Ls.strToChars=function(i){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return i=i.replace(e,function(t,n,r,a,s,o,d,p){if(r)return t;var c=n?8:a?parseInt(a,16):s?parseInt(s,16):o?parseInt(o,8):d?y1.indexOf(d):c1[p],b=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),i};Ls.tokenizeClass=(i,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,r,a;(r=n.exec(i))!=null;)if(r[1])t.push(Ba.words());else if(r[2])t.push(Ba.ints());else if(r[3])t.push(Ba.whitespace());else if(r[4])t.push(Ba.notWords());else if(r[5])t.push(Ba.notInts());else if(r[6])t.push(Ba.notWhitespace());else if(r[7])t.push({type:Tm.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else if(a=r[12])t.push({type:Tm.CHAR,value:a.charCodeAt(0)});else return[t,n.lastIndex];Ls.error(e,"Unterminated character class")};Ls.error=(i,e)=>{throw new SyntaxError("Invalid regular expression: /"+i+"/: "+e)}});var wm=ie(Us=>{var mu=Fs();Us.wordBoundary=()=>({type:mu.POSITION,value:"b"});Us.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Us.begin=()=>({type:mu.POSITION,value:"^"});Us.end=()=>({type:mu.POSITION,value:"$"})});var _m=ie((sM,ip)=>{var Fa=vm(),vn=Fs(),Er=np(),hu=wm();ip.exports=i=>{var e=0,t,n,r={type:vn.ROOT,stack:[]},a=r,s=r.stack,o=[],d=O=>{Fa.error(i,`Nothing to repeat at column ${O-1}`)},p=Fa.strToChars(i);for(t=p.length;e{"use strict";var wn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new wn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=r=>{for(var a=0;a{for(var a=0;a{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};km.exports=Gi});var Em=ie((uM,Mm)=>{var bu=_m(),js=Am(),Cr=bu.types;Mm.exports=class Vs{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=bu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Vs.prototype.max!=null?Vs.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,r,a,s,o;switch(e.type){case Cr.ROOT:case Cr.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,r="",s=0,o=n.length;s{"use strict";var f1=Ir&&Ir.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.RandomGenerator=void 0;var m1=f1(Em()),h1;(function(i){var e="abcdefghijklmnopqrstuvwxyz";i.boolean=function(){return Math.random()<.5},i.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},i.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(i.integer(Number(t),Number(n)))},i.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},i.string=function(t){return new Array(t??i.integer(5,10)).fill(0).map(function(){return e[i.integer(0,e.length-1)]}).join("")},i.array=function(t,n){return new Array(n??i.integer(0,3)).fill(0).map(function(r,a){return t(a)})},i.pick=function(t){return t[i.integer(0,t.length-1)]},i.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t==="x"?n:n&3|8;return r.toString(16)})},i.email=function(){return"".concat(i.string(10),"@").concat(i.string(10),".").concat(i.string(3))},i.url=function(){return"https://".concat(i.string(10),".").concat(i.string(3))},i.ipv4=function(){return i.array(function(){return i.integer(0,255)},4).join(".")},i.ipv6=function(){return i.array(function(){return i.integer(0,65535).toString(16)},8).join(":")},i.pattern=function(t){return new m1.default(t).gen()},i.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString().substring(0,10)},i.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(i.number(t,n)).toISOString()}})(h1=Ir.RandomGenerator||(Ir.RandomGenerator={}))});var qs=ie(La=>{"use strict";var b1=La&&La.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(La,"__esModule",{value:!0});La.TypeGuardError=void 0;var x1=function(i){b1(e,i);function e(t){var n=this.constructor,r=i.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,a=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.method=t.method,r.path=t.path,r.expected=t.expected,r.value=t.value,r}return e}(Error);La.TypeGuardError=x1});var Im=ie(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$any=void 0;var g1=function(i){return i!==void 0?JSON.parse(JSON.stringify(i)):void 0};xu.$any=g1});var Sm=ie(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var T1=function(i,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var v1=qs(),w1=function(i){return function(e,t){if(e===!0)throw new v1.TypeGuardError({method:i,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=w1});var Pm=ie(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var _1=function(i,e,t){return e<=i&&i<=t};vu.$is_between=_1});var Nm=ie(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var k1=ep(),A1=function(i,e,t,n){var r,a=(r=k1.$dictionary.get(i))===null||r===void 0?void 0:r.get(e);return a===void 0?!0:a(t)(n)};wu.$is_custom=A1});var Dm=ie(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var M1=function(i){return E1.test(i)};_u.$is_date=M1;var E1=/^(\d{4})-(\d{2})-(\d{2})$/});var Om=ie(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var C1=function(i){return!isNaN(new Date(i).getTime())};ku.$is_datetime=C1});var Bm=ie(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var I1=function(i){return S1.test(i)};Au.$is_email=I1;var S1=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Fm=ie(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv4=void 0;var R1=function(i){return P1.test(i)};Mu.$is_ipv4=R1;var P1=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Lm=ie(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv6=void 0;var N1=function(i){return D1.test(i)};Eu.$is_ipv6=N1;var D1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Um=ie(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_url=void 0;var O1=function(i){return B1.test(i)};Cu.$is_url=O1;var B1=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var jm=ie(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var F1=function(i){return L1.test(i)};Iu.$is_uuid=F1;var L1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var Vm=ie(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var U1=function(i){return j1(i)?".".concat(i):"[".concat(JSON.stringify(i),"]")};Su.$join=U1;var j1=function(i){return V1(i)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(i)},V1=function(i){return q1.has(i)},q1=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var qm=ie(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var H1=qs(),G1=function(i){if(isFinite(i)===!1)throw new H1.TypeGuardError({method:"typia.stringify",expected:"number",value:i,message:"Error on typia.stringify(): infinite or not a number."});return i};Ru.$number=G1});var Hm=ie(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var z1=function(i){var e=function(t){if(i.length===0)return!0;var n=i[i.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&i.push(n),!1}};Pu.$report=z1});var Gm=ie(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var W1=function(i){return i.length===2?"":","+i.substring(1,i.length-1)};Nu.$rest=W1});var zm=ie(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var K1=function(i){if(i.length>41)return JSON.stringify(i);for(var e=i.length,t="",n=0,r=!1,a=!1,s=255,o=0;o=32;o++){if(s=i.charCodeAt(o),55296<=s&&s<=57343){a=!0;break}(s===34||s===92)&&(t+=i.slice(n,o)+"\\",n=o,r=!0)}return r?t+=i.slice(n):t=i,s<32||a===!0?JSON.stringify(i):'"'.concat(t,'"')};Du.$string=K1});var Wm=ie(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var J1=function(i){return i[i.length-1]===","?i.substring(0,i.length-1):i};Ou.$tail=J1});var Qm=ie(Sr=>{"use strict";var Gt=Sr&&Sr.__assign||function(){return Gt=Object.assign||function(i){for(var e,t=1,n=arguments.length;t=o.path.length&&d.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},i.stringify=function(t){return Gt(Gt({},i.is()),{number:ox.$number,string:dx.$string,tail:px.$tail,rest:lx.$rest,throws:e(t)})},i.clone=function(t){return Gt(Gt({},i.is()),{throws:e(t),any:$1.$any})},i.prune=function(t){return Gt(Gt({},i.is()),{throws:e(t)})},i.random=function(){return{generator:Km.RandomGenerator,pick:Km.RandomGenerator.pick}};var e=function(t){return function(n){throw new Jm.TypeGuardError(Gt(Gt({},n),{method:"typia.".concat(t)}))}}})(yx=Sr.Namespace||(Sr.Namespace={}))});var Ym=ie(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.MapUtil=void 0;var cx;(function(i){i.take=function(e){return function(t,n){var r=e.get(t);if(r)return r;var a=n();return e.set(t,a),a}}})(cx=Hs.MapUtil||(Hs.MapUtil={}))});var Zm=ie(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var th=ie(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var ih=ie(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var ah=ie(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0})});var oh=ie(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var lh=ie(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var hp=ie(z=>{"use strict";var fx=z&&z.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),Rr=z&&z.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&fx(e,i,t)};Object.defineProperty(z,"__esModule",{value:!0});z.createValidatePrune=z.createIsPrune=z.createAssertPrune=z.createPrune=z.createValidateClone=z.createIsClone=z.createAssertClone=z.createClone=z.createRandom=z.createValidateStringify=z.createIsStringify=z.createAssertStringify=z.createStringify=z.createValidateParse=z.createAssertParse=z.createIsParse=z.createValidateEquals=z.createEquals=z.createAssertEquals=z.createValidate=z.createIs=z.createAssertType=z.createAssert=z.validatePrune=z.isPrune=z.assertPrune=z.prune=z.validateClone=z.isClone=z.assertClone=z.clone=z.literals=z.random=z.metadata=z.validateStringify=z.isStringify=z.assertStringify=z.stringify=z.validateParse=z.isParse=z.assertParse=z.application=z.customValidators=z.validateEquals=z.equals=z.assertEquals=z.validate=z.is=z.assertType=z.assert=void 0;var Ua=ep(),Me=Qm(),mx=Ym();Rr(Zm(),z);Rr(th(),z);Rr(ih(),z);Rr(ah(),z);Rr(oh(),z);Rr(lh(),z);Rr(qs(),z);function rp(){ae("assert")}z.assert=rp;Object.assign(rp,Me.Namespace.assert("assert"));function ap(){ae("assertType")}z.assertType=ap;Object.assign(ap,Me.Namespace.assert("assertType"));function Bu(){ae("is")}z.is=Bu;Object.assign(Bu,Me.Namespace.assert("is"));function Fu(){ae("validate")}z.validate=Fu;Object.assign(Fu,Me.Namespace.validate());function sp(){ae("assertEquals")}z.assertEquals=sp;Object.assign(sp,Me.Namespace.assert("assertEquals"));function op(){ae("equals")}z.equals=op;Object.assign(op,Me.Namespace.is());function up(){ae("validateEquals")}z.validateEquals=up;Object.assign(up,Me.Namespace.validate());z.customValidators={size:function(i){var e,t;return i?(t=(e=Ua.$dictionary.get(i))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Ua.$dictionary.size},has:function(i){return function(e){var t,n;return(n=(t=Ua.$dictionary.get(i))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(i){return function(e){var t;return(t=Ua.$dictionary.get(i))===null||t===void 0?void 0:t.get(e)}},insert:function(i){return function(e){return function(t){var n=mx.MapUtil.take(Ua.$dictionary)(i,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(i){return function(e){var t,n;return(n=(t=Ua.$dictionary.get(i))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function hx(){ae("application")}z.application=hx;function lp(){ae("assertParse")}z.assertParse=lp;Object.assign(lp,Me.Namespace.assert("assertParse"));function dp(){ae("isParse")}z.isParse=dp;Object.assign(dp,Bu);function pp(){ae("validateParse")}z.validateParse=pp;Object.assign(pp,Fu);function yp(){ae("stringify")}z.stringify=yp;Object.assign(yp,Me.Namespace.stringify("stringify"));function Lu(){ae("assertStringify")}z.assertStringify=Lu;Object.assign(Lu,Me.Namespace.assert("assertStringify"));Object.assign(Lu,Me.Namespace.stringify("assertStringify"));function Uu(){ae("isStringify")}z.isStringify=Uu;Object.assign(Uu,Me.Namespace.is());Object.assign(Uu,Me.Namespace.stringify("isStringify"));function ju(){ae("validateStringify")}z.validateStringify=ju;Object.assign(ju,Me.Namespace.validate());Object.assign(ju,Me.Namespace.stringify("validateStringify"));function bx(){ae("metadata")}z.metadata=bx;function cp(){ae("random")}z.random=cp;Object.assign(cp,Me.Namespace.random());function xx(){ae("literals")}z.literals=xx;function fp(){ae("clone")}z.clone=fp;Object.assign(fp,Me.Namespace.clone("clone"));function Vu(){ae("assertClone")}z.assertClone=Vu;Object.assign(Vu,Me.Namespace.assert("assertClone"));Object.assign(Vu,Me.Namespace.clone("assertClone"));function qu(){ae("isClone")}z.isClone=qu;Object.assign(qu,Me.Namespace.is());Object.assign(qu,Me.Namespace.clone("isClone"));function Hu(){ae("validateClone")}z.validateClone=Hu;Object.assign(Hu,Me.Namespace.validate());Object.assign(Hu,Me.Namespace.clone("validateClone"));function mp(){ae("prune")}z.prune=mp;Object.assign(mp,Me.Namespace.prune("prune"));function Gu(){ae("assertPrune")}z.assertPrune=Gu;Object.assign(Gu,Me.Namespace.assert("assertPrune"));Object.assign(Gu,Me.Namespace.prune("assertPrune"));function zu(){ae("isPrune")}z.isPrune=zu;Object.assign(zu,Me.Namespace.is());Object.assign(zu,Me.Namespace.prune("isPrune"));function Wu(){ae("validatePrune")}z.validatePrune=Wu;Object.assign(Wu,Me.Namespace.prune("validatePrune"));Object.assign(Wu,Me.Namespace.validate());function dh(){ae("createAssert")}z.createAssert=dh;Object.assign(dh,rp);function ph(){ae("createAssertType")}z.createAssertType=ph;Object.assign(ph,ap);function yh(){ae("createIs")}z.createIs=yh;Object.assign(yh,Bu);function ch(){ae("createValidate")}z.createValidate=ch;Object.assign(ch,Fu);function fh(){ae("createAssertEquals")}z.createAssertEquals=fh;Object.assign(fh,sp);function mh(){ae("createEquals")}z.createEquals=mh;Object.assign(mh,op);function hh(){ae("createValidateEquals")}z.createValidateEquals=hh;Object.assign(hh,up);function bh(){ae("createIsParse")}z.createIsParse=bh;Object.assign(bh,dp);function xh(){ae("createAssertParse")}z.createAssertParse=xh;Object.assign(xh,lp);function gh(){ae("createValidateParse")}z.createValidateParse=gh;Object.assign(gh,pp);function Th(){ae("createStringify")}z.createStringify=Th;Object.assign(Th,yp);function vh(){ae("createAssertStringify")}z.createAssertStringify=vh;Object.assign(vh,Lu);function wh(){ae("createIsStringify")}z.createIsStringify=wh;Object.assign(wh,Uu);function _h(){ae("createValidateStringify")}z.createValidateStringify=_h;Object.assign(_h,ju);function kh(){ae("createRandom")}z.createRandom=kh;Object.assign(kh,cp);function Ah(){ae("createClone")}z.createClone=Ah;Object.assign(Ah,fp);function Mh(){ae("createAssertClone")}z.createAssertClone=Mh;Object.assign(Mh,Vu);function Eh(){ae("createIsClone")}z.createIsClone=Eh;Object.assign(Eh,qu);function Ch(){ae("createValidateClone")}z.createValidateClone=Ch;Object.assign(Ch,Hu);function Ih(){ae("createPrune")}z.createPrune=Ih;Object.assign(Ih,mp);function Sh(){ae("createAssertPrune")}z.createAssertPrune=Sh;Object.assign(Sh,Gu);function Rh(){ae("createIsPrune")}z.createIsPrune=Rh;Object.assign(Rh,zu);function Ph(){ae("createValidatePrune")}z.createValidatePrune=Ph;Object.assign(Ph,Wu);function ae(i){throw new Error("Error on typia.".concat(i,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Dh=ie(_n=>{"use strict";var Nh=_n&&_n.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),gx=_n&&_n.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),Tx=_n&&_n.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Nh(e,i,t);return gx(e,i),e},vx=_n&&_n.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Nh(e,i,t)};Object.defineProperty(_n,"__esModule",{value:!0});var wx=Tx(hp());_n.default=wx;vx(hp(),_n)});var Ud={};Kr(Ud,{BaseContract:()=>ha,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>gr,FixedNumber:()=>ct,Signer:()=>Pt,VoidSigner:()=>yi,Wallet:()=>Nn,Wordlist:()=>Tn,constants:()=>ht,errors:()=>$t,getDefaultProvider:()=>uu,logger:()=>Df,providers:()=>ri,utils:()=>te,version:()=>du,wordlists:()=>vr});var l0=En(cl());var Xp="logger/5.7.0";var Zp=!1,e0=!1,Xs={debug:1,default:2,info:2,warning:3,error:4,off:5},t0=Xs.default,fl=null;function y6(){try{let i=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{i.push(e)}}),i.length)throw new Error("missing "+i.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(i){return i.message}return null}var n0=y6(),ml;(function(i){i.DEBUG="DEBUG",i.INFO="INFO",i.WARNING="WARNING",i.ERROR="ERROR",i.OFF="OFF"})(ml||(ml={}));var $t;(function(i){i.UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED",i.ACTION_REJECTED="ACTION_REJECTED"})($t||($t={}));var i0="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Xs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(t0>Xs[n])&&console.log.apply(console,t)}debug(...e){this._log(M.levels.DEBUG,e)}info(...e){this._log(M.levels.INFO,e)}warn(...e){this._log(M.levels.WARNING,e)}makeError(e,t,n){if(e0)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(d=>{let p=n[d];try{if(p instanceof Uint8Array){let c="";for(let b=0;b>4],c+=i0[p[b]&15];r.push(d+"=Uint8Array(0x"+c+")")}else r.push(d+"="+JSON.stringify(p))}catch{r.push(d+"="+JSON.stringify(n[d].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let a=e,s="";switch(t){case $t.NUMERIC_FAULT:{s="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case $t.CALL_EXCEPTION:case $t.INSUFFICIENT_FUNDS:case $t.MISSING_NEW:case $t.NONCE_EXPIRED:case $t.REPLACEMENT_UNDERPRICED:case $t.TRANSACTION_REPLACED:case $t.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let o=new Error(e);return o.reason=a,o.code=t,Object.keys(n).forEach(function(d){o[d]=n[d]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,M.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),n0&&this.throwError("platform missing String.prototype.normalize",M.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:n0})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,M.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,M.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",M.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",M.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return fl||(fl=new M(Xp)),fl}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}e0=!!e,Zp=!!t}static setLogLevel(e){let t=Xs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}t0=t}static from(e){return new M(e)}};M.errors=$t;M.levels=ml;var r0="bytes/5.7.0";var wt=new M(r0);function s0(i){return!!i.toHexString}function Jr(i){return i.slice||(i.slice=function(){let e=Array.prototype.slice.call(arguments);return Jr(new Uint8Array(Array.prototype.slice.apply(i,e)))}),i}function oi(i){return re(i)&&!(i.length%2)||pn(i)}function a0(i){return typeof i=="number"&&i==i&&i%1===0}function pn(i){if(i==null)return!1;if(i.constructor===Uint8Array)return!0;if(typeof i=="string"||!a0(i.length)||i.length<0)return!1;for(let e=0;e=256)return!1}return!0}function V(i,e){if(e||(e={}),typeof i=="number"){wt.checkSafeUint53(i,"invalid arrayify value");let t=[];for(;i;)t.unshift(i&255),i=parseInt(String(i/256));return t.length===0&&t.push(0),Jr(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),s0(i)&&(i=i.toHexString()),re(i)){let t=i.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",i));let n=[];for(let r=0;rV(r)),t=e.reduce((r,a)=>r+a.length,0),n=new Uint8Array(t);return e.reduce((r,a)=>(n.set(a,r),r+a.length),0),Jr(n)}function nn(i){let e=V(i);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(i,e-i.length),Jr(t)}function re(i,e){return!(typeof i!="string"||!i.match(/^0x[0-9A-Fa-f]*$/)||e&&i.length!==2+2*e)}var hl="0123456789abcdef";function W(i,e){if(e||(e={}),typeof i=="number"){wt.checkSafeUint53(i,"invalid hexlify value");let t="";for(;i;)t=hl[i&15]+t,i=Math.floor(i/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof i=="bigint")return i=i.toString(16),i.length%2?"0x0"+i:"0x"+i;if(e.allowMissingPrefix&&typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),s0(i))return i.toHexString();if(re(i))return i.length%2&&(e.hexPad==="left"?i="0x0"+i.substring(2):e.hexPad==="right"?i+="0":wt.throwArgumentError("hex data is odd-length","value",i)),i.toLowerCase();if(pn(i)){let t="0x";for(let n=0;n>4]+hl[r&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",i)}function Ft(i){if(typeof i!="string")i=W(i);else if(!re(i)||i.length%2)return null;return(i.length-2)/2}function Ce(i,e,t){return typeof i!="string"?i=W(i):(!re(i)||i.length%2)&&wt.throwArgumentError("invalid hexData","value",i),e=2+2*e,t!=null?"0x"+i.substring(e,2+2*t):"0x"+i.substring(e)}function kt(i){let e="0x";return i.forEach(t=>{e+=W(t).substring(2)}),e}function qn(i){let e=bl(W(i,{hexPad:"left"}));return e==="0x"?"0x0":e}function bl(i){typeof i!="string"&&(i=W(i)),re(i)||wt.throwArgumentError("invalid hex string","value",i),i=i.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);i.length<2*e+2;)i="0x0"+i.substring(2);return i}function Hn(i){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(oi(i)){let t=V(i);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",i),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",i)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=i.r,e.s=i.s,e.v=i.v,e.recoveryParam=i.recoveryParam,e._vs=i._vs,e._vs!=null){let r=lr(V(e._vs),32);e._vs=W(r);let a=r[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",i),r[0]&=127;let s=W(r);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",i)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",i):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let r=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",i)}e.r==null||!re(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",i):e.r=me(e.r,32),e.s==null||!re(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",i):e.s=me(e.s,32);let t=V(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",i),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(re(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",i),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&wt.throwArgumentError("signature _vs mismatch v and s","signature",i)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Ga(i){return i=Hn(i),W(ye([i.r,i.s,i.recoveryParam?"0x1c":"0x1b"]))}var Zs="bignumber/5.7.0";var za=l0.default.BN,ui=new M(Zs),xl={},o0=9007199254740991;function d0(i){return i!=null&&(F.isBigNumber(i)||typeof i=="number"&&i%1===0||typeof i=="string"&&!!i.match(/^-?[0-9]+$/)||re(i)||typeof i=="bigint"||pn(i))}var u0=!1,F=class{constructor(e,t){e!==xl&&ui.throwError("cannot call constructor directly; use BigNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qt(be(this).fromTwos(e))}toTwos(e){return Qt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Qt(be(this).add(be(e)))}sub(e){return Qt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&yn("division-by-zero","div"),Qt(be(this).div(be(e)))}mul(e){return Qt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&yn("division-by-zero","mod"),Qt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&yn("negative-power","pow"),Qt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","and"),Qt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","or"),Qt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","xor"),Qt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&yn("negative-width","mask"),Qt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&yn("negative-width","shl"),Qt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&yn("negative-width","shr"),Qt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{yn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ui.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?u0||(u0=!0,ui.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ui.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.errors.UNEXPECTED_ARGUMENT,{}):ui.throwError("BigNumber.toString does not accept parameters",M.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(xl,Wa(e)):e.match(/^-?[0-9]+$/)?new F(xl,Wa(new za(e))):ui.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&yn("underflow","BigNumber.from",e),(e>=o0||e<=-o0)&&yn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(pn(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(re(n)||n[0]==="-"&&re(n.substring(1))))return F.from(n)}return ui.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Wa(i){if(typeof i!="string")return Wa(i.toString(16));if(i[0]==="-")return i=i.substring(1),i[0]==="-"&&ui.throwArgumentError("invalid hex","value",i),i=Wa(i),i==="0x00"?i:"-"+i;if(i.substring(0,2)!=="0x"&&(i="0x"+i),i==="0x")return"0x00";for(i.length%2&&(i="0x0"+i.substring(2));i.length>4&&i.substring(0,4)==="0x00";)i="0x"+i.substring(4);return i}function Qt(i){return F.from(Wa(i))}function be(i){let e=F.from(i).toHexString();return e[0]==="-"?new za("-"+e.substring(3),16):new za(e.substring(2),16)}function yn(i,e,t){let n={fault:i,operation:e};return t!=null&&(n.value=t),ui.throwError(i,M.errors.NUMERIC_FAULT,n)}function gl(i){return new za(i,36).toString(16)}function Tl(i){return new za(i,16).toString(36)}var zt=new M(Zs),Ka={},y0=F.from(0),c0=F.from(-1);function f0(i,e,t,n){let r={fault:e,operation:t};return n!==void 0&&(r.value=n),zt.throwError(i,M.errors.NUMERIC_FAULT,r)}var Ja="0";for(;Ja.length<256;)Ja+=Ja;function vl(i){if(typeof i!="number")try{i=F.from(i).toNumber()}catch{}return typeof i=="number"&&i>=0&&i<=256&&!(i%1)?"1"+Ja.substring(0,i):zt.throwArgumentError("invalid decimal size","decimals",i)}function $r(i,e){e==null&&(e=0);let t=vl(e);i=F.from(i);let n=i.lt(y0);n&&(i=i.mul(c0));let r=i.mod(t).toString();for(;r.length2&&zt.throwArgumentError("too many decimal points","value",i);let a=r[0],s=r[1];for(a||(a="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&f0("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?d:(typeof e[s]!==o&&zt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=a("signed","boolean",t),n=a("width","number",n),r=a("decimals","number",r)}return n%8&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new li(Ka,t,n,r)}},ct=class{constructor(e,t,n,r){e!==Ka&&zt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",M.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&zt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ct.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ct.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ct.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ct.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(p0.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(p0.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&zt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ct.from("1"+Ja.substring(0,e),this.format),r=c6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&zt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ct.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!d0(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ct.fromString($r(e,t),li.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=li.from(t),r=cn(e,n.decimals);!n.signed&&r.lt(y0)&&f0("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=r.toTwos(n.width).toHexString():(a=r.toHexString(),a=me(a,n.width/8));let s=$r(r,n.decimals);return new ct(Ka,a,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=li.from(t);if(V(e).length>n.width/8)throw new Error("overflow");let r=F.from(e);n.signed&&(r=r.fromTwos(n.width));let a=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=$r(r,n.decimals);return new ct(Ka,a,s,n)}static from(e,t){if(typeof e=="string")return ct.fromString(e,t);if(pn(e))return ct.fromBytes(e,t);try{return ct.fromValue(e,0,t)}catch(n){if(n.code!==M.errors.INVALID_ARGUMENT)throw n}return zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},p0=ct.from(1),c6=ct.from("0.5");var m0="properties/5.7.0";var f6=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},eo=new M(m0);function B(i,e,t){Object.defineProperty(i,e,{enumerable:!0,value:t,writable:!1})}function mt(i,e){for(let t=0;t<32;t++){if(i[e])return i[e];if(!i.prototype||typeof i.prototype!="object")break;i=Object.getPrototypeOf(i.prototype).constructor}return null}function Ie(i){return f6(this,void 0,void 0,function*(){let e=Object.keys(i).map(n=>{let r=i[n];return Promise.resolve(r).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,r)=>(n[r.key]=r.value,n),{})})}function Qr(i,e){(!i||typeof i!="object")&&eo.throwArgumentError("invalid object","object",i),Object.keys(i).forEach(t=>{e[t]||eo.throwArgumentError("invalid object key - "+t,"transaction:"+t,i)})}function we(i){let e={};for(let t in i)e[t]=i[t];return e}var m6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h0(i){if(i==null||m6[typeof i])return!0;if(Array.isArray(i)||typeof i=="object"){if(!Object.isFrozen(i))return!1;let e=Object.keys(i);for(let t=0;tft(e)));if(typeof i=="object"){let e={};for(let t in i){let n=i[t];n!==void 0&&B(e,t,ft(n))}return e}return eo.throwArgumentError(`Cannot deepCopy ${typeof i}`,"object",i)}function ft(i){return h6(i)}var rn=class{constructor(e){for(let t in e)this[t]=ft(e[t])}};var Gn="abi/5.7.0";var ge=new M(Gn),dr={},b0={calldata:!0,memory:!0,storage:!0},b6={calldata:!0,memory:!0};function to(i,e){if(i==="bytes"||i==="string"){if(b0[e])return!0}else if(i==="address"){if(e==="payable")return!0}else if((i.indexOf("[")>=0||i==="tuple")&&b6[e])return!0;return(b0[e]||e==="payable")&&ge.throwArgumentError("invalid modifier","name",e),!1}function x6(i,e){let t=i;function n(o){ge.throwArgumentError(`unexpected character at position ${o}`,"param",i)}i=i.replace(/\s/g," ");function r(o){let d={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(d.indexed=!1),d}let a={type:"",name:"",state:{allowType:!0}},s=a;for(let o=0;oJSON.parse(r.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?pt.fromString(e,t):pt.fromObject(e)}static fromObject(e){return pt.isParamType(e)?e:new pt(dr,{name:e.name||null,type:Yr(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function n(r){return pt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}return n(x6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function $a(i,e){return v6(i).map(t=>pt.fromString(t,e))}var Kt=class{constructor(e,t){e!==dr&&ge.throwError("use a static from method",M.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),no(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Kt.isFragment(e)?e:typeof e=="string"?Kt.fromString(e):Kt.fromObject(e)}static fromObject(e){if(Kt.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Wt.fromObject(e);case"constructor":return Lt.fromObject(e);case"error":return an.fromObject(e);case"fallback":case"receive":return null}return ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Wt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ut.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Lt.fromString(e.trim()):e.split(" ")[0]==="error"?an.fromString(e.substring(5).trim()):ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Wt=class extends Kt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Wt.fromString(e):Wt.fromObject(e)}static fromObject(e){if(Wt.isEventFragment(e))return e;e.type!=="event"&&ge.throwArgumentError("invalid event object","value",e);let t={name:Qa(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new Wt(dr,t)}static fromString(e){let t=e.match(Ya);t||ge.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(r=>{switch(r.trim()){case"anonymous":n=!0;break;case"":break;default:ge.warn("unknown modifier: "+r)}}),Wt.fromObject({name:t[1].trim(),anonymous:n,inputs:$a(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function g0(i,e){e.gas=null;let t=i.split("@");return t.length!==1?(t.length>2&&ge.throwArgumentError("invalid human-readable ABI signature","value",i),t[1].match(/^[0-9]+$/)||ge.throwArgumentError("invalid human-readable ABI signature gas","value",i),e.gas=F.from(t[1]),t[0]):i}function T0(i,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",i.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function v0(i){let e={constant:!1,payable:!0,stateMutability:"payable"};return i.stateMutability!=null?(e.stateMutability=i.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",i.constant!=null&&!!i.constant!==e.constant&&ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",i),e.payable=e.stateMutability==="payable",i.payable!=null&&!!i.payable!==e.payable&&ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",i)):i.payable!=null?(e.payable=!!i.payable,i.constant==null&&!e.payable&&i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e.constant=!!i.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ge.throwArgumentError("cannot have constant payable function","value",i)):i.constant!=null?(e.constant=!!i.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):i.type!=="constructor"&&ge.throwArgumentError("unable to determine stateMutability","value",i),e}var Lt=class extends Kt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===xe.sighash&&ge.throwError("cannot format a constructor for sighash",M.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Lt.fromString(e):Lt.fromObject(e)}static fromObject(e){if(Lt.isConstructorFragment(e))return e;e.type!=="constructor"&&ge.throwArgumentError("invalid constructor object","value",e);let t=v0(e);t.constant&&ge.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Lt(dr,n)}static fromString(e){let t={type:"constructor"};e=g0(e,t);let n=e.match(Ya);return(!n||n[1].trim()!=="constructor")&&ge.throwArgumentError("invalid constructor string","value",e),t.inputs=$a(n[2].trim(),!1),T0(n[3].trim(),t),Lt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ut=class extends Lt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;e.type!=="function"&&ge.throwArgumentError("invalid function object","value",e);let t=v0(e),n={type:e.type,name:Qa(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(pt.fromObject):[],outputs:e.outputs?e.outputs.map(pt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ut(dr,n)}static fromString(e){let t={type:"function"};e=g0(e,t);let n=e.split(" returns ");n.length>2&&ge.throwArgumentError("invalid function string","value",e);let r=n[0].match(Ya);if(r||ge.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&Qa(t.name),t.inputs=$a(r[2],!1),T0(r[3].trim(),t),n.length>1){let a=n[1].match(Ya);(a[1].trim()!=""||a[3].trim()!="")&&ge.throwArgumentError("unexpected tokens","value",e),t.outputs=$a(a[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function x0(i){let e=i.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",i),i}var an=class extends Kt{format(e){if(e||(e=xe.sighash),xe[e]||ge.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?an.fromString(e):an.fromObject(e)}static fromObject(e){if(an.isErrorFragment(e))return e;e.type!=="error"&&ge.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Qa(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return x0(new an(dr,t))}static fromString(e){let t={type:"error"},n=e.match(Ya);return n||ge.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Qa(t.name),t.inputs=$a(n[2],!1),x0(an.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Yr(i){return i.match(/^uint($|[^1-9])/)?i="uint256"+i.substring(4):i.match(/^int($|[^1-9])/)&&(i="int256"+i.substring(3)),i}var T6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Qa(i){return(!i||!i.match(T6))&&ge.throwArgumentError(`invalid identifier "${i}"`,"value",i),i}var Ya=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function v6(i){i=i.trim();let e=[],t="",n=0;for(let r=0;rthis.wordSize&&wl.throwError("value out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},yr=class{constructor(e,t,n,r){B(this,"_data",V(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",r),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):yr.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:wl.throwError("data out-of-bounds",M.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new yr(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var _0=En(w0());function ce(i){return"0x"+_0.default.keccak_256(V(i))}var ro={};Kr(ro,{decode:()=>Xa,encode:()=>di});var k0="rlp/5.7.0";var zn=new M(k0);function A0(i){let e=[];for(;i;)e.unshift(i&255),i>>=8;return e}function M0(i,e,t){let n=0;for(let r=0;re+1+n&&zn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:r}}function I0(i,e){if(i.length===0&&zn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),i[e]>=248){let t=i[e]-247;e+1+t>i.length&&zn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let n=M0(i,e+1,t);return e+1+t+n>i.length&&zn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),E0(i,e,e+1+t,t+n)}else if(i[e]>=192){let t=i[e]-192;return e+1+t>i.length&&zn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),E0(i,e,e+1,t)}else if(i[e]>=184){let t=i[e]-183;e+1+t>i.length&&zn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let n=M0(i,e+1,t);e+1+t+n>i.length&&zn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let r=W(i.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:r}}else if(i[e]>=128){let t=i[e]-128;e+1+t>i.length&&zn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let n=W(i.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(i[e])}}function Xa(i){let e=V(i),t=I0(e,0);return t.consumed!==e.length&&zn.throwArgumentError("invalid rlp data","data",i),t.result}var S0="address/5.7.0";var Ri=new M(S0);function R0(i){re(i,20)||Ri.throwArgumentError("invalid address","address",i),i=i.toLowerCase();let e=i.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=e[r].charCodeAt(0);let n=V(ce(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(n[r>>1]&15)>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}var w6=9007199254740991;function _6(i){return Math.log10?Math.log10(i):Math.log(i)/Math.LN10}var _l={};for(let i=0;i<10;i++)_l[String(i)]=String(i);for(let i=0;i<26;i++)_l[String.fromCharCode(65+i)]=String(10+i);var P0=Math.floor(_6(w6));function N0(i){i=i.toUpperCase(),i=i.substring(4)+i.substring(0,2)+"00";let e=i.split("").map(n=>_l[n]).join("");for(;e.length>=P0;){let n=e.substring(0,P0);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(i){let e=null;if(typeof i!="string"&&Ri.throwArgumentError("invalid address","address",i),i.match(/^(0x)?[0-9a-fA-F]{40}$/))i.substring(0,2)!=="0x"&&(i="0x"+i),e=R0(i),i.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==i&&Ri.throwArgumentError("bad address checksum","address",i);else if(i.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(i.substring(2,4)!==N0(i)&&Ri.throwArgumentError("bad icap checksum","address",i),e=gl(i.substring(4));e.length<40;)e="0"+e;e=R0("0x"+e)}else Ri.throwArgumentError("invalid address","address",i);return e}function D0(i){try{return fe(i),!0}catch{}return!1}function O0(i){let e=Tl(fe(i).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+N0("XE00"+e)+e}function cr(i){let e=null;try{e=fe(i.from)}catch{Ri.throwArgumentError("missing from address","transaction",i)}let t=nn(V(F.from(i.nonce).toHexString()));return fe(Ce(ce(di([e,t])),12))}function B0(i,e,t){return Ft(e)!==32&&Ri.throwArgumentError("salt must be 32 bytes","salt",e),Ft(t)!==32&&Ri.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ce(ce(ye(["0xff",fe(i),e,t])),12))}var ao=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var so=class extends At{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Zr=new M(Gn);function kl(i,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let d={};n=e.map(p=>{let c=p.localName;return c||Zr.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]&&Zr.throwError("cannot encode object for signature with duplicate names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),d[c]=!0,t[c]})}else Zr.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Zr.throwArgumentError("types/value length mismatch","tuple",t);let r=new pr(i.wordSize),a=new pr(i.wordSize),s=[];e.forEach((d,p)=>{let c=n[p];if(d.dynamic){let b=a.length;d.encode(a,c);let I=r.writeUpdatableValue();s.push(_=>{I(_+b)})}else d.encode(r,c)}),s.forEach(d=>{d(r.length)});let o=i.appendWriter(r);return o+=i.appendWriter(a),o}function Al(i,e){let t=[],n=i.subReader(0);e.forEach(a=>{let s=null;if(a.dynamic){let o=i.readValue(),d=n.subReader(o.toNumber());try{s=a.decode(d)}catch(p){if(p.code===M.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(i)}catch(o){if(o.code===M.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}s!=null&&t.push(s)});let r=e.reduce((a,s)=>{let o=s.localName;return o&&(a[o]||(a[o]=0),a[o]++),a},{});e.forEach((a,s)=>{let o=a.localName;if(!o||r[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let d=t[s];d instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw d}}):t[o]=d});for(let a=0;a{throw s}})}return Object.freeze(t)}var oo=class extends At{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",a=t===-1||e.dynamic;super("array",r,n,a),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Zr.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let r=0;rco,EtherSymbol:()=>V0,HashZero:()=>ta,MaxInt256:()=>j0,MaxUint256:()=>ho,MinInt256:()=>U0,NegativeOne:()=>fo,One:()=>mo,Two:()=>F0,WeiPerEther:()=>L0,Zero:()=>ea});var co="0x0000000000000000000000000000000000000000";var fo=F.from(-1),ea=F.from(0),mo=F.from(1),F0=F.from(2),L0=F.from("1000000000000000000"),ho=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),U0=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),j0=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var ta="0x0000000000000000000000000000000000000000000000000000000000000000";var V0="\u039E";var bo=class extends At{constructor(e,t,n){let r=(t?"int":"uint")+e*8;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),r=ho.mask(e.wordSize*8);if(this.signed){let a=r.mask(this.size*8-1);(n.gt(a)||n.lt(a.add(mo).mul(fo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(ea)||n.gt(r.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var q0="strings/5.7.0";var H0=new M(q0),Jt;(function(i){i.current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD"})(Jt||(Jt={}));var jt;(function(i){i.UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation"})(jt||(jt={}));function k6(i,e,t,n,r){return H0.throwArgumentError(`invalid codepoint at offset ${e}; ${i}`,"bytes",t)}function G0(i,e,t,n,r){if(i===jt.BAD_PREFIX||i===jt.UNEXPECTED_CONTINUE){let a=0;for(let s=e+1;s>6===2;s++)a++;return a}return i===jt.OVERRUN?t.length-e-1:0}function A6(i,e,t,n,r){return i===jt.OVERLONG?(n.push(r),0):(n.push(65533),G0(i,e,t,n,r))}var xo=Object.freeze({error:k6,ignore:G0,replace:A6});function El(i,e){e==null&&(e=xo.error),i=V(i);let t=[],n=0;for(;n>7===0){t.push(r);continue}let a=null,s=null;if((r&224)===192)a=1,s=127;else if((r&240)===224)a=2,s=2047;else if((r&248)===240)a=3,s=65535;else{(r&192)===128?n+=e(jt.UNEXPECTED_CONTINUE,n-1,i,t):n+=e(jt.BAD_PREFIX,n-1,i,t);continue}if(n-1+a>=i.length){n+=e(jt.OVERRUN,n-1,i,t);continue}let o=r&(1<<8-a-1)-1;for(let d=0;d1114111){n+=e(jt.OUT_OF_RANGE,n-1-a,i,t,o);continue}if(o>=55296&&o<=57343){n+=e(jt.UTF16_SURROGATE,n-1-a,i,t,o);continue}if(o<=s){n+=e(jt.OVERLONG,n-1-a,i,t,o);continue}t.push(o)}}return t}function Te(i,e=Jt.current){e!=Jt.current&&(H0.checkNormalize(),i=i.normalize(e));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;let a=i.charCodeAt(n);if(n>=i.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((r&1023)<<10)+(a&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return V(t)}function Ml(i){let e="0000"+i.toString(16);return"\\u"+e.substring(e.length-4)}function Cl(i,e){return'"'+El(i,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Ml(t):(t-=65536,Ml((t>>10&1023)+55296)+Ml((t&1023)+56320))}).join("")+'"'}function go(i){return i.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Yt(i,e){return go(El(i,e))}function Pi(i,e=Jt.current){return El(Te(i,e))}function Il(i){let e=Te(i);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,ta]).slice(0,32))}function Sl(i){let e=V(i);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Yt(e.slice(0,t))}function M6(i){if(i.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=r.split(":");t+=parseInt(a[0],16),n[t]=e(a[1])}),n}function z0(i){let e=0;return i.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let r=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:r,h:e}})}function Pl(i,e){let t=0;for(let n=0;n=t&&i<=t+r.h&&(i-t)%(r.d||1)===0){if(r.e&&r.e.indexOf(i-t)!==-1)continue;return r}}return null}var E6=z0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),C6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(i=>parseInt(i,16)),I6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],S6=Rl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),R6=Rl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),P6=Rl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",M6),N6=z0("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function D6(i){return i.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function O6(i){return!!Pl(i,E6)}function B6(i){let e=Pl(i,I6);if(e)return[i+e.s];let t=S6[i];if(t)return t;let n=R6[i];if(n)return[i+n[0]];let r=P6[i];return r||null}function F6(i){return!!Pl(i,N6)}function Nl(i){if(i.match(/^[a-z0-9-]*$/i)&&i.length<=59)return i.toLowerCase();let e=Pi(i);e=D6(e.map(n=>{if(C6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let r=B6(n);return r||[n]})),e=Pi(go(e),Jt.NFKC),e.forEach(n=>{if(F6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(O6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=go(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var To=class extends Za{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Te(t))}decode(e){return Yt(super.decode(e))}};var fr=class extends At{constructor(e,t){let n=!1,r=[];e.forEach(s=>{s.dynamic&&(n=!0),r.push(s.type)});let a="tuple("+r.join(",")+")";super("tuple",a,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,r)=>{let a=r.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,r)=>{let a=n.localName;!a||t[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[r]))}),Object.freeze(e)}encode(e,t){return kl(e,this.coders,t)}decode(e){return e.coerce(this.name,Al(e,this.coders))}};var vo=new M(Gn),L6=new RegExp(/^bytes([0-9]*)$/),U6=new RegExp(/^(u?int)([0-9]*)$/),na=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ao(e.name);case"bool":return new uo(e.name);case"string":return new To(e.name);case"bytes":return new lo(e.name);case"array":return new oo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new fr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new yo(e.name)}let t=e.type.match(U6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&vo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new bo(n/8,t[1]==="int",e.name)}if(t=e.type.match(L6),t){let n=parseInt(t[1]);return(n===0||n>32)&&vo.throwArgumentError("invalid bytes length","param",e),new po(n,e.name)}return vo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new yr(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new pr(this._getWordSize())}getDefaultValue(e){let t=e.map(r=>this._getCoder(pt.from(r)));return new fr(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&vo.throwError("types/values length mismatch",M.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(pt.from(s))),r=new fr(n,"_"),a=this._getWriter();return r.encode(a,t),a.data}decode(e,t,n){let r=e.map(s=>this._getCoder(pt.from(s)));return new fr(r,"_").decode(this._getReader(V(t),n))}},es=new na;function sn(i){return ce(Te(i))}var wo="hash/5.7.0";var Dl={};Kr(Dl,{decode:()=>ia,encode:()=>ra});function ia(i){i=atob(i);let e=[];for(let t=0;t0&&Array.isArray(o)?r(o,s-1):t.push(o)})};return r(i,e),t}function j6(i){let e={};for(let t=0;t>--d&1}let b=31,I=Math.pow(2,b),_=I>>>1,v=_>>1,S=I-1,L=0;for(let J=0;J1;){let N=$+le>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,q=1+R-T}let E=n-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(i[o++]<<16|i[o++]<<8|i[o++]);case 2:return E+256+(i[o++]<<8|i[o++]);case 1:return E+i[o++];default:return J-1}})}function q6(i){let e=0;return()=>i[e++]}function J0(i){return q6(V6(i))}function H6(i){return i&1?~i>>1:i>>1}function G6(i,e){let t=Array(i);for(let n=0;ne[s]):t}function $0(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(K6(t,i))}for(;;){let t=i()-1;if(t<0)break;e.push(J6(t,i))}return j6(K0(e))}function W6(i){let e=[];for(;;){let t=i();if(t==0)break;e.push(t)}return e}function Q0(i,e,t){let n=Array(i).fill(void 0).map(()=>[]);for(let r=0;rn[s].push(a));return n}function K6(i,e){let t=1+e(),n=e(),r=W6(e),a=Q0(r.length,1+i,e);return K0(a.map((s,o)=>{let d=s[0],p=s.slice(1);return Array(r[o]).fill(void 0).map((c,b)=>{let I=b*n;return[d+b*t,p.map(_=>_+I)]})}))}function J6(i,e){let t=1+e();return Q0(t,1+i,e).map(r=>[r[0],r.slice(1)])}function Y0(i){let e=ts(i).sort((n,r)=>n-r);return t();function t(){let n=[];for(;;){let p=ts(i,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let r=i(),a=r%3;r=r/3|0;let s=!!(r&1);r>>=1;let o=r==1,d=r==2;return{branches:n,valid:a,fe0f:s,save:o,check:d}}}function X0(){return J0(ia("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var _o=X0(),$6=new Set(ts(_o)),Q6=new Set(ts(_o)),Y6=$0(_o),X6=Y0(_o),Z0=45,ey=95;function ty(i){return Pi(i)}function Z6(i){return i.filter(e=>e!=65039)}function ny(i){for(let e of i.split(".")){let t=ty(e);try{for(let n=t.lastIndexOf(ey)-1;n>=0;n--)if(t[n]!==ey)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Z0&&t[3]===Z0)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return i}function iy(i){return ny(e2(i,Z6))}function e2(i,e){let t=ty(i).reverse(),n=[];for(;t.length;){let r=n2(t);if(r){n.push(...e(r));continue}let a=t.pop();if($6.has(a)){n.push(a);continue}if(Q6.has(a))continue;let s=Y6[a];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return ny(t2(String.fromCodePoint(...n)))}function t2(i){return i.normalize("NFC")}function n2(i,e){var t;let n=X6,r,a,s=[],o=i.length;for(e&&(e.length=0);o;){let d=i[--o];if(n=(t=n.branches.find(p=>p.set.has(d)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)a=d;else if(n.check&&d===a)break;s.push(d),n.fe0f&&(s.push(65039),o>0&&i[o-1]==65039&&o--),n.valid&&(r=s.slice(),n.valid==2&&r.splice(1,1),e&&e.push(...i.slice(o).reverse()),i.length=o)}return r}var i2=new M(wo),ay=new Uint8Array(32);ay.fill(0);function ry(i){if(i.length===0)throw new Error("invalid ENS name; empty component");return i}function Ol(i){let e=Te(iy(i)),t=[];if(i.length===0)return t;let n=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return t.push(ry(e.slice(n))),t}function Bl(i){try{return Ol(i).length!==0}catch{}return!1}function Ni(i){typeof i!="string"&&i2.throwArgumentError("invalid ENS name; not a string","name",i);let e=ay,t=Ol(i);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function ns(i){return W(ye(Ol(i).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var sy=`Ethereum Signed Message: -`;function aa(i){return typeof i=="string"&&(i=Te(i)),ce(ye([Te(sy),Te(String(i.length)),i]))}var r2=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},bt=new M(wo),dy=new Uint8Array(32);dy.fill(0);var a2=F.from(-1),py=F.from(0),yy=F.from(1),s2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function o2(i){let e=V(i),t=e.length%32;return t?kt([e,dy.slice(t)]):W(e)}var u2=me(yy.toHexString(),32),l2=me(py.toHexString(),32),oy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Fl=["name","version","chainId","verifyingContract","salt"];function uy(i){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(i)}`,`domain.${i}`,e),e}}var d2={name:uy("name"),version:uy("version"),chainId:function(i){try{return F.from(i).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",i)},verifyingContract:function(i){try{return fe(i).toLowerCase()}catch{}return bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",i)},salt:function(i){try{let e=V(i);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return bt.throwArgumentError('invalid domain value "salt"',"domain.salt",i)}};function Ll(i){{let e=i.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&bt.throwArgumentError("invalid numeric width","type",i);let r=s2.mask(t?n-1:n),a=t?r.add(yy).mul(a2):py;return function(s){let o=F.from(s);return(o.lt(a)||o.gt(r))&&bt.throwArgumentError(`value out-of-bounds for ${i}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=i.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&bt.throwArgumentError("invalid bytes width","type",i),function(n){return V(n).length!==t&&bt.throwArgumentError(`invalid length for ${i}`,"value",n),o2(n)}}}switch(i){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?u2:l2};case"bytes":return function(e){return ce(e)};case"string":return function(e){return sn(e)}}return null}function ly(i,e){return`${i}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var xt=class{constructor(e){B(this,"types",Object.freeze(ft(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},r={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],r[o]={}});for(let o in e){let d={};e[o].forEach(p=>{d[p.name]&&bt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),d[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Ll(c)&&(n[c]||bt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let a=Object.keys(n).filter(o=>n[o].length===0);a.length===0?bt.throwArgumentError("missing primary type","types",e):a.length>1&&bt.throwArgumentError(`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",a[0]);function s(o,d){d[o]&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),d[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,d),Object.keys(d).forEach(c=>{r[c][p]=!0}))}),delete d[o]}s(this.primaryType,{});for(let o in r){let d=Object.keys(r[o]);d.sort(),this._types[o]=ly(o,e[o])+d.map(p=>ly(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let r=Ll(e);if(r)return r}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let r=t[1],a=this.getEncoder(r),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let d=o.map(a);return this._types[r]&&(d=d.map(ce)),ce(kt(d))}}let n=this.types[e];if(n){let r=sn(this._types[e]);return a=>{let s=n.map(({name:o,type:d})=>{let p=this.getEncoder(d)(a[o]);return this._types[d]?ce(p):p});return s.unshift(r),kt(s)}}return bt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||bt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Ll(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){let s=r[1],o=parseInt(r[3]);return o>=0&&t.length!==o&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(d=>this._visit(s,d,n))}let a=this.types[e];return a?a.reduce((s,{name:o,type:d})=>(s[o]=this._visit(d,t[o],n),s),{}):bt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new xt(e)}static getPrimaryType(e){return xt.from(e).primaryType}static hashStruct(e,t,n){return xt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let r=oy[n];r||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort((n,r)=>Fl.indexOf(n.name)-Fl.indexOf(r.name)),xt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return kt(["0x1901",xt.hashDomain(e),xt.from(t).hash(n)])}static hash(e,t,n){return ce(xt.encode(e,t,n))}static resolveNames(e,t,n,r){return r2(this,void 0,void 0,function*(){e=we(e);let a={};e.verifyingContract&&!re(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");let s=xt.from(t);s.visit(n,(o,d)=>(o==="address"&&!re(d,20)&&(a[d]="0x"),d));for(let o in a)a[o]=yield r(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,d)=>o==="address"&&a[d]?a[d]:d),{domain:e,value:n}})}static getPayload(e,t,n){xt.hashDomain(e);let r={},a=[];Fl.forEach(d=>{let p=e[d];p!=null&&(r[d]=d2[d](p),a.push({name:d,type:oy[d]}))});let s=xt.from(t),o=we(t);return o.EIP712Domain?bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=a,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return W(V(p));if(d.match(/^u?int/))return F.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",d)})}}};var gt=new M(Gn);var sa=class extends rn{},oa=class extends rn{},Ul=class extends rn{},pi=class extends rn{static isIndexed(e){return!!(e&&e._isIndexed)}},p2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function cy(i,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${i}`);return t.error=e,t}var Di=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>Kt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",mt(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let r=null;switch(n.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":r=this.functions;break;case"event":r=this.events;break;case"error":r=this.errors;break;default:return}let a=n.format();if(r[a]){gt.warn("duplicate definition - "+a);return}r[a]=n}),this.deploy||B(this,"deploy",Lt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===xe.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return es}static getAddress(e){return fe(e)}static getSighash(e){return Ce(sn(e.format()),0,4)}static getEventTopic(e){return sn(e.format())}getFunction(e){if(re(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching function","name",n):r.length>1&>.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}let t=this.functions[Ut.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(re(e)){let n=e.toLowerCase();for(let r in this.events)if(n===this.getEventTopic(r))return this.events[r];gt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching event","name",n):r.length>1&>.throwArgumentError("multiple matching events","name",n),this.events[r[0]]}let t=this.events[Wt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(re(e)){let n=mt(this.constructor,"getSighash");for(let r in this.errors){let a=this.errors[r];if(e===n(a))return this.errors[r]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),r=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return r.length===0?gt.throwArgumentError("no matching error","name",n):r.length>1&>.throwArgumentError("multiple matching errors","name",n),this.errors[r[0]]}let t=this.errors[Ut.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t);return W(n.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=V(t),r=null,a="",s=null,o=null,d=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=p2[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,d=c.signature,c.reason&&(r=s[0]),o==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,n.slice(4)),o=b.name,d=b.format()}catch{}break}}return gt.throwError("call revert exception"+a,M.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:d,reason:r})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(a,s)=>a.type==="string"?sn(s):a.type==="bytes"?ce(W(s)):(a.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),a.type.match(/^u?int/)&&(s=F.from(s).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((a,s)=>{let o=e.inputs[s];if(!o.indexed){a!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(d=>r(o,d))):n.push(r(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],r=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let d=t[o];if(s.indexed)if(s.type==="string")n.push(sn(d));else if(s.type==="bytes")n.push(ce(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[d]))}else r.push(s),a.push(d)}),{data:this._abiCoder.encode(r,a),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let I=this.getEventTopic(e);(!re(n[0],32)||n[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:n[0]}),n=n.slice(1)}let r=[],a=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(r.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(r.push(I),s.push(!1)):(a.push(I),s.push(!1))});let o=n!=null?this._abiCoder.decode(r,ye(n)):null,d=this._abiCoder.decode(a,t,!0),p=[],c=0,b=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new pi({_isIndexed:!0,hash:null});else if(s[_])p[_]=new pi({_isIndexed:!0,hash:o[b++]});else try{p[_]=o[b++]}catch(v){p[_]=v}else try{p[_]=d[c++]}catch(v){p[_]=v}if(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw cy(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw cy(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new oa({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new sa({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Ul({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var fy="abstract-provider/5.7.0";var y2=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},c2=new M(fy),ko=class extends rn{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){c2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return y2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,r=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=F.from("1500000000"),r=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:a,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var my="abstract-signer/5.7.0";var Cn=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},fn=new M(my),f2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],m2=[M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED],Pt=class{constructor(){fn.checkAbstract(new.target,Pt),B(this,"_isSigner",!0)}getBalance(e){return Cn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Cn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Cn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ie(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Cn(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Ie(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return Cn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return Cn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Cn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Cn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Cn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)f2.indexOf(n)===-1&&fn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=we(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&fn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return Cn(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(r=>Cn(this,void 0,void 0,function*(){if(r==null)return null;let a=yield this.resolveName(r);return a==null&&fn.throwArgumentError("provided ENS name resolves to null","tx.to",r),a})),t.to.catch(r=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?fn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&fn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let r=yield this.getFeeData();if(t.type==null)if(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let a=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=a,t.maxPriorityFeePerGas=a}else t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas);else r.gasPrice!=null?(n&&fn.throwError("network does not support EIP-1559",M.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=r.gasPrice),t.type=0):fn.throwError("failed to get consistent fee data",M.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=r.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=r.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(r=>{if(m2.indexOf(r.code)>=0)throw r;return fn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(r=>(r[1]!==0&&r[0]!==r[1]&&fn.throwArgumentError("chainId address mismatch","transaction",e),r[0])),yield Ie(t)})}_checkProvider(e){this.provider||fn.throwError("missing provider",M.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},yi=class extends Pt{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{fn.throwError(e,M.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new yi(this.address,e)}};var pe=En(cl()),Xn=En($l());function ma(i,e,t){return t={path:e,exports:{},require:function(n,r){return Lb(n,r??t.path)}},i(t,t.exports),t.exports}function Lb(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Zl=Zy;function Zy(i,e){if(!i)throw new Error(e||"Assertion failed")}Zy.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Pn=ma(function(i,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,I=c&255;b?d.push(b,I):d.push(I)}return d}t.toArray=n;function r(s){return s.length===1?"0"+s:s}t.zero2=r;function a(s){for(var o="",d=0;d(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,b[v]=S,_.iushrn(1)}return b}t.getNAF=n;function r(d,p){var c=[[],[]];d=d.clone(),p=p.clone();for(var b=0,I=0,_;d.cmpn(-b)>0||p.cmpn(-I)>0;){var v=d.andln(3)+b&3,S=p.andln(3)+I&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=d.andln(7)+b&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*b===L+1&&(b=1-b),2*I===O+1&&(I=1-I),d.iushrn(1),p.iushrn(1)}return c}t.getJSF=r;function a(d,p,c){var b="_"+p;d.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=c.call(this)}}t.cachedProperty=a;function s(d){return typeof d=="string"?t.toArray(d,"hex"):d}t.parseBytes=s;function o(d){return new pe.default(d,"hex","le")}t.intFromLE=o}),Io=on.getNAF,Ub=on.getJSF,So=on.assert;function Fi(i,e){this.type=i,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var hr=Fi;Fi.prototype.point=function(){throw new Error("Not implemented")};Fi.prototype.validate=function(){throw new Error("Not implemented")};Fi.prototype._fixedNafMul=function(e,t){So(e.precomputed);var n=e._getDoubles(),r=Io(t,1,this._bitLength),a=(1<=o;p--)d=(d<<1)+r[p];s.push(d)}for(var c=this.jpoint(null,null,null),b=this.jpoint(null,null,null),I=a;I>0;I--){for(o=0;o=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,o=o.dblp(p),d<0)break;var c=s[d];So(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(a[c-1>>1]):o=o.mixedAdd(a[-c-1>>1].neg()):c>0?o=o.add(a[c-1>>1]):o=o.add(a[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Fi.prototype._wnafMulAdd=function(e,t,n,r,a){var s=this._wnafT1,o=this._wnafT2,d=this._wnafT3,p=0,c,b,I;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){d[v]=Io(n[v],s[v],this._bitLength),d[S]=Io(n[S],s[S],this._bitLength),p=Math.max(d[v].length,p),p=Math.max(d[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=Ub(n[v],n[S]);for(p=Math.max(U[0].length,p),d[v]=new Array(p),d[S]=new Array(p),b=0;b=0;c--){for(var le=0;c>=0;){var T=!0;for(b=0;b=0&&le++,J=J.dblp(le),c<0)break;for(b=0;b0?I=o[b][R-1>>1]:R<0&&(I=o[b][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};hn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,a=0;a=0&&(_=p,v=c),b.negative&&(b=b.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:b,b:I},{a:_,b:v}]};bn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],a=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=a.mul(n.a),d=s.mul(r.a),p=a.mul(n.b),c=s.mul(r.b),b=e.sub(o).sub(d),I=p.add(c).neg();return{k1:b,k2:I}};bn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)};bn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};bn.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,a=this._endoWnafT2,s=0;s":""};Ct.prototype.isInfinity=function(){return this.inf};Ct.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};Ct.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Ct.prototype.getX=function(){return this.x.fromRed()};Ct.prototype.getY=function(){return this.y.fromRed()};Ct.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Ct.prototype.mulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a):this.curve._wnafMulAdd(1,r,a,2)};Ct.prototype.jmulAdd=function(e,t,n){var r=[this,t],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,a,!0):this.curve._wnafMulAdd(1,r,a,2,!0)};Ct.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Ct.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(a){return a.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};Ct.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Dt(i,e,t,n){hr.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ed(Dt,hr.BasePoint);bn.prototype.jpoint=function(e,t,n){return new Dt(this,e,t,n)};Dt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};Dt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Dt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),a=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),d=r.redSub(a),p=s.redSub(o);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),b=c.redMul(d),I=r.redMul(c),_=p.redSqr().redIAdd(b).redISub(I).redISub(I),v=p.redMul(I.redISub(_)).redISub(s.redMul(b)),S=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,v,S)};Dt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),a=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),d=a.redSub(s);if(o.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),b=n.redMul(p),I=d.redSqr().redIAdd(c).redISub(b).redISub(b),_=d.redMul(b.redISub(I)).redISub(a.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(I,_,v)};Dt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Dt.prototype.inspect=function(){return this.isInfinity()?"":""};Dt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Eo=ma(function(i,e){"use strict";var t=e;t.base=hr,t.short=Vb,t.mont=null,t.edwards=null}),Co=ma(function(i,e){"use strict";var t=e,n=on.assert;function r(o){o.type==="short"?this.curve=new Eo.short(o):o.type==="edwards"?this.curve=new Eo.edwards(o):this.curve=new Eo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=r;function a(o,d){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new r(d);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Xn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Xn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Xn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Xn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Xn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xn.default.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Xn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Bi(i){if(!(this instanceof Bi))return new Bi(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Pn.toArray(i.entropy,i.entropyEnc||"hex"),t=Pn.toArray(i.nonce,i.nonceEnc||"hex"),n=Pn.toArray(i.pers,i.persEnc||"hex");Zl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var ec=Bi;Bi.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Bi.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(r=n,n=t,t=null),n&&(n=Pn.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length"};var qb=on.assert;function Ro(i,e){if(i instanceof Ro)return i;this._importDER(i,e)||(qb(i.r&&i.s,"Signature without r or s"),this.r=new pe.default(i.r,16),this.s=new pe.default(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var Po=Ro;function Hb(){this.place=0}function Ql(i,e){var t=i[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var r=0,a=0,s=e.place;a>>=0;return r<=127?!1:(e.place=s,r)}function Xy(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}Ro.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Xy(t),n=Xy(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];Yl(r,t.length),r=r.concat(t),r.push(2),Yl(r,n.length);var a=r.concat(n),s=[48];return Yl(s,a.length),s=s.concat(a),on.encode(s,e)};var Gb=function(){throw new Error("unsupported")},tc=on.assert;function mn(i){if(!(this instanceof mn))return new mn(i);typeof i=="string"&&(tc(Object.prototype.hasOwnProperty.call(Co,i),"Unknown curve "+i),i=Co[i]),i instanceof Co.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var zb=mn;mn.prototype.keyPair=function(e){return new td(this,e)};mn.prototype.keyFromPrivate=function(e,t){return td.fromPrivate(this,e,t)};mn.prototype.keyFromPublic=function(e,t){return td.fromPublic(this,e,t)};mn.prototype.genKeyPair=function(e){e||(e={});for(var t=new ec({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Gb(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new pe.default(2));;){var a=new pe.default(t.generate(n));if(!(a.cmp(r)>0))return a.iaddn(1),this.keyFromPrivate(a)}};mn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};mn.prototype.sign=function(e,t,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),o=e.toArray("be",a),d=new ec({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var b=r.k?r.k(c):new pe.default(d.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var I=this.g.mul(b);if(!I.isInfinity()){var _=I.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(I.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return r.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Po({r:v,s:S,recoveryParam:L})}}}}}};mn.prototype.verify=function(e,t,n,r){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,r),t=new Po(t,"hex");var a=t.r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),d=o.mul(e).umod(this.n),p=o.mul(a).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(a)):(c=this.g.mulAdd(d,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(a)===0)};mn.prototype.recoverPubKey=function(i,e,t,n){tc((3&t)===t,"The recovery param is more than two bits"),e=new Po(e,n);var r=this.n,a=new pe.default(i),s=e.r,o=e.s,d=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var c=e.r.invm(r),b=r.sub(a).mul(c).umod(r),I=o.mul(c).umod(r);return this.g.mulAdd(b,s,I)};mn.prototype.getKeyRecoveryParam=function(i,e,t,n){if(e=new Po(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(i,e,r)}catch{continue}if(a.eq(t))return r}throw new Error("Unable to find valid recovery factor")};var Wb=ma(function(i,e){"use strict";var t=e;t.version="6.5.4",t.utils=on,t.rand=function(){throw new Error("unsupported")},t.curve=Eo,t.curves=Co,t.ec=zb,t.eddsa=null}),nc=Wb.ec;var ic="signing-key/5.7.0";var id=new M(ic),nd=null;function Zn(){return nd||(nd=new nc("secp256k1")),nd}var xn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&id.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Zn().keyFromPrivate(V(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Zn().keyFromPublic(V(this.publicKey)),n=Zn().keyFromPublic(V(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Zn().keyFromPrivate(V(this.privateKey)),n=V(e);n.length!==32&&id.throwArgumentError("bad digest length","digest",e);let r=t.sign(n,{canonical:!0});return Hn({recoveryParam:r.recoveryParam,r:me("0x"+r.r.toString(16),32),s:me("0x"+r.s.toString(16),32)})}computeSharedSecret(e){let t=Zn().keyFromPrivate(V(this.privateKey)),n=Zn().keyFromPublic(V(as(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function No(i,e){let t=Hn(e),n={r:V(t.r),s:V(t.s)};return"0x"+Zn().recoverPubKey(V(i),n,t.recoveryParam).encode("hex",!1)}function as(i,e){let t=V(i);if(t.length===32){let n=new xn(t);return e?"0x"+Zn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Zn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Zn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return id.throwArgumentError("invalid public or private key","key","[REDACTED]")}var rc="transactions/5.7.0";var Ht=new M(rc),Do;(function(i){i[i.legacy=0]="legacy",i[i.eip2930=1]="eip2930",i[i.eip1559=2]="eip1559"})(Do||(Do={}));function ad(i){return i==="0x"?null:fe(i)}function qt(i){return i==="0x"?ea:F.from(i)}var Kb=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Jb={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function gn(i){let e=as(i);return fe(Ce(ce(Ce(e,1)),12))}function br(i,e){return gn(No(V(i),e))}function un(i,e){let t=nn(F.from(i).toHexString());return t.length>32&&Ht.throwArgumentError("invalid length for "+e,"transaction:"+e,i),t}function rd(i,e){return{address:fe(i),storageKeys:(e||[]).map((t,n)=>(Ft(t)!==32&&Ht.throwArgumentError("invalid access list storageKey",`accessList[${i}:${n}]`,t),t.toLowerCase()))}}function ln(i){if(Array.isArray(i))return i.map((t,n)=>Array.isArray(t)?(t.length>2&&Ht.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),rd(t[0],t[1])):rd(t.address,t.storageKeys));let e=Object.keys(i).map(t=>{let n=i[t].reduce((r,a)=>(r[a]=!0,r),{});return rd(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function ac(i){return ln(i).map(e=>[e.address,e.storageKeys])}function sc(i,e){if(i.gasPrice!=null){let n=F.from(i.gasPrice),r=F.from(i.maxFeePerGas||0);n.eq(r)||Ht.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}let t=[un(i.chainId||0,"chainId"),un(i.nonce||0,"nonce"),un(i.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(i.maxFeePerGas||0,"maxFeePerGas"),un(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",un(i.value||0,"value"),i.data||"0x",ac(i.accessList||[])];if(e){let n=Hn(e);t.push(un(n.recoveryParam,"recoveryParam")),t.push(nn(n.r)),t.push(nn(n.s))}return kt(["0x02",di(t)])}function oc(i,e){let t=[un(i.chainId||0,"chainId"),un(i.nonce||0,"nonce"),un(i.gasPrice||0,"gasPrice"),un(i.gasLimit||0,"gasLimit"),i.to!=null?fe(i.to):"0x",un(i.value||0,"value"),i.data||"0x",ac(i.accessList||[])];if(e){let n=Hn(e);t.push(un(n.recoveryParam,"recoveryParam")),t.push(nn(n.r)),t.push(nn(n.s))}return kt(["0x01",di(t)])}function $b(i,e){Qr(i,Jb);let t=[];Kb.forEach(function(s){let o=i[s.name]||[],d={};s.numeric&&(d.hexPad="left"),o=V(W(o,d)),s.length&&o.length!==s.length&&o.length>0&&Ht.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=nn(o),o.length>s.maxLength&&Ht.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(i.chainId!=null?(n=i.chainId,typeof n!="number"&&Ht.throwArgumentError("invalid transaction.chainId","transaction",i)):e&&!oi(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return di(t);let r=Hn(e),a=27+r.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),a+=n*2+8,r.v>28&&r.v!==a&&Ht.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&Ht.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(a)),t.push(nn(V(r.r))),t.push(nn(V(r.s))),di(t)}function ss(i,e){if(i.type==null||i.type===0)return i.accessList!=null&&Ht.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",i),$b(i,e);switch(i.type){case 1:return oc(i,e);case 2:return sc(i,e);default:break}return Ht.throwError(`unsupported transaction type: ${i.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:i.type})}function uc(i,e,t){try{let n=qt(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");i.v=n}catch{Ht.throwArgumentError("invalid v for transaction type: 1","v",e[0])}i.r=me(e[1],32),i.s=me(e[2],32);try{let n=ce(t(i));i.from=br(n,{r:i.r,s:i.s,recoveryParam:i.v})}catch{}}function Qb(i){let e=Xa(i.slice(1));e.length!==9&&e.length!==12&&Ht.throwArgumentError("invalid component count for transaction type: 2","payload",W(i));let t=qt(e[2]),n=qt(e[3]),r={type:2,chainId:qt(e[0]).toNumber(),nonce:qt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:qt(e[4]),to:ad(e[5]),value:qt(e[6]),data:e[7],accessList:ln(e[8])};return e.length===9||(r.hash=ce(i),uc(r,e.slice(9),sc)),r}function Yb(i){let e=Xa(i.slice(1));e.length!==8&&e.length!==11&&Ht.throwArgumentError("invalid component count for transaction type: 1","payload",W(i));let t={type:1,chainId:qt(e[0]).toNumber(),nonce:qt(e[1]).toNumber(),gasPrice:qt(e[2]),gasLimit:qt(e[3]),to:ad(e[4]),value:qt(e[5]),data:e[6],accessList:ln(e[7])};return e.length===8||(t.hash=ce(i),uc(t,e.slice(8),oc)),t}function Xb(i){let e=Xa(i);e.length!==9&&e.length!==6&&Ht.throwArgumentError("invalid raw transaction","rawTransaction",i);let t={nonce:qt(e[0]).toNumber(),gasPrice:qt(e[1]),gasLimit:qt(e[2]),to:ad(e[3]),value:qt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,r=e.slice(0,6);t.chainId!==0&&(r.push(W(t.chainId)),r.push("0x"),r.push("0x"),n-=t.chainId*2+8);let a=ce(di(r));try{t.from=br(a,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(i)}return t.type=null,t}function Oo(i){let e=V(i);if(e[0]>127)return Xb(e);switch(e[0]){case 1:return Yb(e);case 2:return Qb(e);default:break}return Ht.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var lc="contracts/5.7.0";var Li=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Se=new M(lc),Zb={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Bo(i,e){return Li(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Se.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}i||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield i.resolveName(t);return n==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function os(i,e,t){return Li(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,r)=>os(i,Array.isArray(e)?e[r]:e[n.name],n))):t.type==="address"?yield Bo(i,e):t.type==="tuple"?yield os(i,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>os(i,n,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Uo(i,e,t){return Li(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),i.signer?n.from?n.from=Ie({override:Bo(i.signer,n.from),signer:i.signer.getAddress()}).then(p=>Li(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Se.throwError("Contract with a Signer cannot override from",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=i.signer.getAddress():n.from&&(n.from=Bo(i.provider,n.from));let r=yield Ie({args:os(i.signer||i.provider,t,e.inputs),address:i.resolvedAddress,overrides:Ie(n)||{}}),a=i.interface.encodeFunctionData(e,r.args),s={data:a,to:r.address},o=r.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=ln(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=V(a);for(let b=0;bn[p]!=null);return d.length&&Se.throwError(`cannot override ${d.map(p=>JSON.stringify(p)).join(",")}`,M.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),s})}function e5(i,e){return function(...t){return Uo(i,e,t)}}function t5(i,e){let t=i.signer||i.provider;return function(...n){return Li(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",M.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let r=yield Uo(i,e,n);return yield t.estimateGas(r)})}}function pc(i,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(r=>(r.events=r.logs.map(a=>{let s=ft(a),o=null;try{o=i.interface.parseLog(a)}catch{}return o&&(s.args=o.args,s.decode=(d,p)=>i.interface.decodeEventLog(o.eventFragment,d,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>i.provider,s.getBlock=()=>i.provider.getBlock(r.blockHash),s.getTransaction=()=>i.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(r),s}),r))}function yc(i,e,t){let n=i.signer||i.provider;return function(...r){return Li(this,void 0,void 0,function*(){let a;if(r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"){let d=we(r.pop());d.blockTag!=null&&(a=yield d.blockTag),delete d.blockTag,r.push(d)}i.deployTransaction!=null&&(yield i._deployed(a));let s=yield Uo(i,e,r),o=yield n.call(s,a);try{let d=i.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(d=d[0]),d}catch(d){throw d.code===M.errors.CALL_EXCEPTION&&(d.address=i.address,d.args=r,d.transaction=s),d}})}}function n5(i,e){return function(...t){return Li(this,void 0,void 0,function*(){i.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),i.deployTransaction!=null&&(yield i._deployed());let n=yield Uo(i,e,t),r=yield i.signer.sendTransaction(n);return pc(i,r),r})}}function dc(i,e,t){return e.constant?yc(i,e,t):n5(i,e)}function cc(i){return i.address&&(i.topics==null||i.topics.length===0)?"*":(i.address||"*")+"@"+(i.topics?i.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var xr=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let r=e.slice();return setTimeout(()=>{n.listener.apply(this,r)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},sd=class extends xr{constructor(){super("error",null)}},Fo=class extends xr{constructor(e,t,n,r){let a={address:e},s=t.getEventTopic(n);r?(s!==r[0]&&Se.throwArgumentError("topic mismatch","topics",r),a.topics=r.slice()):a.topics=[s],super(cc(a),a),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Xr(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Lo=class extends xr{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,r)=>this.interface.decodeEventLog(t.eventFragment,n,r),e.args=t.args}catch{}}},ha=class{constructor(e,t,n){B(this,"interface",mt(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):Pt.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):Xt.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let d=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(d,p)})),s[d.name]||(s[d.name]=[]),s[d.name].push(o)}),Object.keys(s).forEach(o=>{let d=s[o];d.length===1?B(this.filters,o,this.filters[d[0]]):Se.warn(`Duplicate definition of ${o} (${d.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Bo(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Se.throwError("provider is required to use ENS name as contract address",M.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let r={},a={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(a[s]){Se.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}a[s]=!0;{let d=o.name;r[`%${d}`]||(r[`%${d}`]=[]),r[`%${d}`].push(s)}this[s]==null&&B(this,s,dc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,dc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,e5(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,t5(this,o))}),Object.keys(r).forEach(s=>{let o=r[s];if(o.length>1)return;s=s.substring(1);let d=o[0];try{this[s]==null&&B(this,s,this[d])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[d]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[d]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[d]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[d])})}static getContractAddress(e){return cr(e)}static getInterface(e){return Di.isInterface(e)?e:new Di(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Se.throwError("contract not deployed",M.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=we(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new yi(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return pi.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new sd);if(e==="event")return this._normalizeRunningEvent(new xr("event",null));if(e==="*")return this._normalizeRunningEvent(new Lo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Fo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Fo(this.address,this.interface,r,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new xr(cc(t),t))}return this._normalizeRunningEvent(new Lo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let r=ft(t);return r.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Se.throwError("events require a provider or a signer with a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=a=>{let s=this._wrapEvent(e,a,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=r,e.filter!=null&&this.provider.on(e.filter,r)}}queryFilter(e,t,n){let r=this._getRunningEvent(e),a=we(r.filter);return typeof t=="string"&&re(t,32)?(n!=null&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=t):(a.fromBlock=t??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(s=>s.map(o=>this._wrapEvent(r,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(r=>{t.push(r)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let r=this._runningEvents[n];r.removeAllListeners(),this._checkRunningEvents(r)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends ha{},gr=class{constructor(e,t,n){let r=null;typeof t=="string"?r=t:pn(t)?r=W(t):t&&typeof t.object=="string"?r=t.object:r="!",r.substring(0,2)!=="0x"&&(r="0x"+r),(!re(r)||r.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),n&&!Pt.isSigner(n)&&Se.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",r),B(this,"interface",mt(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=we(e.pop());for(let n in t)if(!Zb[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Se.throwError("cannot override "+n,M.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Se.throwError("non-payable constructor cannot override value",M.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Li(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield os(this.signer,e,this.interface.deploy.inputs);n.push(t);let r=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(r),s=mt(this.constructor,"getContractAddress")(a),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return pc(o,a),B(o,"deployTransaction",a),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Se.throwError("missing compiler output",M.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return cr(e)}static getContract(e,t,n){return new oe(e,t,n)}};var jo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let r="";for(let a=0;t[a]===0&&a=0;--a)r+=this.alphabet[n[a]];return r}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;a>0;)t.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=b>>16&255,d[e.length+2]=b>>8&255,d[e.length+3]=b&255;let I=V(bi(r,i,d));a||(a=I.length,c=new Uint8Array(a),s=Math.ceil(n/a),p=n-(s-1)*a),c.set(I);for(let S=1;S{var r6=Object.create;var Ys=Object.defineProperty;var s6=Object.getOwnPropertyDescriptor;var o6=Object.getOwnPropertyNames;var u6=Object.getPrototypeOf,d6=Object.prototype.hasOwnProperty;var l6=(a,e,t)=>e in a?Ys(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var ae=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),Ki=(a,e)=>{for(var t in e)Ys(a,t,{get:e[t],enumerable:!0})},p6=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o6(e))!d6.call(a,i)&&i!==t&&Ys(a,i,{get:()=>e[i],enumerable:!(n=s6(e,i))||n.enumerable});return a};var Mn=(a,e,t)=>(t=a!=null?r6(u6(a)):{},p6(e||!a||!a.__esModule?Ys(t,"default",{value:a,enumerable:!0}):t,a));var xe=(a,e,t)=>(l6(a,typeof e!="symbol"?e+"":e,t),t);var Qp=ae(()=>{});var cd=ae((Yp,yd)=>{(function(a,e){"use strict";function t(I,u){if(!I)throw new Error(u||"Assertion failed")}function n(I,u){I.super_=u;var y=function(){};y.prototype=u.prototype,I.prototype=new y,I.prototype.constructor=I}function i(I,u,y){if(i.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(I||0,u||10,y||"be"))}typeof a=="object"?a.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Qp().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,b){if(typeof u=="number")return this._initNumber(u,y,b);if(typeof u=="object")return this._initArray(u,y,b);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var w=0;u[0]==="-"&&(w++,this.negative=1),w=0;w-=3)h=u[w]|u[w-1]<<8|u[w-2]<<16,this.words[A]|=h<>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(b==="le")for(w=0,A=0;w>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()};function s(I,u){var y=I.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+I)}function o(I,u,y){var b=s(I,y);return y-1>=u&&(b|=s(I,y-1)<<4),b}i.prototype._parseHex=function(u,y,b){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var w=0;w=y;w-=2)k=o(u,y,w)<=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8;else{var g=u.length-y;for(w=g%2===0?y+1:y;w=18?(A-=18,h+=1,this.words[h]|=k>>>26):A+=8}this._strip()};function l(I,u,y,b){for(var w=0,A=0,h=Math.min(I.length,y),k=u;k=49?A=g-49+10:g>=17?A=g-17+10:A=g,t(g>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch{i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?""}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var b;if(u===16||u==="hex"){b="";for(var w=0,A=0,h=0;h>>24-w&16777215,w+=2,w>=26&&(w-=26,h--),A!==0||h!==this.length-1?b=x[6-g.length]+g+b:b=g+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(u===(u|0)&&u>=2&&u<=36){var d=C[u],m=_[u];b="";var z=this.clone();for(z.negative=0;!z.isZero();){var f=z.modrn(m).toString(u);z=z.idivn(m),z.isZero()?b=f+b:b=x[d-f.length]+f+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,b){this._strip();var w=this.byteLength(),A=b||Math.max(1,w);t(w<=A,"byte array longer than desired length"),t(A>0,"Requested array length <= 0");var h=v(u,A),k=y==="le"?"LE":"BE";return this["_toArrayLike"+k](h,w),h},i.prototype._toArrayLikeLE=function(u,y){for(var b=0,w=0,A=0,h=0;A>8&255),b>16&255),h===6?(b>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b=0&&(u[b--]=k>>8&255),b>=0&&(u[b--]=k>>16&255),h===6?(b>=0&&(u[b--]=k>>24&255),w=0,h=0):(w=k>>>24,h+=2)}if(b>=0)for(u[b--]=w;b>=0;)u[b--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function S(I){for(var u=new Array(I.bitLength()),y=0;y>>w&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var b=0;bu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,b;this.length>u.length?(y=this,b=u):(y=u,b=this);for(var w=0;wu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,b=u%26;this._expand(y),b>0&&y--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-b),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var b=u/26|0,w=u%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<u.length?(b=this,w=u):(b=u,w=this);for(var A=0,h=0;h>>26;for(;A!==0&&h>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var b=this.cmp(u);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,A;b>0?(w=this,A=u):(w=u,A=this);for(var h=0,k=0;k>26,this.words[k]=y&67108863;for(;h!==0&&k>26,this.words[k]=y&67108863;if(h===0&&k>>26,z=g&67108863,f=Math.min(d,u.length-1),P=Math.max(0,d-I.length+1);P<=f;P++){var D=d-P|0;w=I.words[D]|0,A=u.words[P]|0,h=w*A+z,m+=h/67108864|0,z=h&67108863}y.words[d]=z|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var O=function(u,y,b){var w=u.words,A=y.words,h=b.words,k=0,g,d,m,z=w[0]|0,f=z&8191,P=z>>>13,D=w[1]|0,V=D&8191,K=D>>>13,ee=w[2]|0,Y=ee&8191,Q=ee>>>13,ct=w[3]|0,Z=ct&8191,le=ct>>>13,Ka=w[4]|0,De=Ka&8191,Oe=Ka>>>13,Ja=w[5]|0,Be=Ja&8191,Fe=Ja>>>13,$a=w[6]|0,Le=$a&8191,Ue=$a>>>13,Qa=w[7]|0,Ve=Qa&8191,je=Qa>>>13,Ya=w[8]|0,He=Ya&8191,qe=Ya>>>13,Xa=w[9]|0,ze=Xa&8191,Ge=Xa>>>13,Za=A[0]|0,We=Za&8191,Ke=Za>>>13,ei=A[1]|0,Je=ei&8191,$e=ei>>>13,ti=A[2]|0,Qe=ti&8191,Ye=ti>>>13,ni=A[3]|0,Xe=ni&8191,Ze=ni>>>13,ai=A[4]|0,et=ai&8191,tt=ai>>>13,ii=A[5]|0,nt=ii&8191,at=ii>>>13,ri=A[6]|0,it=ri&8191,rt=ri>>>13,si=A[7]|0,st=si&8191,ot=si>>>13,oi=A[8]|0,ut=oi&8191,dt=oi>>>13,ui=A[9]|0,lt=ui&8191,pt=ui>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(f,We),d=Math.imul(f,Ke),d=d+Math.imul(P,We)|0,m=Math.imul(P,Ke);var Ea=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,g=Math.imul(V,We),d=Math.imul(V,Ke),d=d+Math.imul(K,We)|0,m=Math.imul(K,Ke),g=g+Math.imul(f,Je)|0,d=d+Math.imul(f,$e)|0,d=d+Math.imul(P,Je)|0,m=m+Math.imul(P,$e)|0;var Ma=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,g=Math.imul(Y,We),d=Math.imul(Y,Ke),d=d+Math.imul(Q,We)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,Je)|0,d=d+Math.imul(V,$e)|0,d=d+Math.imul(K,Je)|0,m=m+Math.imul(K,$e)|0,g=g+Math.imul(f,Qe)|0,d=d+Math.imul(f,Ye)|0,d=d+Math.imul(P,Qe)|0,m=m+Math.imul(P,Ye)|0;var Ia=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,g=Math.imul(Z,We),d=Math.imul(Z,Ke),d=d+Math.imul(le,We)|0,m=Math.imul(le,Ke),g=g+Math.imul(Y,Je)|0,d=d+Math.imul(Y,$e)|0,d=d+Math.imul(Q,Je)|0,m=m+Math.imul(Q,$e)|0,g=g+Math.imul(V,Qe)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(K,Qe)|0,m=m+Math.imul(K,Ye)|0,g=g+Math.imul(f,Xe)|0,d=d+Math.imul(f,Ze)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ze)|0;var Ca=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,g=Math.imul(De,We),d=Math.imul(De,Ke),d=d+Math.imul(Oe,We)|0,m=Math.imul(Oe,Ke),g=g+Math.imul(Z,Je)|0,d=d+Math.imul(Z,$e)|0,d=d+Math.imul(le,Je)|0,m=m+Math.imul(le,$e)|0,g=g+Math.imul(Y,Qe)|0,d=d+Math.imul(Y,Ye)|0,d=d+Math.imul(Q,Qe)|0,m=m+Math.imul(Q,Ye)|0,g=g+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ze)|0,d=d+Math.imul(K,Xe)|0,m=m+Math.imul(K,Ze)|0,g=g+Math.imul(f,et)|0,d=d+Math.imul(f,tt)|0,d=d+Math.imul(P,et)|0,m=m+Math.imul(P,tt)|0;var Sa=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Sa>>>26)|0,Sa&=67108863,g=Math.imul(Be,We),d=Math.imul(Be,Ke),d=d+Math.imul(Fe,We)|0,m=Math.imul(Fe,Ke),g=g+Math.imul(De,Je)|0,d=d+Math.imul(De,$e)|0,d=d+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Z,Qe)|0,d=d+Math.imul(Z,Ye)|0,d=d+Math.imul(le,Qe)|0,m=m+Math.imul(le,Ye)|0,g=g+Math.imul(Y,Xe)|0,d=d+Math.imul(Y,Ze)|0,d=d+Math.imul(Q,Xe)|0,m=m+Math.imul(Q,Ze)|0,g=g+Math.imul(V,et)|0,d=d+Math.imul(V,tt)|0,d=d+Math.imul(K,et)|0,m=m+Math.imul(K,tt)|0,g=g+Math.imul(f,nt)|0,d=d+Math.imul(f,at)|0,d=d+Math.imul(P,nt)|0,m=m+Math.imul(P,at)|0;var Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(Le,We),d=Math.imul(Le,Ke),d=d+Math.imul(Ue,We)|0,m=Math.imul(Ue,Ke),g=g+Math.imul(Be,Je)|0,d=d+Math.imul(Be,$e)|0,d=d+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,d=d+Math.imul(De,Ye)|0,d=d+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Ye)|0,g=g+Math.imul(Z,Xe)|0,d=d+Math.imul(Z,Ze)|0,d=d+Math.imul(le,Xe)|0,m=m+Math.imul(le,Ze)|0,g=g+Math.imul(Y,et)|0,d=d+Math.imul(Y,tt)|0,d=d+Math.imul(Q,et)|0,m=m+Math.imul(Q,tt)|0,g=g+Math.imul(V,nt)|0,d=d+Math.imul(V,at)|0,d=d+Math.imul(K,nt)|0,m=m+Math.imul(K,at)|0,g=g+Math.imul(f,it)|0,d=d+Math.imul(f,rt)|0,d=d+Math.imul(P,it)|0,m=m+Math.imul(P,rt)|0;var Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=67108863,g=Math.imul(Ve,We),d=Math.imul(Ve,Ke),d=d+Math.imul(je,We)|0,m=Math.imul(je,Ke),g=g+Math.imul(Le,Je)|0,d=d+Math.imul(Le,$e)|0,d=d+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,d=d+Math.imul(Be,Ye)|0,d=d+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Ye)|0,g=g+Math.imul(De,Xe)|0,d=d+Math.imul(De,Ze)|0,d=d+Math.imul(Oe,Xe)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Z,et)|0,d=d+Math.imul(Z,tt)|0,d=d+Math.imul(le,et)|0,m=m+Math.imul(le,tt)|0,g=g+Math.imul(Y,nt)|0,d=d+Math.imul(Y,at)|0,d=d+Math.imul(Q,nt)|0,m=m+Math.imul(Q,at)|0,g=g+Math.imul(V,it)|0,d=d+Math.imul(V,rt)|0,d=d+Math.imul(K,it)|0,m=m+Math.imul(K,rt)|0,g=g+Math.imul(f,st)|0,d=d+Math.imul(f,ot)|0,d=d+Math.imul(P,st)|0,m=m+Math.imul(P,ot)|0;var ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(He,We),d=Math.imul(He,Ke),d=d+Math.imul(qe,We)|0,m=Math.imul(qe,Ke),g=g+Math.imul(Ve,Je)|0,d=d+Math.imul(Ve,$e)|0,d=d+Math.imul(je,Je)|0,m=m+Math.imul(je,$e)|0,g=g+Math.imul(Le,Qe)|0,d=d+Math.imul(Le,Ye)|0,d=d+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Ye)|0,g=g+Math.imul(Be,Xe)|0,d=d+Math.imul(Be,Ze)|0,d=d+Math.imul(Fe,Xe)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,d=d+Math.imul(De,tt)|0,d=d+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Z,nt)|0,d=d+Math.imul(Z,at)|0,d=d+Math.imul(le,nt)|0,m=m+Math.imul(le,at)|0,g=g+Math.imul(Y,it)|0,d=d+Math.imul(Y,rt)|0,d=d+Math.imul(Q,it)|0,m=m+Math.imul(Q,rt)|0,g=g+Math.imul(V,st)|0,d=d+Math.imul(V,ot)|0,d=d+Math.imul(K,st)|0,m=m+Math.imul(K,ot)|0,g=g+Math.imul(f,ut)|0,d=d+Math.imul(f,dt)|0,d=d+Math.imul(P,ut)|0,m=m+Math.imul(P,dt)|0;var td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(ze,We),d=Math.imul(ze,Ke),d=d+Math.imul(Ge,We)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(He,Je)|0,d=d+Math.imul(He,$e)|0,d=d+Math.imul(qe,Je)|0,m=m+Math.imul(qe,$e)|0,g=g+Math.imul(Ve,Qe)|0,d=d+Math.imul(Ve,Ye)|0,d=d+Math.imul(je,Qe)|0,m=m+Math.imul(je,Ye)|0,g=g+Math.imul(Le,Xe)|0,d=d+Math.imul(Le,Ze)|0,d=d+Math.imul(Ue,Xe)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,d=d+Math.imul(Be,tt)|0,d=d+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,d=d+Math.imul(De,at)|0,d=d+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Z,it)|0,d=d+Math.imul(Z,rt)|0,d=d+Math.imul(le,it)|0,m=m+Math.imul(le,rt)|0,g=g+Math.imul(Y,st)|0,d=d+Math.imul(Y,ot)|0,d=d+Math.imul(Q,st)|0,m=m+Math.imul(Q,ot)|0,g=g+Math.imul(V,ut)|0,d=d+Math.imul(V,dt)|0,d=d+Math.imul(K,ut)|0,m=m+Math.imul(K,dt)|0,g=g+Math.imul(f,lt)|0,d=d+Math.imul(f,pt)|0,d=d+Math.imul(P,lt)|0,m=m+Math.imul(P,pt)|0;var nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(ze,Je),d=Math.imul(ze,$e),d=d+Math.imul(Ge,Je)|0,m=Math.imul(Ge,$e),g=g+Math.imul(He,Qe)|0,d=d+Math.imul(He,Ye)|0,d=d+Math.imul(qe,Qe)|0,m=m+Math.imul(qe,Ye)|0,g=g+Math.imul(Ve,Xe)|0,d=d+Math.imul(Ve,Ze)|0,d=d+Math.imul(je,Xe)|0,m=m+Math.imul(je,Ze)|0,g=g+Math.imul(Le,et)|0,d=d+Math.imul(Le,tt)|0,d=d+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,it)|0,d=d+Math.imul(De,rt)|0,d=d+Math.imul(Oe,it)|0,m=m+Math.imul(Oe,rt)|0,g=g+Math.imul(Z,st)|0,d=d+Math.imul(Z,ot)|0,d=d+Math.imul(le,st)|0,m=m+Math.imul(le,ot)|0,g=g+Math.imul(Y,ut)|0,d=d+Math.imul(Y,dt)|0,d=d+Math.imul(Q,ut)|0,m=m+Math.imul(Q,dt)|0,g=g+Math.imul(V,lt)|0,d=d+Math.imul(V,pt)|0,d=d+Math.imul(K,lt)|0,m=m+Math.imul(K,pt)|0;var ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(ze,Qe),d=Math.imul(ze,Ye),d=d+Math.imul(Ge,Qe)|0,m=Math.imul(Ge,Ye),g=g+Math.imul(He,Xe)|0,d=d+Math.imul(He,Ze)|0,d=d+Math.imul(qe,Xe)|0,m=m+Math.imul(qe,Ze)|0,g=g+Math.imul(Ve,et)|0,d=d+Math.imul(Ve,tt)|0,d=d+Math.imul(je,et)|0,m=m+Math.imul(je,tt)|0,g=g+Math.imul(Le,nt)|0,d=d+Math.imul(Le,at)|0,d=d+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,it)|0,d=d+Math.imul(Be,rt)|0,d=d+Math.imul(Fe,it)|0,m=m+Math.imul(Fe,rt)|0,g=g+Math.imul(De,st)|0,d=d+Math.imul(De,ot)|0,d=d+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Z,ut)|0,d=d+Math.imul(Z,dt)|0,d=d+Math.imul(le,ut)|0,m=m+Math.imul(le,dt)|0,g=g+Math.imul(Y,lt)|0,d=d+Math.imul(Y,pt)|0,d=d+Math.imul(Q,lt)|0,m=m+Math.imul(Q,pt)|0;var id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(ze,Xe),d=Math.imul(ze,Ze),d=d+Math.imul(Ge,Xe)|0,m=Math.imul(Ge,Ze),g=g+Math.imul(He,et)|0,d=d+Math.imul(He,tt)|0,d=d+Math.imul(qe,et)|0,m=m+Math.imul(qe,tt)|0,g=g+Math.imul(Ve,nt)|0,d=d+Math.imul(Ve,at)|0,d=d+Math.imul(je,nt)|0,m=m+Math.imul(je,at)|0,g=g+Math.imul(Le,it)|0,d=d+Math.imul(Le,rt)|0,d=d+Math.imul(Ue,it)|0,m=m+Math.imul(Ue,rt)|0,g=g+Math.imul(Be,st)|0,d=d+Math.imul(Be,ot)|0,d=d+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,d=d+Math.imul(De,dt)|0,d=d+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,dt)|0,g=g+Math.imul(Z,lt)|0,d=d+Math.imul(Z,pt)|0,d=d+Math.imul(le,lt)|0,m=m+Math.imul(le,pt)|0;var rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(ze,et),d=Math.imul(ze,tt),d=d+Math.imul(Ge,et)|0,m=Math.imul(Ge,tt),g=g+Math.imul(He,nt)|0,d=d+Math.imul(He,at)|0,d=d+Math.imul(qe,nt)|0,m=m+Math.imul(qe,at)|0,g=g+Math.imul(Ve,it)|0,d=d+Math.imul(Ve,rt)|0,d=d+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Le,st)|0,d=d+Math.imul(Le,ot)|0,d=d+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,d=d+Math.imul(Be,dt)|0,d=d+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,dt)|0,g=g+Math.imul(De,lt)|0,d=d+Math.imul(De,pt)|0,d=d+Math.imul(Oe,lt)|0,m=m+Math.imul(Oe,pt)|0;var sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(ze,nt),d=Math.imul(ze,at),d=d+Math.imul(Ge,nt)|0,m=Math.imul(Ge,at),g=g+Math.imul(He,it)|0,d=d+Math.imul(He,rt)|0,d=d+Math.imul(qe,it)|0,m=m+Math.imul(qe,rt)|0,g=g+Math.imul(Ve,st)|0,d=d+Math.imul(Ve,ot)|0,d=d+Math.imul(je,st)|0,m=m+Math.imul(je,ot)|0,g=g+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,dt)|0,g=g+Math.imul(Be,lt)|0,d=d+Math.imul(Be,pt)|0,d=d+Math.imul(Fe,lt)|0,m=m+Math.imul(Fe,pt)|0;var od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=67108863,g=Math.imul(ze,it),d=Math.imul(ze,rt),d=d+Math.imul(Ge,it)|0,m=Math.imul(Ge,rt),g=g+Math.imul(He,st)|0,d=d+Math.imul(He,ot)|0,d=d+Math.imul(qe,st)|0,m=m+Math.imul(qe,ot)|0,g=g+Math.imul(Ve,ut)|0,d=d+Math.imul(Ve,dt)|0,d=d+Math.imul(je,ut)|0,m=m+Math.imul(je,dt)|0,g=g+Math.imul(Le,lt)|0,d=d+Math.imul(Le,pt)|0,d=d+Math.imul(Ue,lt)|0,m=m+Math.imul(Ue,pt)|0;var ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=67108863,g=Math.imul(ze,st),d=Math.imul(ze,ot),d=d+Math.imul(Ge,st)|0,m=Math.imul(Ge,ot),g=g+Math.imul(He,ut)|0,d=d+Math.imul(He,dt)|0,d=d+Math.imul(qe,ut)|0,m=m+Math.imul(qe,dt)|0,g=g+Math.imul(Ve,lt)|0,d=d+Math.imul(Ve,pt)|0,d=d+Math.imul(je,lt)|0,m=m+Math.imul(je,pt)|0;var dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=67108863,g=Math.imul(ze,ut),d=Math.imul(ze,dt),d=d+Math.imul(Ge,ut)|0,m=Math.imul(Ge,dt),g=g+Math.imul(He,lt)|0,d=d+Math.imul(He,pt)|0,d=d+Math.imul(qe,lt)|0,m=m+Math.imul(qe,pt)|0;var ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,g=Math.imul(ze,lt),d=Math.imul(ze,pt),d=d+Math.imul(Ge,lt)|0,m=Math.imul(Ge,pt);var pd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=67108863,h[0]=Ea,h[1]=Ma,h[2]=Ia,h[3]=Ca,h[4]=Sa,h[5]=Xu,h[6]=Zu,h[7]=ed,h[8]=td,h[9]=nd,h[10]=ad,h[11]=id,h[12]=rd,h[13]=sd,h[14]=od,h[15]=ud,h[16]=dd,h[17]=ld,h[18]=pd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(I,u,y){y.negative=u.negative^I.negative,y.length=I.length+u.length;for(var b=0,w=0,A=0;A>>26)|0,w+=h>>>26,h&=67108863}y.words[A]=k,b=h,h=w}return b!==0?y.words[A]=b:y.length--,y._strip()}function H(I,u,y){return U(I,u,y)}i.prototype.mulTo=function(u,y){var b,w=this.length+u.length;return this.length===10&&u.length===10?b=O(this,u,y):w<63?b=L(this,u,y):w<1024?b=U(this,u,y):b=H(this,u,y),b};function M(I,u){this.x=I,this.y=u}M.prototype.makeRBT=function(u){for(var y=new Array(u),b=i.prototype._countBits(u)-1,w=0;w>=1;return w},M.prototype.permute=function(u,y,b,w,A,h){for(var k=0;k>>1)A++;return 1<>>13,b[2*h+1]=A&8191,A=A>>>13;for(h=2*y;h>=26,b+=A/67108864|0,b+=h>>>26,this.words[w]=h&67108863}return b!==0&&(this.words[w]=b,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=S(u);if(y.length===0)return new i(1);for(var b=this,w=0;w=0);var y=u%26,b=(u-y)/26,w=67108863>>>26-y<<26-y,A;if(y!==0){var h=0;for(A=0;A>>26-y}h&&(this.words[A]=h,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A=0);var w;y?w=(y-y%26)/26:w=0;var A=u%26,h=Math.min((u-A)/26,this.length),k=67108863^67108863>>>A<h)for(this.length-=h,d=0;d=0&&(m!==0||d>=w);d--){var z=this.words[d]|0;this.words[d]=m<<26-A|z>>>A,m=z&k}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,b){return t(this.negative===0),this.iushrn(u,y,b)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,b=(u-y)/26,w=1<=0);var y=u%26,b=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var w=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[A+b]=h&67108863}for(;A>26,this.words[A+b]=h&67108863;if(k===0)return this._strip();for(t(k===-1),k=0,A=0;A>26,this.words[A]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var b=this.length-u.length,w=this.clone(),A=u,h=A.words[A.length-1]|0,k=this._countBits(h);b=26-k,b!==0&&(A=A.ushln(b),w.iushln(b),h=A.words[A.length-1]|0);var g=w.length-A.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;f--){var P=(w.words[A.length+f]|0)*67108864+(w.words[A.length+f-1]|0);for(P=Math.min(P/h|0,67108863),w._ishlnsubmul(A,P,f);w.negative!==0;)P--,w.negative=0,w._ishlnsubmul(A,1,f),w.isZero()||(w.negative^=1);d&&(d.words[f]=P)}return d&&d._strip(),w._strip(),y!=="div"&&b!==0&&w.iushrn(b),{div:d||null,mod:w}},i.prototype.divmod=function(u,y,b){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,A,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(w=h.div.neg()),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.iadd(u)),{div:w,mod:A}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(w=h.div.neg()),{div:w,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(A=h.mod.neg(),b&&A.negative!==0&&A.isub(u)),{div:h.div,mod:A}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var b=y.div.negative!==0?y.mod.isub(u):y.mod,w=u.ushrn(1),A=u.andln(1),h=b.cmp(w);return h<0||A===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=(1<<26)%u,w=0,A=this.length-1;A>=0;A--)w=(b*w+(this.words[A]|0))%u;return y?-w:w},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var b=0,w=this.length-1;w>=0;w--){var A=(this.words[w]|0)+b*67108864;this.words[w]=A/u|0,b=A%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=new i(0),k=new i(1),g=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++g;for(var d=b.clone(),m=y.clone();!y.isZero();){for(var z=0,f=1;(y.words[0]&f)===0&&z<26;++z,f<<=1);if(z>0)for(y.iushrn(z);z-- >0;)(w.isOdd()||A.isOdd())&&(w.iadd(d),A.isub(m)),w.iushrn(1),A.iushrn(1);for(var P=0,D=1;(b.words[0]&D)===0&&P<26;++P,D<<=1);if(P>0)for(b.iushrn(P);P-- >0;)(h.isOdd()||k.isOdd())&&(h.iadd(d),k.isub(m)),h.iushrn(1),k.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(h),A.isub(k)):(b.isub(y),h.isub(w),k.isub(A))}return{a:h,b:k,gcd:b.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,b=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var w=new i(1),A=new i(0),h=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var k=0,g=1;(y.words[0]&g)===0&&k<26;++k,g<<=1);if(k>0)for(y.iushrn(k);k-- >0;)w.isOdd()&&w.iadd(h),w.iushrn(1);for(var d=0,m=1;(b.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(b.iushrn(d);d-- >0;)A.isOdd()&&A.iadd(h),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),w.isub(A)):(b.isub(y),A.isub(w))}var z;return y.cmpn(1)===0?z=w:z=A,z.cmpn(0)<0&&z.iadd(u),z},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),b=u.clone();y.negative=0,b.negative=0;for(var w=0;y.isEven()&&b.isEven();w++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var h=y;y=b,b=h}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(w)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,b=(u-y)/26,w=1<>>26,k&=67108863,this.words[h]=k}return A!==0&&(this.words[h]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var b;if(this.length>1)b=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var w=this.words[0]|0;b=w===u?0:wu.length)return 1;if(this.length=0;b--){var w=this.words[b]|0,A=u.words[b]|0;if(w!==A){wA&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new q(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var J={k256:null,p224:null,p192:null,p25519:null};function $(I,u){this.name=I,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},$.prototype.ireduce=function(u){var y=u,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var w=b0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(u,y){u.iushrn(this.n,0,y)},$.prototype.imulK=function(u){return u.imul(this.k)};function de(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(de,$),de.prototype.split=function(u,y){for(var b=4194303,w=Math.min(u.length,9),A=0;A>>22,h=k}h>>>=22,u.words[A-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},de.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,b=0;b>>=26,u.words[b]=A,y=w}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(J[u])return J[u];var y;if(u==="k256")y=new de;else if(u==="p224")y=new T;else if(u==="p192")y=new R;else if(u==="p25519")y=new N;else throw new Error("Unknown prime "+u);return J[u]=y,y};function q(I){if(typeof I=="string"){var u=i._prime(I);this.m=u.p,this.prime=u}else t(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}q.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},q.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},q.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},q.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},q.prototype.add=function(u,y){this._verify2(u,y);var b=u.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},q.prototype.iadd=function(u,y){this._verify2(u,y);var b=u.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},q.prototype.sub=function(u,y){this._verify2(u,y);var b=u.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},q.prototype.isub=function(u,y){this._verify2(u,y);var b=u.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},q.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},q.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},q.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},q.prototype.isqr=function(u){return this.imul(u,u.clone())},q.prototype.sqr=function(u){return this.mul(u,u)},q.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var b=this.m.add(new i(1)).iushrn(2);return this.pow(u,b)}for(var w=this.m.subn(1),A=0;!w.isZero()&&w.andln(1)===0;)A++,w.iushrn(1);t(!w.isZero());var h=new i(1).toRed(this),k=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(k)!==0;)d.redIAdd(k);for(var m=this.pow(d,w),z=this.pow(u,w.addn(1).iushrn(1)),f=this.pow(u,w),P=A;f.cmp(h)!==0;){for(var D=f,V=0;D.cmp(h)!==0;V++)D=D.redSqr();t(V=0;A--){for(var m=y.words[A],z=d-1;z>=0;z--){var f=m>>z&1;if(h!==w[0]&&(h=this.sqr(h)),f===0&&k===0){g=0;continue}k<<=1,k|=f,g++,!(g!==b&&(A!==0||z!==0))&&(h=this.mul(h,w[k]),g=0,k=0)}d=26}return h},q.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},q.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new se(u)};function se(I){q.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(se,q),se.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},se.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},se.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var b=u.imul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var b=u.mul(y),w=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(w).iushrn(this.shift),h=A;return A.cmp(this.m)>=0?h=A.isub(this.m):A.cmpn(0)<0&&(h=A.iadd(this.m)),h._forceRed(this)},se.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof yd>"u"||yd,Yp)});var wy=ae((hT,ao)=>{(function(){"use strict";var a="input is invalid type",e="finalize already called",t=typeof window=="object",n=t?window:{};n.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?n=global:i&&(n=self);var s=!n.JS_SHA3_NO_COMMON_JS&&typeof ao=="object"&&ao.exports,o=typeof define=="function"&&define.amd,l=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],C=[1,256,65536,16777216],_=[6,1536,393216,100663296],v=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],L=[224,256,384,512],O=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],H={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),l&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var M=function(f,P,D){return function(V){return new d(f,P,f).update(V)[D]()}},J=function(f,P,D){return function(V,K){return new d(f,P,K).update(V)[D]()}},$=function(f,P,D){return function(V,K,ee,Y){return u["cshake"+f].update(V,K,ee,Y)[D]()}},de=function(f,P,D){return function(V,K,ee,Y){return u["kmac"+f].update(V,K,ee,Y)[D]()}},T=function(f,P,D,V){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}d.prototype.update=function(f){if(this.finalized)throw new Error(e);var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(a);if(l&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!l||!ArrayBuffer.isView(f)))throw new Error(a)}else throw new Error(a);P=!0}for(var V=this.blocks,K=this.byteCount,ee=f.length,Y=this.blockCount,Q=0,ct=this.s,Z,le;Q>2]|=f[Q]<>2]|=le<>2]|=(192|le>>6)<>2]|=(128|le&63)<=57344?(V[Z>>2]|=(224|le>>12)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<>2]|=(240|le>>18)<>2]|=(128|le>>12&63)<>2]|=(128|le>>6&63)<>2]|=(128|le&63)<=K){for(this.start=Z-K,this.block=V[Y],Z=0;Z>8,D=f&255;D>0;)K.unshift(D),f=f>>8,D=f&255,++V;return P?K.push(V):K.unshift(V),this.update(K),K.length},d.prototype.encodeString=function(f){var P,D=typeof f;if(D!=="string"){if(D==="object"){if(f===null)throw new Error(a);if(l&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!l||!ArrayBuffer.isView(f)))throw new Error(a)}else throw new Error(a);P=!0}var V=0,K=f.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&1023)<<10|f.charCodeAt(++ee)&1023),V+=4)}return V+=this.encode(V*8),this.update(f),V},d.prototype.bytepad=function(f,P){for(var D=this.encode(P),V=0;V>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(f[0]=f[D],P=1;P>4&15]+p[Q&15]+p[Q>>12&15]+p[Q>>8&15]+p[Q>>20&15]+p[Q>>16&15]+p[Q>>28&15]+p[Q>>24&15];ee%f===0&&(z(P),K=0)}return V&&(Q=P[K],Y+=p[Q>>4&15]+p[Q&15],V>1&&(Y+=p[Q>>12&15]+p[Q>>8&15]),V>2&&(Y+=p[Q>>20&15]+p[Q>>16&15])),Y},d.prototype.arrayBuffer=function(){this.finalize();var f=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,K=0,ee=0,Y=this.outputBits>>3,Q;V?Q=new ArrayBuffer(D+1<<2):Q=new ArrayBuffer(Y);for(var ct=new Uint32Array(Q);ee>8&255,Y[Q+2]=ct>>16&255,Y[Q+3]=ct>>24&255;ee%f===0&&z(P)}return V&&(Q=ee<<2,ct=P[K],Y[Q]=ct&255,V>1&&(Y[Q+1]=ct>>8&255),V>2&&(Y[Q+2]=ct>>16&255)),Y};function m(f,P,D){d.call(this,f,P,D)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var z=function(f){var P,D,V,K,ee,Y,Q,ct,Z,le,Ka,De,Oe,Ja,Be,Fe,$a,Le,Ue,Qa,Ve,je,Ya,He,qe,Xa,ze,Ge,Za,We,Ke,ei,Je,$e,ti,Qe,Ye,ni,Xe,Ze,ai,et,tt,ii,nt,at,ri,it,rt,si,st,ot,oi,ut,dt,ui,lt,pt,Ea,Ma,Ia,Ca,Sa;for(V=0;V<48;V+=2)K=f[0]^f[10]^f[20]^f[30]^f[40],ee=f[1]^f[11]^f[21]^f[31]^f[41],Y=f[2]^f[12]^f[22]^f[32]^f[42],Q=f[3]^f[13]^f[23]^f[33]^f[43],ct=f[4]^f[14]^f[24]^f[34]^f[44],Z=f[5]^f[15]^f[25]^f[35]^f[45],le=f[6]^f[16]^f[26]^f[36]^f[46],Ka=f[7]^f[17]^f[27]^f[37]^f[47],De=f[8]^f[18]^f[28]^f[38]^f[48],Oe=f[9]^f[19]^f[29]^f[39]^f[49],P=De^(Y<<1|Q>>>31),D=Oe^(Q<<1|Y>>>31),f[0]^=P,f[1]^=D,f[10]^=P,f[11]^=D,f[20]^=P,f[21]^=D,f[30]^=P,f[31]^=D,f[40]^=P,f[41]^=D,P=K^(ct<<1|Z>>>31),D=ee^(Z<<1|ct>>>31),f[2]^=P,f[3]^=D,f[12]^=P,f[13]^=D,f[22]^=P,f[23]^=D,f[32]^=P,f[33]^=D,f[42]^=P,f[43]^=D,P=Y^(le<<1|Ka>>>31),D=Q^(Ka<<1|le>>>31),f[4]^=P,f[5]^=D,f[14]^=P,f[15]^=D,f[24]^=P,f[25]^=D,f[34]^=P,f[35]^=D,f[44]^=P,f[45]^=D,P=ct^(De<<1|Oe>>>31),D=Z^(Oe<<1|De>>>31),f[6]^=P,f[7]^=D,f[16]^=P,f[17]^=D,f[26]^=P,f[27]^=D,f[36]^=P,f[37]^=D,f[46]^=P,f[47]^=D,P=le^(K<<1|ee>>>31),D=Ka^(ee<<1|K>>>31),f[8]^=P,f[9]^=D,f[18]^=P,f[19]^=D,f[28]^=P,f[29]^=D,f[38]^=P,f[39]^=D,f[48]^=P,f[49]^=D,Ja=f[0],Be=f[1],at=f[11]<<4|f[10]>>>28,ri=f[10]<<4|f[11]>>>28,Ge=f[20]<<3|f[21]>>>29,Za=f[21]<<3|f[20]>>>29,Ma=f[31]<<9|f[30]>>>23,Ia=f[30]<<9|f[31]>>>23,et=f[40]<<18|f[41]>>>14,tt=f[41]<<18|f[40]>>>14,$e=f[2]<<1|f[3]>>>31,ti=f[3]<<1|f[2]>>>31,Fe=f[13]<<12|f[12]>>>20,$a=f[12]<<12|f[13]>>>20,it=f[22]<<10|f[23]>>>22,rt=f[23]<<10|f[22]>>>22,We=f[33]<<13|f[32]>>>19,Ke=f[32]<<13|f[33]>>>19,Ca=f[42]<<2|f[43]>>>30,Sa=f[43]<<2|f[42]>>>30,ut=f[5]<<30|f[4]>>>2,dt=f[4]<<30|f[5]>>>2,Qe=f[14]<<6|f[15]>>>26,Ye=f[15]<<6|f[14]>>>26,Le=f[25]<<11|f[24]>>>21,Ue=f[24]<<11|f[25]>>>21,si=f[34]<<15|f[35]>>>17,st=f[35]<<15|f[34]>>>17,ei=f[45]<<29|f[44]>>>3,Je=f[44]<<29|f[45]>>>3,He=f[6]<<28|f[7]>>>4,qe=f[7]<<28|f[6]>>>4,ui=f[17]<<23|f[16]>>>9,lt=f[16]<<23|f[17]>>>9,ni=f[26]<<25|f[27]>>>7,Xe=f[27]<<25|f[26]>>>7,Qa=f[36]<<21|f[37]>>>11,Ve=f[37]<<21|f[36]>>>11,ot=f[47]<<24|f[46]>>>8,oi=f[46]<<24|f[47]>>>8,ii=f[8]<<27|f[9]>>>5,nt=f[9]<<27|f[8]>>>5,Xa=f[18]<<20|f[19]>>>12,ze=f[19]<<20|f[18]>>>12,pt=f[29]<<7|f[28]>>>25,Ea=f[28]<<7|f[29]>>>25,Ze=f[38]<<8|f[39]>>>24,ai=f[39]<<8|f[38]>>>24,je=f[48]<<14|f[49]>>>18,Ya=f[49]<<14|f[48]>>>18,f[0]=Ja^~Fe&Le,f[1]=Be^~$a&Ue,f[10]=He^~Xa&Ge,f[11]=qe^~ze&Za,f[20]=$e^~Qe&ni,f[21]=ti^~Ye&Xe,f[30]=ii^~at&it,f[31]=nt^~ri&rt,f[40]=ut^~ui&pt,f[41]=dt^~lt&Ea,f[2]=Fe^~Le&Qa,f[3]=$a^~Ue&Ve,f[12]=Xa^~Ge&We,f[13]=ze^~Za&Ke,f[22]=Qe^~ni&Ze,f[23]=Ye^~Xe&ai,f[32]=at^~it&si,f[33]=ri^~rt&st,f[42]=ui^~pt&Ma,f[43]=lt^~Ea&Ia,f[4]=Le^~Qa&je,f[5]=Ue^~Ve&Ya,f[14]=Ge^~We&ei,f[15]=Za^~Ke&Je,f[24]=ni^~Ze&et,f[25]=Xe^~ai&tt,f[34]=it^~si&ot,f[35]=rt^~st&oi,f[44]=pt^~Ma&Ca,f[45]=Ea^~Ia&Sa,f[6]=Qa^~je&Ja,f[7]=Ve^~Ya&Be,f[16]=We^~ei&He,f[17]=Ke^~Je&qe,f[26]=Ze^~et&$e,f[27]=ai^~tt&ti,f[36]=si^~ot&ii,f[37]=st^~oi&nt,f[46]=Ma^~Ca&ut,f[47]=Ia^~Sa&dt,f[8]=je^~Ja&Fe,f[9]=Ya^~Be&$a,f[18]=ei^~He&Xa,f[19]=Je^~qe&ze,f[28]=et^~$e&Qe,f[29]=tt^~ti&Ye,f[38]=ot^~ii&at,f[39]=oi^~nt&ri,f[48]=Ca^~ut&ui,f[49]=Sa^~dt<,f[0]^=S[V],f[1]^=S[V+1]};if(s)ao.exports=u;else{for(b=0;b{x0.exports=h0;function h0(a,e){if(!a)throw new Error(e||"Assertion failed")}h0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}});var b0=ae((u8,Vd)=>{typeof Object.create=="function"?Vd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Vd.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Cn=ae(Ne=>{"use strict";var h2=ur(),x2=b0();Ne.inherits=x2;function b2(a,e){return(a.charCodeAt(e)&64512)!==55296||e<0||e+1>=a.length?!1:(a.charCodeAt(e+1)&64512)===56320}function g2(a,e){if(Array.isArray(a))return a.slice();if(!a)return[];var t=[];if(typeof a=="string")if(e){if(e==="hex")for(a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a),i=0;i>6|192,t[n++]=r&63|128):b2(a,i)?(r=65536+((r&1023)<<10)+(a.charCodeAt(++i)&1023),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128)}else for(i=0;i>>24|a>>>8&65280|a<<8&16711680|(a&255)<<24;return e>>>0}Ne.htonl=g0;function v2(a,e){for(var t="",n=0;n>>0}return r}Ne.join32=w2;function _2(a,e){for(var t=new Array(a.length*4),n=0,i=0;n>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Ne.split32=_2;function k2(a,e){return a>>>e|a<<32-e}Ne.rotr32=k2;function A2(a,e){return a<>>32-e}Ne.rotl32=A2;function E2(a,e){return a+e>>>0}Ne.sum32=E2;function M2(a,e,t){return a+e+t>>>0}Ne.sum32_3=M2;function I2(a,e,t,n){return a+e+t+n>>>0}Ne.sum32_4=I2;function C2(a,e,t,n,i){return a+e+t+n+i>>>0}Ne.sum32_5=C2;function S2(a,e,t,n){var i=a[e],r=a[e+1],s=n+r>>>0,o=(s>>0,a[e+1]=s}Ne.sum64=S2;function R2(a,e,t,n){var i=e+n>>>0,r=(i>>0}Ne.sum64_hi=R2;function P2(a,e,t,n){var i=e+n;return i>>>0}Ne.sum64_lo=P2;function N2(a,e,t,n,i,r,s,o){var l=0,p=e;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Ne.sum64_4_hi=N2;function D2(a,e,t,n,i,r,s,o){var l=e+n+r+o;return l>>>0}Ne.sum64_4_lo=D2;function O2(a,e,t,n,i,r,s,o,l,p){var c=0,x=e;x=x+n>>>0,c+=x>>0,c+=x>>0,c+=x>>0,c+=x>>0}Ne.sum64_5_hi=O2;function B2(a,e,t,n,i,r,s,o,l,p){var c=e+n+r+o+p;return c>>>0}Ne.sum64_5_lo=B2;function F2(a,e,t){var n=e<<32-t|a>>>t;return n>>>0}Ne.rotr64_hi=F2;function L2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Ne.rotr64_lo=L2;function U2(a,e,t){return a>>>t}Ne.shr64_hi=U2;function V2(a,e,t){var n=a<<32-t|e>>>t;return n>>>0}Ne.shr64_lo=V2});var dr=ae(_0=>{"use strict";var w0=Cn(),j2=ur();function Ao(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}_0.BlockHash=Ao;Ao.prototype.update=function(e,t){if(e=w0.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=w0.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var H2=Cn(),Wn=H2.rotr32;function q2(a,e,t,n){if(a===0)return k0(e,t,n);if(a===1||a===3)return E0(e,t,n);if(a===2)return A0(e,t,n)}ca.ft_1=q2;function k0(a,e,t){return a&e^~a&t}ca.ch32=k0;function A0(a,e,t){return a&e^a&t^e&t}ca.maj32=A0;function E0(a,e,t){return a^e^t}ca.p32=E0;function z2(a){return Wn(a,2)^Wn(a,13)^Wn(a,22)}ca.s0_256=z2;function G2(a){return Wn(a,6)^Wn(a,11)^Wn(a,25)}ca.s1_256=G2;function W2(a){return Wn(a,7)^Wn(a,18)^a>>>3}ca.g0_256=W2;function K2(a){return Wn(a,17)^Wn(a,19)^a>>>10}ca.g1_256=K2});var C0=ae((y8,I0)=>{"use strict";var lr=Cn(),J2=dr(),$2=jd(),Hd=lr.rotl32,as=lr.sum32,Q2=lr.sum32_5,Y2=$2.ft_1,M0=J2.BlockHash,X2=[1518500249,1859775393,2400959708,3395469782];function Kn(){if(!(this instanceof Kn))return new Kn;M0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}lr.inherits(Kn,M0);I0.exports=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=80;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var pr=Cn(),Z2=dr(),yr=jd(),e5=ur(),Sn=pr.sum32,t5=pr.sum32_4,n5=pr.sum32_5,a5=yr.ch32,i5=yr.maj32,r5=yr.s0_256,s5=yr.s1_256,o5=yr.g0_256,u5=yr.g1_256,S0=Z2.BlockHash,d5=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Jn(){if(!(this instanceof Jn))return new Jn;S0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=d5,this.W=new Array(64)}pr.inherits(Jn,S0);R0.exports=Jn;Jn.blockSize=512;Jn.outSize=256;Jn.hmacStrength=192;Jn.padLength=64;Jn.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var zd=Cn(),P0=qd();function fa(){if(!(this instanceof fa))return new fa;P0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}zd.inherits(fa,P0);N0.exports=fa;fa.blockSize=512;fa.outSize=224;fa.hmacStrength=192;fa.padLength=64;fa.prototype._digest=function(e){return e==="hex"?zd.toHex32(this.h.slice(0,7),"big"):zd.split32(this.h.slice(0,7),"big")}});var Kd=ae((m8,L0)=>{"use strict";var Zt=Cn(),l5=dr(),p5=ur(),$n=Zt.rotr64_hi,Qn=Zt.rotr64_lo,O0=Zt.shr64_hi,B0=Zt.shr64_lo,Oa=Zt.sum64,Gd=Zt.sum64_hi,Wd=Zt.sum64_lo,y5=Zt.sum64_4_hi,c5=Zt.sum64_4_lo,f5=Zt.sum64_5_hi,m5=Zt.sum64_5_lo,F0=l5.BlockHash,h5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Rn(){if(!(this instanceof Rn))return new Rn;F0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=h5,this.W=new Array(160)}Zt.inherits(Rn,F0);L0.exports=Rn;Rn.blockSize=1024;Rn.outSize=512;Rn.hmacStrength=192;Rn.padLength=128;Rn.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var Jd=Cn(),U0=Kd();function ma(){if(!(this instanceof ma))return new ma;U0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Jd.inherits(ma,U0);V0.exports=ma;ma.blockSize=1024;ma.outSize=384;ma.hmacStrength=192;ma.padLength=128;ma.prototype._digest=function(e){return e==="hex"?Jd.toHex32(this.h.slice(0,12),"big"):Jd.split32(this.h.slice(0,12),"big")}});var H0=ae(cr=>{"use strict";cr.sha1=C0();cr.sha224=D0();cr.sha256=qd();cr.sha384=j0();cr.sha512=Kd()});var J0=ae(K0=>{"use strict";var mi=Cn(),C5=dr(),Eo=mi.rotl32,q0=mi.sum32,is=mi.sum32_3,z0=mi.sum32_4,W0=C5.BlockHash;function Yn(){if(!(this instanceof Yn))return new Yn;W0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}mi.inherits(Yn,W0);K0.ripemd160=Yn;Yn.blockSize=512;Yn.outSize=160;Yn.hmacStrength=192;Yn.padLength=64;Yn.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=n,p=i,c=r,x=s,C=o,_=0;_<80;_++){var v=q0(Eo(z0(n,G0(_,i,r,s),e[P5[_]+t],S5(_)),D5[_]),o);n=o,o=s,s=Eo(r,10),r=i,i=v,v=q0(Eo(z0(l,G0(79-_,p,c,x),e[N5[_]+t],R5(_)),O5[_]),C),l=C,C=x,x=Eo(c,10),c=p,p=v}v=is(this.h[1],r,x),this.h[1]=is(this.h[2],s,C),this.h[2]=is(this.h[3],o,l),this.h[3]=is(this.h[4],n,p),this.h[4]=is(this.h[0],i,c),this.h[0]=v};Yn.prototype._digest=function(e){return e==="hex"?mi.toHex32(this.h,"little"):mi.split32(this.h,"little")};function G0(a,e,t,n){return a<=15?e^t^n:a<=31?e&t|~e&n:a<=47?(e|~t)^n:a<=63?e&n|t&~n:e^(t|~n)}function S5(a){return a<=15?0:a<=31?1518500249:a<=47?1859775393:a<=63?2400959708:2840853838}function R5(a){return a<=15?1352829926:a<=31?1548603684:a<=47?1836072691:a<=63?2053994217:0}var P5=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],N5=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],D5=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],O5=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Q0=ae((g8,$0)=>{"use strict";var B5=Cn(),F5=ur();function fr(a,e,t){if(!(this instanceof fr))return new fr(a,e,t);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(B5.toArray(e,t))}$0.exports=fr;fr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),F5(e.length<=this.blockSize);for(var t=e.length;t{var Nt=Y0;Nt.utils=Cn();Nt.common=dr();Nt.sha=H0();Nt.ripemd=J0();Nt.hmac=Q0();Nt.sha1=Nt.sha.sha1;Nt.sha256=Nt.sha.sha256;Nt.sha224=Nt.sha.sha224;Nt.sha384=Nt.sha.sha384;Nt.sha512=Nt.sha.sha512;Nt.ripemd160=Nt.ripemd.ripemd160});var fl=ae((cl,Ac)=>{"use strict";(function(a){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var k=0;k255)return!1;return!0}function n(h,k){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return k&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,k,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),k.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&z<224?(d.push(String.fromCharCode((z&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((z&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:k}}(),o=function(){function h(d){for(var m=[],z=0;z>4]+k[f&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[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],c=[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],x=[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],C=[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],_=[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],v=[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],S=[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],L=[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],O=[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],U=[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],H=[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],M=[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],J=[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],$=[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],de=[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 T(h){for(var k=[],g=0;g>2,this._Ke[z][k%4]=m[k],this._Kd[h-z][k%4]=m[k];for(var f=0,P=d,D;P>16&255]<<24^c[D>>8&255]<<16^c[D&255]<<8^c[D>>24&255]^p[f]<<24,f+=1,d!=8)for(var k=1;k>8&255]<<8^c[D>>16&255]<<16^c[D>>24&255]<<24;for(var k=d/2+1;k>2,K=P%4,this._Ke[V][K]=m[k],this._Kd[h-V][K]=m[k++],P++}for(var V=1;V>24&255]^J[D>>16&255]^$[D>>8&255]^de[D&255]},R.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var k=this._Ke.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var z=1;z>24&255]^_[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^S[d[(m+3)%4]&255]^this._Ke[z][m];d=g.slice()}for(var f=i(16),P,m=0;m<4;m++)P=this._Ke[k][m],f[4*m]=(c[d[m]>>24&255]^P>>24)&255,f[4*m+1]=(c[d[(m+1)%4]>>16&255]^P>>16)&255,f[4*m+2]=(c[d[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(c[d[(m+3)%4]&255]^P)&255;return f},R.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var k=this._Kd.length-1,g=[0,0,0,0],d=T(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var z=1;z>24&255]^O[d[(m+3)%4]>>16&255]^U[d[(m+2)%4]>>8&255]^H[d[(m+1)%4]&255]^this._Kd[z][m];d=g.slice()}for(var f=i(16),P,m=0;m<4;m++)P=this._Kd[k][m],f[4*m]=(x[d[m]>>24&255]^P>>24)&255,f[4*m+1]=(x[d[(m+3)%4]>>16&255]^P>>16)&255,f[4*m+2]=(x[d[(m+2)%4]>>8&255]^P>>8)&255,f[4*m+3]=(x[d[(m+1)%4]&255]^P)&255;return f};var N=function(h){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(h)};N.prototype.encrypt=function(h){if(h=n(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var k=i(h.length),g=i(16),d=0;d=0;--k)this._counter[k]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=n(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,k){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",k instanceof u||(k=new u(k)),this._counter=k,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(h)};y.prototype.encrypt=function(h){for(var k=n(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-k,d=0;d{"use strict";(function(a){function t(_){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S=1779033703,L=3144134277,O=1013904242,U=2773480762,H=1359893119,M=2600822924,J=528734635,$=1541459225,de=new Uint32Array(64);function T(y){let b=0,w=y.length;for(;w>=64;){let A=S,h=L,k=O,g=U,d=H,m=M,z=J,f=$,P,D,V,K,ee;for(D=0;D<16;D++)V=b+D*4,de[D]=(y[V]&255)<<24|(y[V+1]&255)<<16|(y[V+2]&255)<<8|y[V+3]&255;for(D=16;D<64;D++)P=de[D-2],K=(P>>>17|P<<32-17)^(P>>>19|P<<32-19)^P>>>10,P=de[D-15],ee=(P>>>7|P<<32-7)^(P>>>18|P<<32-18)^P>>>3,de[D]=(K+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)K=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&z)|0)+(f+(v[D]+de[D]|0)|0)|0,ee=((A>>>2|A<<32-2)^(A>>>13|A<<32-13)^(A>>>22|A<<32-22))+(A&h^A&k^h&k)|0,f=z,z=m,m=d,d=g+K|0,g=k,k=h,h=A,A=K+ee|0;S=S+A|0,L=L+h|0,O=O+k|0,U=U+g|0,H=H+d|0,M=M+m|0,J=J+z|0,$=$+f|0,b+=64,w-=64}}T(_);let R,N=_.length%64,q=_.length/536870912|0,se=_.length<<3,I=N<56?56:120,u=_.slice(_.length-N,_.length);for(u.push(128),R=N+1;R>>24&255),u.push(q>>>16&255),u.push(q>>>8&255),u.push(q>>>0&255),u.push(se>>>24&255),u.push(se>>>16&255),u.push(se>>>8&255),u.push(se>>>0&255),T(u),[S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255]}function n(_,v,S){_=_.length<=64?_:t(_);let L=64+v.length+4,O=new Array(L),U=new Array(64),H,M=[];for(H=0;H<64;H++)O[H]=54;for(H=0;H<_.length;H++)O[H]^=_[H];for(H=0;H=L-4;$--){if(O[$]++,O[$]<=255)return;O[$]=0}}for(;S>=32;)J(),M=M.concat(t(U.concat(t(O)))),S-=32;return S>0&&(J(),M=M.concat(t(U.concat(t(O))).slice(0,S))),M}function i(_,v,S,L,O){let U;for(l(_,(2*S-1)*16,O,0,16),U=0;U<2*S;U++)o(_,U*16,O,16),s(O,L),l(O,0,_,v+U*16,16);for(U=0;U>>32-v}function s(_,v){l(_,0,v,0,16);for(let S=8;S>0;S-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let S=0;S<16;++S)_[S]+=v[S]}function o(_,v,S,L){for(let O=0;O=256)return!1}return!0}function c(_,v){if(typeof _!="number"||_%1)throw new Error("invalid "+v);return _}function x(_,v,S,L,O,U,H){if(S=c(S,"N"),L=c(L,"r"),O=c(O,"p"),U=c(U,"dkLen"),S===0||(S&S-1)!==0)throw new Error("N must be power of 2");if(S>2147483647/128/L)throw new Error("N too large");if(L>2147483647/128/O)throw new Error("r too large");if(!p(_))throw new Error("password must be an array or buffer");if(_=Array.prototype.slice.call(_),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let M=n(_,v,O*128*L),J=new Uint32Array(O*32*L);for(let d=0;dh&&(d=h);for(let z=0;zh&&(d=h);for(let z=0;z>0&255),M.push(J[z]>>8&255),M.push(J[z]>>16&255),M.push(J[z]>>24&255);let m=n(_,M,U);return H&&H(null,1,m),m}H&&k(g)};if(!H)for(;;){let d=g();if(d!=null)return d}g()}let C={scrypt:function(_,v,S,L,O,U,H){return new Promise(function(M,J){let $=0;H&&H(0),x(_,v,S,L,O,U,function(de,T,R){if(de)J(de);else if(R)H&&$!==1&&H(1),M(new Uint8Array(R));else if(H&&T!==$)return $=T,H(T)})})},syncScrypt:function(_,v,S,L,O,U){return new Uint8Array(x(_,v,S,L,O,U))}};typeof gl<"u"?Mc.exports=C:typeof define=="function"&&define.amd?define(C):a&&(a.scrypt&&(a._scrypt=a.scrypt),a.scrypt=C)})(gl)});var Xc=ae((u9,Yc)=>{"use strict";var Qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",kl={};for(fs=0;fs>25;return(a&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function $c(a){for(var e=1,t=0;t126)return"Invalid prefix ("+a+")";e=_r(e)^n>>5}for(e=_r(e),t=0;tt)throw new TypeError("Exceeds length limit");a=a.toLowerCase();var n=$c(a);if(typeof n=="string")throw new Error(n);for(var i=a+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");n=_r(n)^s,i+=Qo.charAt(s)}for(r=0;r<6;++r)n=_r(n);for(n^=1,r=0;r<6;++r){var o=n>>(5-r)*5&31;i+=Qo.charAt(o)}return i}function Qc(a,e){if(e=e||90,a.length<8)return a+" too short";if(a.length>e)return"Exceeds length limit";var t=a.toLowerCase(),n=a.toUpperCase();if(a!==t&&a!==n)return"Mixed-case string "+a;a=t;var i=a.lastIndexOf("1");if(i===-1)return"No separator character for "+a;if(i===0)return"Missing prefix for "+a;var r=a.slice(0,i),s=a.slice(i+1);if(s.length<6)return"Data too short";var o=$c(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(x)}return o!==1?"Invalid checksum for "+a:{prefix:r,words:l}}function vx(){var a=Qc.apply(null,arguments);if(typeof a=="object")return a}function wx(a){var e=Qc.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Yo(a,e,t,n){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(n)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(a,e){typeof Xl=="object"&&typeof Zl<"u"?Zl.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.fetchRetry=e())})(Xl,function(){"use strict";var a=function(n,i){if(i=i||{},typeof n!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,c=i.retryDelay,x=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")c=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")x=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(C,_){var v=function(L){var O=typeof Request<"u"&&o instanceof Request?o.clone():o;n(O,l).then(function(U){if(Array.isArray(x)&&x.indexOf(U.status)===-1)C(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):C(U)}).catch(_)}catch(H){_(H)}else L=0}function t(n){this.name="ArgumentError",this.message=n}return a})});var ep=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$dictionary=void 0;fu.$dictionary=function(){var a,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(a=e.__typia_custom_validator)!==null&&a!==void 0?a:e.__typia_custom_validator=new Map}()});var Fs=ae((vE,xm)=>{xm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var np=ae(qa=>{var Ee=Fs(),tp=()=>[{type:Ee.RANGE,from:48,to:57}],bm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(tp()),gm=()=>[{type:Ee.CHAR,value:9},{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:11},{type:Ee.CHAR,value:12},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:32},{type:Ee.CHAR,value:160},{type:Ee.CHAR,value:5760},{type:Ee.RANGE,from:8192,to:8202},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233},{type:Ee.CHAR,value:8239},{type:Ee.CHAR,value:8287},{type:Ee.CHAR,value:12288},{type:Ee.CHAR,value:65279}],pb=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];qa.words=()=>({type:Ee.SET,set:bm(),not:!1});qa.notWords=()=>({type:Ee.SET,set:bm(),not:!0});qa.ints=()=>({type:Ee.SET,set:tp(),not:!1});qa.notInts=()=>({type:Ee.SET,set:tp(),not:!0});qa.whitespace=()=>({type:Ee.SET,set:gm(),not:!1});qa.notWhitespace=()=>({type:Ee.SET,set:gm(),not:!0});qa.anyChar=()=>({type:Ee.SET,set:pb(),not:!0})});var vm=ae(Ls=>{var Tm=Fs(),Br=np(),yb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",cb={0:0,t:9,n:10,v:11,f:12,r:13};Ls.strToChars=function(a){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(e,function(t,n,i,r,s,o,l,p){if(i)return t;var c=n?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?yb.indexOf(l):cb[p],x=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),a};Ls.tokenizeClass=(a,e)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=n.exec(a))!=null;)if(i[1])t.push(Br.words());else if(i[2])t.push(Br.ints());else if(i[3])t.push(Br.whitespace());else if(i[4])t.push(Br.notWords());else if(i[5])t.push(Br.notInts());else if(i[6])t.push(Br.notWhitespace());else if(i[7])t.push({type:Tm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:Tm.CHAR,value:r.charCodeAt(0)});else return[t,n.lastIndex];Ls.error(e,"Unterminated character class")};Ls.error=(a,e)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+e)}});var wm=ae(Us=>{var mu=Fs();Us.wordBoundary=()=>({type:mu.POSITION,value:"b"});Us.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Us.begin=()=>({type:mu.POSITION,value:"^"});Us.end=()=>({type:mu.POSITION,value:"$"})});var _m=ae((AE,ap)=>{var Fr=vm(),vn=Fs(),Mi=np(),hu=wm();ap.exports=a=>{var e=0,t,n,i={type:vn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Fr.error(a,`Nothing to repeat at column ${O-1}`)},p=Fr.strToChars(a);for(t=p.length;e{"use strict";var wn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new wn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var n=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var n=t.low;n<=t.high;)e.push(n),n++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};km.exports=za});var Mm=ae((ME,Em)=>{var xu=_m(),Vs=Am(),Ii=xu.types;Em.exports=class js{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=xu(e)}_setDefaults(e){this.max=e.max!=null?e.max:js.prototype.max!=null?js.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,r,s,o;switch(e.type){case Ii.ROOT:case Ii.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),n=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=n.length;s{"use strict";var fb=Ci&&Ci.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.RandomGenerator=void 0;var mb=fb(Mm()),hb;(function(a){var e="abcdefghijklmnopqrstuvwxyz";a.boolean=function(){return Math.random()<.5},a.integer=function(t,n){return t??(t=0),n??(n=100),Math.floor(Math.random()*(n-t+1))+t},a.bigint=function(t,n){return t??(t=BigInt(0)),n??(n=BigInt(100)),BigInt(a.integer(Number(t),Number(n)))},a.number=function(t,n){return t??(t=0),n??(n=100),Math.random()*(n-t)+t},a.string=function(t){return new Array(t??a.integer(5,10)).fill(0).map(function(){return e[a.integer(0,e.length-1)]}).join("")},a.array=function(t,n){return new Array(n??a.integer(0,3)).fill(0).map(function(i,r){return t(r)})},a.pick=function(t){return t[a.integer(0,t.length-1)]},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,i=t==="x"?n:n&3|8;return i.toString(16)})},a.email=function(){return"".concat(a.string(10),"@").concat(a.string(10),".").concat(a.string(3))},a.url=function(){return"https://".concat(a.string(10),".").concat(a.string(3))},a.ipv4=function(){return a.array(function(){return a.integer(0,255)},4).join(".")},a.ipv6=function(){return a.array(function(){return a.integer(0,65535).toString(16)},8).join(":")},a.pattern=function(t){return new mb.default(t).gen()},a.date=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString().substring(0,10)},a.datetime=function(t,n){return t??(t=0),n??(n=Date.now()*2),new Date(a.number(t,n)).toISOString()}})(hb=Ci.RandomGenerator||(Ci.RandomGenerator={}))});var Hs=ae(Lr=>{"use strict";var xb=Lr&&Lr.__extends||function(){var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},a(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.TypeGuardError=void 0;var bb=function(a){xb(e,a);function e(t){var n=this.constructor,i=a.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Lr.TypeGuardError=bb});var Cm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var gb=function(a){return a!==void 0?JSON.parse(JSON.stringify(a)):void 0};bu.$any=gb});var Sm=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var Tb=function(a,e){for(var t=null,n=0;n{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var vb=Hs(),wb=function(a){return function(e,t){if(e===!0)throw new vb.TypeGuardError({method:a,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=wb});var Pm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var _b=function(a,e,t){return e<=a&&a<=t};vu.$is_between=_b});var Nm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var kb=ep(),Ab=function(a,e,t,n){var i,r=(i=kb.$dictionary.get(a))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(n)};wu.$is_custom=Ab});var Dm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var Eb=function(a){return Mb.test(a)};_u.$is_date=Eb;var Mb=/^(\d{4})-(\d{2})-(\d{2})$/});var Om=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var Ib=function(a){return!isNaN(new Date(a).getTime())};ku.$is_datetime=Ib});var Bm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var Cb=function(a){return Sb.test(a)};Au.$is_email=Cb;var Sb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Fm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv4=void 0;var Rb=function(a){return Pb.test(a)};Eu.$is_ipv4=Rb;var Pb=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var Lm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var Nb=function(a){return Db.test(a)};Mu.$is_ipv6=Nb;var Db=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var Um=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_url=void 0;var Ob=function(a){return Bb.test(a)};Iu.$is_url=Ob;var Bb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Vm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_uuid=void 0;var Fb=function(a){return Lb.test(a)};Cu.$is_uuid=Fb;var Lb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var jm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var Ub=function(a){return Vb(a)?".".concat(a):"[".concat(JSON.stringify(a),"]")};Su.$join=Ub;var Vb=function(a){return jb(a)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(a)},jb=function(a){return Hb.has(a)},Hb=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var Hm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var qb=Hs(),zb=function(a){if(isFinite(a)===!1)throw new qb.TypeGuardError({method:"typia.stringify",expected:"number",value:a,message:"Error on typia.stringify(): infinite or not a number."});return a};Ru.$number=zb});var qm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var Gb=function(a){var e=function(t){if(a.length===0)return!0;var n=a[a.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return function(t,n){return t&&e(n.path)&&a.push(n),!1}};Pu.$report=Gb});var zm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var Wb=function(a){return a.length===2?"":","+a.substring(1,a.length-1)};Nu.$rest=Wb});var Gm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var Kb=function(a){if(a.length>41)return JSON.stringify(a);for(var e=a.length,t="",n=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=a.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=a.slice(n,o)+"\\",n=o,i=!0)}return i?t+=a.slice(n):t=a,s<32||r===!0?JSON.stringify(a):'"'.concat(t,'"')};Du.$string=Kb});var Wm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var Jb=function(a){return a[a.length-1]===","?a.substring(0,a.length-1):a};Ou.$tail=Jb});var Qm=ae(Si=>{"use strict";var zt=Si&&Si.__assign||function(){return zt=Object.assign||function(a){for(var e,t=1,n=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),n}}})},a.stringify=function(t){return zt(zt({},a.is()),{number:o1.$number,string:l1.$string,tail:p1.$tail,rest:d1.$rest,throws:e(t)})},a.clone=function(t){return zt(zt({},a.is()),{throws:e(t),any:$b.$any})},a.prune=function(t){return zt(zt({},a.is()),{throws:e(t)})},a.random=function(){return{generator:Km.RandomGenerator,pick:Km.RandomGenerator.pick}};var e=function(t){return function(n){throw new Jm.TypeGuardError(zt(zt({},n),{method:"typia.".concat(t)}))}}})(y1=Si.Namespace||(Si.Namespace={}))});var Ym=ae(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.MapUtil=void 0;var c1;(function(a){a.take=function(e){return function(t,n){var i=e.get(t);if(i)return i;var r=n();return e.set(t,r),r}}})(c1=qs.MapUtil||(qs.MapUtil={}))});var Zm=ae(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0})});var th=ae(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0})});var ah=ae(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0})});var rh=ae(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0})});var oh=ae(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0})});var dh=ae(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0})});var hp=ae(G=>{"use strict";var f1=G&&G.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),Ri=G&&G.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&f1(e,a,t)};Object.defineProperty(G,"__esModule",{value:!0});G.createValidatePrune=G.createIsPrune=G.createAssertPrune=G.createPrune=G.createValidateClone=G.createIsClone=G.createAssertClone=G.createClone=G.createRandom=G.createValidateStringify=G.createIsStringify=G.createAssertStringify=G.createStringify=G.createValidateParse=G.createAssertParse=G.createIsParse=G.createValidateEquals=G.createEquals=G.createAssertEquals=G.createValidate=G.createIs=G.createAssertType=G.createAssert=G.validatePrune=G.isPrune=G.assertPrune=G.prune=G.validateClone=G.isClone=G.assertClone=G.clone=G.literals=G.random=G.metadata=G.validateStringify=G.isStringify=G.assertStringify=G.stringify=G.validateParse=G.isParse=G.assertParse=G.application=G.customValidators=G.validateEquals=G.equals=G.assertEquals=G.validate=G.is=G.assertType=G.assert=void 0;var Ur=ep(),Me=Qm(),m1=Ym();Ri(Zm(),G);Ri(th(),G);Ri(ah(),G);Ri(rh(),G);Ri(oh(),G);Ri(dh(),G);Ri(Hs(),G);function ip(){re("assert")}G.assert=ip;Object.assign(ip,Me.Namespace.assert("assert"));function rp(){re("assertType")}G.assertType=rp;Object.assign(rp,Me.Namespace.assert("assertType"));function Bu(){re("is")}G.is=Bu;Object.assign(Bu,Me.Namespace.assert("is"));function Fu(){re("validate")}G.validate=Fu;Object.assign(Fu,Me.Namespace.validate());function sp(){re("assertEquals")}G.assertEquals=sp;Object.assign(sp,Me.Namespace.assert("assertEquals"));function op(){re("equals")}G.equals=op;Object.assign(op,Me.Namespace.is());function up(){re("validateEquals")}G.validateEquals=up;Object.assign(up,Me.Namespace.validate());G.customValidators={size:function(a){var e,t;return a?(t=(e=Ur.$dictionary.get(a))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Ur.$dictionary.size},has:function(a){return function(e){var t,n;return(n=(t=Ur.$dictionary.get(a))===null||t===void 0?void 0:t.has(e))!==null&&n!==void 0?n:!1}},get:function(a){return function(e){var t;return(t=Ur.$dictionary.get(a))===null||t===void 0?void 0:t.get(e)}},insert:function(a){return function(e){return function(t){var n=m1.MapUtil.take(Ur.$dictionary)(a,function(){return new Map});return n.has(e)?!1:(n.set(e,t),!0)}}},erase:function(a){return function(e){var t,n;return(n=(t=Ur.$dictionary.get(a))===null||t===void 0?void 0:t.delete(e))!==null&&n!==void 0?n:!1}}};function h1(){re("application")}G.application=h1;function dp(){re("assertParse")}G.assertParse=dp;Object.assign(dp,Me.Namespace.assert("assertParse"));function lp(){re("isParse")}G.isParse=lp;Object.assign(lp,Bu);function pp(){re("validateParse")}G.validateParse=pp;Object.assign(pp,Fu);function yp(){re("stringify")}G.stringify=yp;Object.assign(yp,Me.Namespace.stringify("stringify"));function Lu(){re("assertStringify")}G.assertStringify=Lu;Object.assign(Lu,Me.Namespace.assert("assertStringify"));Object.assign(Lu,Me.Namespace.stringify("assertStringify"));function Uu(){re("isStringify")}G.isStringify=Uu;Object.assign(Uu,Me.Namespace.is());Object.assign(Uu,Me.Namespace.stringify("isStringify"));function Vu(){re("validateStringify")}G.validateStringify=Vu;Object.assign(Vu,Me.Namespace.validate());Object.assign(Vu,Me.Namespace.stringify("validateStringify"));function x1(){re("metadata")}G.metadata=x1;function cp(){re("random")}G.random=cp;Object.assign(cp,Me.Namespace.random());function b1(){re("literals")}G.literals=b1;function fp(){re("clone")}G.clone=fp;Object.assign(fp,Me.Namespace.clone("clone"));function ju(){re("assertClone")}G.assertClone=ju;Object.assign(ju,Me.Namespace.assert("assertClone"));Object.assign(ju,Me.Namespace.clone("assertClone"));function Hu(){re("isClone")}G.isClone=Hu;Object.assign(Hu,Me.Namespace.is());Object.assign(Hu,Me.Namespace.clone("isClone"));function qu(){re("validateClone")}G.validateClone=qu;Object.assign(qu,Me.Namespace.validate());Object.assign(qu,Me.Namespace.clone("validateClone"));function mp(){re("prune")}G.prune=mp;Object.assign(mp,Me.Namespace.prune("prune"));function zu(){re("assertPrune")}G.assertPrune=zu;Object.assign(zu,Me.Namespace.assert("assertPrune"));Object.assign(zu,Me.Namespace.prune("assertPrune"));function Gu(){re("isPrune")}G.isPrune=Gu;Object.assign(Gu,Me.Namespace.is());Object.assign(Gu,Me.Namespace.prune("isPrune"));function Wu(){re("validatePrune")}G.validatePrune=Wu;Object.assign(Wu,Me.Namespace.prune("validatePrune"));Object.assign(Wu,Me.Namespace.validate());function lh(){re("createAssert")}G.createAssert=lh;Object.assign(lh,ip);function ph(){re("createAssertType")}G.createAssertType=ph;Object.assign(ph,rp);function yh(){re("createIs")}G.createIs=yh;Object.assign(yh,Bu);function ch(){re("createValidate")}G.createValidate=ch;Object.assign(ch,Fu);function fh(){re("createAssertEquals")}G.createAssertEquals=fh;Object.assign(fh,sp);function mh(){re("createEquals")}G.createEquals=mh;Object.assign(mh,op);function hh(){re("createValidateEquals")}G.createValidateEquals=hh;Object.assign(hh,up);function xh(){re("createIsParse")}G.createIsParse=xh;Object.assign(xh,lp);function bh(){re("createAssertParse")}G.createAssertParse=bh;Object.assign(bh,dp);function gh(){re("createValidateParse")}G.createValidateParse=gh;Object.assign(gh,pp);function Th(){re("createStringify")}G.createStringify=Th;Object.assign(Th,yp);function vh(){re("createAssertStringify")}G.createAssertStringify=vh;Object.assign(vh,Lu);function wh(){re("createIsStringify")}G.createIsStringify=wh;Object.assign(wh,Uu);function _h(){re("createValidateStringify")}G.createValidateStringify=_h;Object.assign(_h,Vu);function kh(){re("createRandom")}G.createRandom=kh;Object.assign(kh,cp);function Ah(){re("createClone")}G.createClone=Ah;Object.assign(Ah,fp);function Eh(){re("createAssertClone")}G.createAssertClone=Eh;Object.assign(Eh,ju);function Mh(){re("createIsClone")}G.createIsClone=Mh;Object.assign(Mh,Hu);function Ih(){re("createValidateClone")}G.createValidateClone=Ih;Object.assign(Ih,qu);function Ch(){re("createPrune")}G.createPrune=Ch;Object.assign(Ch,mp);function Sh(){re("createAssertPrune")}G.createAssertPrune=Sh;Object.assign(Sh,zu);function Rh(){re("createIsPrune")}G.createIsPrune=Rh;Object.assign(Rh,Gu);function Ph(){re("createValidatePrune")}G.createValidatePrune=Ph;Object.assign(Ph,Wu);function re(a){throw new Error("Error on typia.".concat(a,'(): no transform has been configured. Run "npx typia setup" command.'))}});var Dh=ae(_n=>{"use strict";var Nh=_n&&_n.__createBinding||(Object.create?function(a,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(a,n,i)}:function(a,e,t,n){n===void 0&&(n=t),a[n]=e[t]}),g1=_n&&_n.__setModuleDefault||(Object.create?function(a,e){Object.defineProperty(a,"default",{enumerable:!0,value:e})}:function(a,e){a.default=e}),T1=_n&&_n.__importStar||function(a){if(a&&a.__esModule)return a;var e={};if(a!=null)for(var t in a)t!=="default"&&Object.prototype.hasOwnProperty.call(a,t)&&Nh(e,a,t);return g1(e,a),e},v1=_n&&_n.__exportStar||function(a,e){for(var t in a)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Nh(e,a,t)};Object.defineProperty(_n,"__esModule",{value:!0});var w1=T1(hp());_n.default=w1;v1(hp(),_n)});var Ul={};Ki(Ul,{BaseContract:()=>hr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>gi,FixedNumber:()=>ft,Signer:()=>Pt,VoidSigner:()=>ya,Wallet:()=>Nn,Wordlist:()=>Tn,constants:()=>xt,errors:()=>$t,getDefaultProvider:()=>uu,logger:()=>Df,providers:()=>ia,utils:()=>te,version:()=>lu,wordlists:()=>vi});var dy=Mn(cd());var Xp="logger/5.7.0";var Zp=!1,ey=!1,Xs={debug:1,default:2,info:2,warning:3,error:4,off:5},ty=Xs.default,fd=null;function y6(){try{let a=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{a.push(e)}}),a.length)throw new Error("missing "+a.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(a){return a.message}return null}var ny=y6(),md;(function(a){a.DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF"})(md||(md={}));var $t;(function(a){a.UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED"})($t||($t={}));var ay="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();Xs[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ty>Xs[n])&&console.log.apply(console,t)}debug(...e){this._log(E.levels.DEBUG,e)}info(...e){this._log(E.levels.INFO,e)}warn(...e){this._log(E.levels.WARNING,e)}makeError(e,t,n){if(ey)return this.makeError("censored error",t,{});t||(t=E.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(l=>{let p=n[l];try{if(p instanceof Uint8Array){let c="";for(let x=0;x>4],c+=ay[p[x]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case $t.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case $t.CALL_EXCEPTION:case $t.INSUFFICIENT_FUNDS:case $t.MISSING_NEW:case $t.NONCE_EXPIRED:case $t.REPLACEMENT_UNDERPRICED:case $t.TRANSACTION_REPLACED:case $t.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,E.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),ny&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ny})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,E.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,E.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",E.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",E.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return fd||(fd=new E(Xp)),fd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Zp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ey=!!e,Zp=!!t}static setLogLevel(e){let t=Xs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ty=t}static from(e){return new E(e)}};E.errors=$t;E.levels=md;var iy="bytes/5.7.0";var _t=new E(iy);function sy(a){return!!a.toHexString}function Ji(a){return a.slice||(a.slice=function(){let e=Array.prototype.slice.call(arguments);return Ji(new Uint8Array(Array.prototype.slice.apply(a,e)))}),a}function oa(a){return ie(a)&&!(a.length%2)||pn(a)}function ry(a){return typeof a=="number"&&a==a&&a%1===0}function pn(a){if(a==null)return!1;if(a.constructor===Uint8Array)return!0;if(typeof a=="string"||!ry(a.length)||a.length<0)return!1;for(let e=0;e=256)return!1}return!0}function j(a,e){if(e||(e={}),typeof a=="number"){_t.checkSafeUint53(a,"invalid arrayify value");let t=[];for(;a;)t.unshift(a&255),a=parseInt(String(a/256));return t.length===0&&t.push(0),Ji(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),sy(a)&&(a=a.toHexString()),ie(a)){let t=a.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":_t.throwArgumentError("hex data is odd-length","value",a));let n=[];for(let i=0;ij(i)),t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);return e.reduce((i,r)=>(n.set(r,i),i+r.length),0),Ji(n)}function nn(a){let e=j(a);if(e.length===0)return e;let t=0;for(;te&&_t.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(a,e-a.length),Ji(t)}function ie(a,e){return!(typeof a!="string"||!a.match(/^0x[0-9A-Fa-f]*$/)||e&&a.length!==2+2*e)}var hd="0123456789abcdef";function W(a,e){if(e||(e={}),typeof a=="number"){_t.checkSafeUint53(a,"invalid hexlify value");let t="";for(;a;)t=hd[a&15]+t,a=Math.floor(a/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof a=="bigint")return a=a.toString(16),a.length%2?"0x0"+a:"0x"+a;if(e.allowMissingPrefix&&typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),sy(a))return a.toHexString();if(ie(a))return a.length%2&&(e.hexPad==="left"?a="0x0"+a.substring(2):e.hexPad==="right"?a+="0":_t.throwArgumentError("hex data is odd-length","value",a)),a.toLowerCase();if(pn(a)){let t="0x";for(let n=0;n>4]+hd[i&15]}return t}return _t.throwArgumentError("invalid hexlify value","value",a)}function Ft(a){if(typeof a!="string")a=W(a);else if(!ie(a)||a.length%2)return null;return(a.length-2)/2}function Ce(a,e,t){return typeof a!="string"?a=W(a):(!ie(a)||a.length%2)&&_t.throwArgumentError("invalid hexData","value",a),e=2+2*e,t!=null?"0x"+a.substring(e,2+2*t):"0x"+a.substring(e)}function At(a){let e="0x";return a.forEach(t=>{e+=W(t).substring(2)}),e}function Hn(a){let e=xd(W(a,{hexPad:"left"}));return e==="0x"?"0x0":e}function xd(a){typeof a!="string"&&(a=W(a)),ie(a)||_t.throwArgumentError("invalid hex string","value",a),a=a.substring(2);let e=0;for(;e2*e+2&&_t.throwArgumentError("value out of range","value",arguments[1]);a.length<2*e+2;)a="0x0"+a.substring(2);return a}function qn(a){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(oa(a)){let t=j(a);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64))):t.length===65?(e.r=W(t.slice(0,32)),e.s=W(t.slice(32,64)),e.v=t[64]):_t.throwArgumentError("invalid signature string","signature",a),e.v<27&&(e.v===0||e.v===1?e.v+=27:_t.throwArgumentError("signature invalid v byte","signature",a)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=W(t.slice(32,64))}else{if(e.r=a.r,e.s=a.s,e.v=a.v,e.recoveryParam=a.recoveryParam,e._vs=a._vs,e._vs!=null){let i=di(j(e._vs),32);e._vs=W(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&_t.throwArgumentError("signature recoveryParam mismatch _vs","signature",a),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&_t.throwArgumentError("signature v mismatch _vs","signature",a)}if(e.recoveryParam==null)e.v==null?_t.throwArgumentError("signature missing v and recoveryParam","signature",a):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&_t.throwArgumentError("signature recoveryParam mismatch v","signature",a)}e.r==null||!ie(e.r)?_t.throwArgumentError("signature missing or invalid r","signature",a):e.r=me(e.r,32),e.s==null||!ie(e.s)?_t.throwArgumentError("signature missing or invalid s","signature",a):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&_t.throwArgumentError("signature s out of range","signature",a),e.recoveryParam&&(t[0]|=128);let n=W(t);e._vs&&(ie(e._vs)||_t.throwArgumentError("signature invalid _vs","signature",a),e._vs=me(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&_t.throwArgumentError("signature _vs mismatch v and s","signature",a)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function zr(a){return a=qn(a),W(ye([a.r,a.s,a.recoveryParam?"0x1c":"0x1b"]))}var Zs="bignumber/5.7.0";var Gr=dy.default.BN,ua=new E(Zs),bd={},oy=9007199254740991;function ly(a){return a!=null&&(F.isBigNumber(a)||typeof a=="number"&&a%1===0||typeof a=="string"&&!!a.match(/^-?[0-9]+$/)||ie(a)||typeof a=="bigint"||pn(a))}var uy=!1,F=class{constructor(e,t){e!==bd&&ua.throwError("cannot call constructor directly; use BigNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qt(be(this).fromTwos(e))}toTwos(e){return Qt(be(this).toTwos(e))}abs(){return this._hex[0]==="-"?F.from(this._hex.substring(1)):this}add(e){return Qt(be(this).add(be(e)))}sub(e){return Qt(be(this).sub(be(e)))}div(e){return F.from(e).isZero()&&yn("division-by-zero","div"),Qt(be(this).div(be(e)))}mul(e){return Qt(be(this).mul(be(e)))}mod(e){let t=be(e);return t.isNeg()&&yn("division-by-zero","mod"),Qt(be(this).umod(t))}pow(e){let t=be(e);return t.isNeg()&&yn("negative-power","pow"),Qt(be(this).pow(t))}and(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","and"),Qt(be(this).and(t))}or(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","or"),Qt(be(this).or(t))}xor(e){let t=be(e);return(this.isNegative()||t.isNeg())&&yn("unbound-bitwise-result","xor"),Qt(be(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&yn("negative-width","mask"),Qt(be(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&yn("negative-width","shl"),Qt(be(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&yn("negative-width","shr"),Qt(be(this).shrn(e))}eq(e){return be(this).eq(be(e))}lt(e){return be(this).lt(be(e))}lte(e){return be(this).lte(be(e))}gt(e){return be(this).gt(be(e))}gte(e){return be(this).gte(be(e))}isNegative(){return this._hex[0]==="-"}isZero(){return be(this).isZero()}toNumber(){try{return be(this).toNumber()}catch{yn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return ua.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?uy||(uy=!0,ua.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?ua.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",E.errors.UNEXPECTED_ARGUMENT,{}):ua.throwError("BigNumber.toString does not accept parameters",E.errors.UNEXPECTED_ARGUMENT,{})),be(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof F)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new F(bd,Wr(e)):e.match(/^-?[0-9]+$/)?new F(bd,Wr(new Gr(e))):ua.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&yn("underflow","BigNumber.from",e),(e>=oy||e<=-oy)&&yn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(pn(t))return F.from(W(t));if(t)if(t.toHexString){let n=t.toHexString();if(typeof n=="string")return F.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(ie(n)||n[0]==="-"&&ie(n.substring(1))))return F.from(n)}return ua.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Wr(a){if(typeof a!="string")return Wr(a.toString(16));if(a[0]==="-")return a=a.substring(1),a[0]==="-"&&ua.throwArgumentError("invalid hex","value",a),a=Wr(a),a==="0x00"?a:"-"+a;if(a.substring(0,2)!=="0x"&&(a="0x"+a),a==="0x")return"0x00";for(a.length%2&&(a="0x0"+a.substring(2));a.length>4&&a.substring(0,4)==="0x00";)a="0x"+a.substring(4);return a}function Qt(a){return F.from(Wr(a))}function be(a){let e=F.from(a).toHexString();return e[0]==="-"?new Gr("-"+e.substring(3),16):new Gr(e.substring(2),16)}function yn(a,e,t){let n={fault:a,operation:e};return t!=null&&(n.value=t),ua.throwError(a,E.errors.NUMERIC_FAULT,n)}function gd(a){return new Gr(a,36).toString(16)}function Td(a){return new Gr(a,16).toString(36)}var Gt=new E(Zs),Kr={},yy=F.from(0),cy=F.from(-1);function fy(a,e,t,n){let i={fault:e,operation:t};return n!==void 0&&(i.value=n),Gt.throwError(a,E.errors.NUMERIC_FAULT,i)}var Jr="0";for(;Jr.length<256;)Jr+=Jr;function vd(a){if(typeof a!="number")try{a=F.from(a).toNumber()}catch{}return typeof a=="number"&&a>=0&&a<=256&&!(a%1)?"1"+Jr.substring(0,a):Gt.throwArgumentError("invalid decimal size","decimals",a)}function $i(a,e){e==null&&(e=0);let t=vd(e);a=F.from(a);let n=a.lt(yy);n&&(a=a.mul(cy));let i=a.mod(t).toString();for(;i.length2&&Gt.throwArgumentError("too many decimal points","value",a);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&fy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Gt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),n=r("width","number",n),i=r("decimals","number",i)}return n%8&&Gt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Gt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new da(Kr,t,n,i)}},ft=class{constructor(e,t,n,i){e!==Kr&&Gt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",E.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Gt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ft.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ft.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ft.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=cn(this._value,this.format.decimals),n=cn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(py.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(py.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Gt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=ft.from("1"+Jr.substring(0,e),this.format),i=c6.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Gt.throwArgumentError("invalid byte width","width",e);let t=F.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return me(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ly(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ft.fromString($i(e,t),da.from(n))}static fromString(e,t){t==null&&(t="fixed");let n=da.from(t),i=cn(e,n.decimals);!n.signed&&i.lt(yy)&&fy("unsigned value cannot be negative","overflow","value",e);let r=null;n.signed?r=i.toTwos(n.width).toHexString():(r=i.toHexString(),r=me(r,n.width/8));let s=$i(i,n.decimals);return new ft(Kr,r,s,n)}static fromBytes(e,t){t==null&&(t="fixed");let n=da.from(t);if(j(e).length>n.width/8)throw new Error("overflow");let i=F.from(e);n.signed&&(i=i.fromTwos(n.width));let r=i.toTwos((n.signed?0:1)+n.width).toHexString(),s=$i(i,n.decimals);return new ft(Kr,r,s,n)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(pn(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(n){if(n.code!==E.errors.INVALID_ARGUMENT)throw n}return Gt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},py=ft.from(1),c6=ft.from("0.5");var my="properties/5.7.0";var f6=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},eo=new E(my);function B(a,e,t){Object.defineProperty(a,e,{enumerable:!0,value:t,writable:!1})}function ht(a,e){for(let t=0;t<32;t++){if(a[e])return a[e];if(!a.prototype||typeof a.prototype!="object")break;a=Object.getPrototypeOf(a.prototype).constructor}return null}function Se(a){return f6(this,void 0,void 0,function*(){let e=Object.keys(a).map(n=>{let i=a[n];return Promise.resolve(i).then(r=>({key:n,value:r}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Qi(a,e){(!a||typeof a!="object")&&eo.throwArgumentError("invalid object","object",a),Object.keys(a).forEach(t=>{e[t]||eo.throwArgumentError("invalid object key - "+t,"transaction:"+t,a)})}function _e(a){let e={};for(let t in a)e[t]=a[t];return e}var m6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function hy(a){if(a==null||m6[typeof a])return!0;if(Array.isArray(a)||typeof a=="object"){if(!Object.isFrozen(a))return!1;let e=Object.keys(a);for(let t=0;tmt(e)));if(typeof a=="object"){let e={};for(let t in a){let n=a[t];n!==void 0&&B(e,t,mt(n))}return e}return eo.throwArgumentError(`Cannot deepCopy ${typeof a}`,"object",a)}function mt(a){return h6(a)}var an=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var zn="abi/5.7.0";var Te=new E(zn),li={},xy={calldata:!0,memory:!0,storage:!0},x6={calldata:!0,memory:!0};function to(a,e){if(a==="bytes"||a==="string"){if(xy[e])return!0}else if(a==="address"){if(e==="payable")return!0}else if((a.indexOf("[")>=0||a==="tuple")&&x6[e])return!0;return(xy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function b6(a,e){let t=a;function n(o){Te.throwArgumentError(`unexpected character at position ${o}`,"param",a)}a=a.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ge.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ge.full?", ":",")+")"):t+=this.type,e!==ge.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ge.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?yt.fromString(e,t):yt.fromObject(e)}static fromObject(e){return yt.isParamType(e)?e:new yt(li,{name:e.name||null,type:Yi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function n(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(b6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function $r(a,e){return v6(a).map(t=>yt.fromString(t,e))}var Kt=class{constructor(e,t){e!==li&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),no(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Kt.isFragment(e)?e:typeof e=="string"?Kt.fromString(e):Kt.fromObject(e)}static fromObject(e){if(Kt.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Wt.fromObject(e);case"constructor":return Lt.fromObject(e);case"error":return rn.fromObject(e);case"fallback":case"receive":return null}return Te.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Wt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Ut.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Lt.fromString(e.trim()):e.split(" ")[0]==="error"?rn.fromString(e.substring(5).trim()):Te.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},Wt=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?Wt.fromString(e):Wt.fromObject(e)}static fromObject(e){if(Wt.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:Qr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(yt.fromObject):[],type:"event"};return new Wt(li,t)}static fromString(e){let t=e.match(Yr);t||Te.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Te.warn("unknown modifier: "+i)}}),Wt.fromObject({name:t[1].trim(),anonymous:n,inputs:$r(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function gy(a,e){e.gas=null;let t=a.split("@");return t.length!==1?(t.length>2&&Te.throwArgumentError("invalid human-readable ABI signature","value",a),t[1].match(/^[0-9]+$/)||Te.throwArgumentError("invalid human-readable ABI signature gas","value",a),e.gas=F.from(t[1]),t[0]):a}function Ty(a,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",a.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function vy(a){let e={constant:!1,payable:!0,stateMutability:"payable"};return a.stateMutability!=null?(e.stateMutability=a.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",a.constant!=null&&!!a.constant!==e.constant&&Te.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",a),e.payable=e.stateMutability==="payable",a.payable!=null&&!!a.payable!==e.payable&&Te.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",a)):a.payable!=null?(e.payable=!!a.payable,a.constant==null&&!e.payable&&a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e.constant=!!a.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Te.throwArgumentError("cannot have constant payable function","value",a)):a.constant!=null?(e.constant=!!a.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):a.type!=="constructor"&&Te.throwArgumentError("unable to determine stateMutability","value",a),e}var Lt=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ge.sighash&&Te.throwError("cannot format a constructor for sighash",E.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Lt.fromString(e):Lt.fromObject(e)}static fromObject(e){if(Lt.isConstructorFragment(e))return e;e.type!=="constructor"&&Te.throwArgumentError("invalid constructor object","value",e);let t=vy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(yt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Lt(li,n)}static fromString(e){let t={type:"constructor"};e=gy(e,t);let n=e.match(Yr);return(!n||n[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=$r(n[2].trim(),!1),Ty(n[3].trim(),t),Lt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Ut=class extends Lt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;e.type!=="function"&&Te.throwArgumentError("invalid function object","value",e);let t=vy(e),n={type:e.type,name:Qr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(yt.fromObject):[],outputs:e.outputs?e.outputs.map(yt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?F.from(e.gas):null};return new Ut(li,n)}static fromString(e){let t={type:"function"};e=gy(e,t);let n=e.split(" returns ");n.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=n[0].match(Yr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Qr(t.name),t.inputs=$r(i[2],!1),Ty(i[3].trim(),t),n.length>1){let r=n[1].match(Yr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=$r(r[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function by(a){let e=a.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",a),a}var rn=class extends Kt{format(e){if(e||(e=ge.sighash),ge[e]||Te.throwArgumentError("invalid format type","format",e),e===ge.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ge.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?rn.fromString(e):rn.fromObject(e)}static fromObject(e){if(rn.isErrorFragment(e))return e;e.type!=="error"&&Te.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Qr(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return by(new rn(li,t))}static fromString(e){let t={type:"error"},n=e.match(Yr);return n||Te.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Qr(t.name),t.inputs=$r(n[2],!1),by(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Yi(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}var T6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Qr(a){return(!a||!a.match(T6))&&Te.throwArgumentError(`invalid identifier "${a}"`,"value",a),a}var Yr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function v6(a){a=a.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&wd.throwError("value out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=ye([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},yi=class{constructor(e,t,n,i){B(this,"_data",j(e)),B(this,"wordSize",t||32),B(this,"_coerceFunc",n),B(this,"allowLoose",i),this._offset=0}get data(){return W(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):yi.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:wd.throwError("data out-of-bounds",E.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new yi(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var _y=Mn(wy());function ce(a){return"0x"+_y.default.keccak_256(j(a))}var io={};Ki(io,{decode:()=>Xr,encode:()=>la});var ky="rlp/5.7.0";var Gn=new E(ky);function Ay(a){let e=[];for(;a;)e.unshift(a&255),a>>=8;return e}function Ey(a,e,t){let n=0;for(let i=0;ie+1+n&&Gn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Cy(a,e){if(a.length===0&&Gn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),a[e]>=248){let t=a[e]-247;e+1+t>a.length&&Gn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let n=Ey(a,e+1,t);return e+1+t+n>a.length&&Gn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),My(a,e,e+1+t,t+n)}else if(a[e]>=192){let t=a[e]-192;return e+1+t>a.length&&Gn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),My(a,e,e+1,t)}else if(a[e]>=184){let t=a[e]-183;e+1+t>a.length&&Gn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let n=Ey(a,e+1,t);e+1+t+n>a.length&&Gn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=W(a.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(a[e]>=128){let t=a[e]-128;e+1+t>a.length&&Gn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let n=W(a.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:W(a[e])}}function Xr(a){let e=j(a),t=Cy(e,0);return t.consumed!==e.length&&Gn.throwArgumentError("invalid rlp data","data",a),t.result}var Sy="address/5.7.0";var Ra=new E(Sy);function Ry(a){ie(a,20)||Ra.throwArgumentError("invalid address","address",a),a=a.toLowerCase();let e=a.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=j(ce(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var w6=9007199254740991;function _6(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10}var _d={};for(let a=0;a<10;a++)_d[String(a)]=String(a);for(let a=0;a<26;a++)_d[String.fromCharCode(65+a)]=String(10+a);var Py=Math.floor(_6(w6));function Ny(a){a=a.toUpperCase(),a=a.substring(4)+a.substring(0,2)+"00";let e=a.split("").map(n=>_d[n]).join("");for(;e.length>=Py;){let n=e.substring(0,Py);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function fe(a){let e=null;if(typeof a!="string"&&Ra.throwArgumentError("invalid address","address",a),a.match(/^(0x)?[0-9a-fA-F]{40}$/))a.substring(0,2)!=="0x"&&(a="0x"+a),e=Ry(a),a.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==a&&Ra.throwArgumentError("bad address checksum","address",a);else if(a.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(a.substring(2,4)!==Ny(a)&&Ra.throwArgumentError("bad icap checksum","address",a),e=gd(a.substring(4));e.length<40;)e="0"+e;e=Ry("0x"+e)}else Ra.throwArgumentError("invalid address","address",a);return e}function Dy(a){try{return fe(a),!0}catch{}return!1}function Oy(a){let e=Td(fe(a).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Ny("XE00"+e)+e}function ci(a){let e=null;try{e=fe(a.from)}catch{Ra.throwArgumentError("missing from address","transaction",a)}let t=nn(j(F.from(a.nonce).toHexString()));return fe(Ce(ce(la([e,t])),12))}function By(a,e,t){return Ft(e)!==32&&Ra.throwArgumentError("salt must be 32 bytes","salt",e),Ft(t)!==32&&Ra.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),fe(Ce(ce(ye(["0xff",fe(a),e,t])),12))}var ro=class extends Et{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=fe(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return fe(me(e.readValue().toHexString(),20))}};var so=class extends Et{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Zi=new E(zn);function kd(a,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(p=>{let c=p.localName;return c||Zi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[c]&&Zi.throwError("cannot encode object for signature with duplicate names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[c]=!0,t[c]})}else Zi.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&Zi.throwArgumentError("types/value length mismatch","tuple",t);let i=new pi(a.wordSize),r=new pi(a.wordSize),s=[];e.forEach((l,p)=>{let c=n[p];if(l.dynamic){let x=r.length;l.encode(r,c);let C=i.writeUpdatableValue();s.push(_=>{C(_+x)})}else l.encode(i,c)}),s.forEach(l=>{l(i.length)});let o=a.appendWriter(i);return o+=a.appendWriter(r),o}function Ad(a,e){let t=[],n=a.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=a.readValue(),l=n.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===E.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(a)}catch(o){if(o.code===E.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var oo=class extends Et{constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,n,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&Zi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;ico,EtherSymbol:()=>jy,HashZero:()=>tr,MaxInt256:()=>Vy,MaxUint256:()=>ho,MinInt256:()=>Uy,NegativeOne:()=>fo,One:()=>mo,Two:()=>Fy,WeiPerEther:()=>Ly,Zero:()=>er});var co="0x0000000000000000000000000000000000000000";var fo=F.from(-1),er=F.from(0),mo=F.from(1),Fy=F.from(2),Ly=F.from("1000000000000000000"),ho=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Uy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Vy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var tr="0x0000000000000000000000000000000000000000000000000000000000000000";var jy="\u039E";var xo=class extends Et{constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=F.from(t),i=ho.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(n.gt(r)||n.lt(r.add(mo).mul(fo)))&&this._throwError("value out-of-bounds",t)}else(n.lt(er)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var Hy="strings/5.7.0";var qy=new E(Hy),Jt;(function(a){a.current="",a.NFC="NFC",a.NFD="NFD",a.NFKC="NFKC",a.NFKD="NFKD"})(Jt||(Jt={}));var Vt;(function(a){a.UNEXPECTED_CONTINUE="unexpected continuation byte",a.BAD_PREFIX="bad codepoint prefix",a.OVERRUN="string overrun",a.MISSING_CONTINUE="missing continuation byte",a.OUT_OF_RANGE="out of UTF-8 range",a.UTF16_SURROGATE="UTF-16 surrogate",a.OVERLONG="overlong representation"})(Vt||(Vt={}));function k6(a,e,t,n,i){return qy.throwArgumentError(`invalid codepoint at offset ${e}; ${a}`,"bytes",t)}function zy(a,e,t,n,i){if(a===Vt.BAD_PREFIX||a===Vt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return a===Vt.OVERRUN?t.length-e-1:0}function A6(a,e,t,n,i){return a===Vt.OVERLONG?(n.push(i),0):(n.push(65533),zy(a,e,t,n,i))}var bo=Object.freeze({error:k6,ignore:zy,replace:A6});function Md(a,e){e==null&&(e=bo.error),a=j(a);let t=[],n=0;for(;n>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?n+=e(Vt.UNEXPECTED_CONTINUE,n-1,a,t):n+=e(Vt.BAD_PREFIX,n-1,a,t);continue}if(n-1+r>=a.length){n+=e(Vt.OVERRUN,n-1,a,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){n+=e(Vt.OUT_OF_RANGE,n-1-r,a,t,o);continue}if(o>=55296&&o<=57343){n+=e(Vt.UTF16_SURROGATE,n-1-r,a,t,o);continue}if(o<=s){n+=e(Vt.OVERLONG,n-1-r,a,t,o);continue}t.push(o)}}return t}function ve(a,e=Jt.current){e!=Jt.current&&(qy.checkNormalize(),a=a.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let r=a.charCodeAt(n);if(n>=a.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return j(t)}function Ed(a){let e="0000"+a.toString(16);return"\\u"+e.substring(e.length-4)}function Id(a,e){return'"'+Md(a,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Ed(t):(t-=65536,Ed((t>>10&1023)+55296)+Ed((t&1023)+56320))}).join("")+'"'}function go(a){return a.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Yt(a,e){return go(Md(a,e))}function Pa(a,e=Jt.current){return Md(ve(a,e))}function Cd(a){let e=ve(a);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,tr]).slice(0,32))}function Sd(a){let e=j(a);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Yt(e.slice(0,t))}function E6(a){if(a.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),n[t]=e(r[1])}),n}function Gy(a){let e=0;return a.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Pd(a,e){let t=0;for(let n=0;n=t&&a<=t+i.h&&(a-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(a-t)!==-1)continue;return i}}return null}var M6=Gy("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),I6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(a=>parseInt(a,16)),C6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],S6=Rd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),R6=Rd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),P6=Rd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",E6),N6=Gy("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function D6(a){return a.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function O6(a){return!!Pd(a,M6)}function B6(a){let e=Pd(a,C6);if(e)return[a+e.s];let t=S6[a];if(t)return t;let n=R6[a];if(n)return[a+n[0]];let i=P6[a];return i||null}function F6(a){return!!Pd(a,N6)}function Nd(a){if(a.match(/^[a-z0-9-]*$/i)&&a.length<=59)return a.toLowerCase();let e=Pa(a);e=D6(e.map(n=>{if(I6.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=B6(n);return i||[n]})),e=Pa(go(e),Jt.NFKC),e.forEach(n=>{if(F6(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(O6(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=go(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var To=class extends Zr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Yt(super.decode(e))}};var fi=class extends Et{constructor(e,t){let n=!1,i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let r=i.localName;return r&&(n[r]||(n[r]=0),n[r]++),n},{});return this.coders.forEach((n,i)=>{let r=n.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return kd(e,this.coders,t)}decode(e){return e.coerce(this.name,Ad(e,this.coders))}};var vo=new E(zn),L6=new RegExp(/^bytes([0-9]*)$/),U6=new RegExp(/^(u?int)([0-9]*)$/),nr=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ro(e.name);case"bool":return new uo(e.name);case"string":return new To(e.name);case"bytes":return new lo(e.name);case"array":return new oo(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new fi((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new yo(e.name)}let t=e.type.match(U6);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&vo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new xo(n/8,t[1]==="int",e.name)}if(t=e.type.match(L6),t){let n=parseInt(t[1]);return(n===0||n>32)&&vo.throwArgumentError("invalid bytes length","param",e),new po(n,e.name)}return vo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new yi(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new pi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(yt.from(i)));return new fi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&vo.throwError("types/values length mismatch",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(s=>this._getCoder(yt.from(s))),i=new fi(n,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,n){let i=e.map(s=>this._getCoder(yt.from(s)));return new fi(i,"_").decode(this._getReader(j(t),n))}},es=new nr;function sn(a){return ce(ve(a))}var wo="hash/5.7.0";var Dd={};Ki(Dd,{decode:()=>ar,encode:()=>ir});function ar(a){a=atob(a);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(a,e),t}function V6(a){let e={};for(let t=0;t>--l&1}let x=31,C=Math.pow(2,x),_=C>>>1,v=_>>1,S=C-1,L=0;for(let J=0;J1;){let N=$+de>>>1;J>>1|c(),T=T<<1^_,R=(R^_)<<1|_|1;U=T,H=1+R-T}let M=n-4;return O.map(J=>{switch(J-M){case 3:return M+65792+(a[o++]<<16|a[o++]<<8|a[o++]);case 2:return M+256+(a[o++]<<8|a[o++]);case 1:return M+a[o++];default:return J-1}})}function H6(a){let e=0;return()=>a[e++]}function Jy(a){return H6(j6(a))}function q6(a){return a&1?~a>>1:a>>1}function z6(a,e){let t=Array(a);for(let n=0;ne[s]):t}function $y(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(K6(t,a))}for(;;){let t=a()-1;if(t<0)break;e.push(J6(t,a))}return V6(Ky(e))}function W6(a){let e=[];for(;;){let t=a();if(t==0)break;e.push(t)}return e}function Qy(a,e,t){let n=Array(a).fill(void 0).map(()=>[]);for(let i=0;in[s].push(r));return n}function K6(a,e){let t=1+e(),n=e(),i=W6(e),r=Qy(i.length,1+a,e);return Ky(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((c,x)=>{let C=x*n;return[l+x*t,p.map(_=>_+C)]})}))}function J6(a,e){let t=1+e();return Qy(t,1+a,e).map(i=>[i[0],i.slice(1)])}function Yy(a){let e=ts(a).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let p=ts(a,e);if(p.length==0)break;n.push({set:new Set(p),node:t()})}n.sort((p,c)=>c.set.size-p.set.size);let i=a(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:n,valid:r,fe0f:s,save:o,check:l}}}function Xy(){return Jy(ar("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var _o=Xy(),$6=new Set(ts(_o)),Q6=new Set(ts(_o)),Y6=$y(_o),X6=Yy(_o),Zy=45,e0=95;function t0(a){return Pa(a)}function Z6(a){return a.filter(e=>e!=65039)}function n0(a){for(let e of a.split(".")){let t=t0(e);try{for(let n=t.lastIndexOf(e0)-1;n>=0;n--)if(t[n]!==e0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===Zy&&t[3]===Zy)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return a}function a0(a){return n0(e2(a,Z6))}function e2(a,e){let t=t0(a).reverse(),n=[];for(;t.length;){let i=n2(t);if(i){n.push(...e(i));continue}let r=t.pop();if($6.has(r)){n.push(r);continue}if(Q6.has(r))continue;let s=Y6[r];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return n0(t2(String.fromCodePoint(...n)))}function t2(a){return a.normalize("NFC")}function n2(a,e){var t;let n=X6,i,r,s=[],o=a.length;for(e&&(e.length=0);o;){let l=a[--o];if(n=(t=n.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)r=l;else if(n.check&&l===r)break;s.push(l),n.fe0f&&(s.push(65039),o>0&&a[o-1]==65039&&o--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...a.slice(o).reverse()),a.length=o)}return i}var a2=new E(wo),r0=new Uint8Array(32);r0.fill(0);function i0(a){if(a.length===0)throw new Error("invalid ENS name; empty component");return a}function Od(a){let e=ve(a0(a)),t=[];if(a.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(i0(e.slice(n))),t}function Bd(a){try{return Od(a).length!==0}catch{}return!1}function Na(a){typeof a!="string"&&a2.throwArgumentError("invalid ENS name; not a string","name",a);let e=r0,t=Od(a);for(;t.length;)e=ce(ye([e,ce(t.pop())]));return W(e)}function ns(a){return W(ye(Od(a).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var s0=`Ethereum Signed Message: +`;function rr(a){return typeof a=="string"&&(a=ve(a)),ce(ye([ve(s0),ve(String(a.length)),a]))}var i2=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},bt=new E(wo),l0=new Uint8Array(32);l0.fill(0);var r2=F.from(-1),p0=F.from(0),y0=F.from(1),s2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function o2(a){let e=j(a),t=e.length%32;return t?At([e,l0.slice(t)]):W(e)}var u2=me(y0.toHexString(),32),d2=me(p0.toHexString(),32),o0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Fd=["name","version","chainId","verifyingContract","salt"];function u0(a){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(a)}`,`domain.${a}`,e),e}}var l2={name:u0("name"),version:u0("version"),chainId:function(a){try{return F.from(a).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",a)},verifyingContract:function(a){try{return fe(a).toLowerCase()}catch{}return bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",a)},salt:function(a){try{let e=j(a);if(e.length!==32)throw new Error("bad length");return W(e)}catch{}return bt.throwArgumentError('invalid domain value "salt"',"domain.salt",a)}};function Ld(a){{let e=a.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&bt.throwArgumentError("invalid numeric width","type",a);let i=s2.mask(t?n-1:n),r=t?i.add(y0).mul(r2):p0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${a}`,"value",s),me(o.toTwos(256).toHexString(),32)}}}{let e=a.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&bt.throwArgumentError("invalid bytes width","type",a),function(n){return j(n).length!==t&&bt.throwArgumentError(`invalid length for ${a}`,"value",n),o2(n)}}}switch(a){case"address":return function(e){return me(fe(e),32)};case"bool":return function(e){return e?u2:d2};case"bytes":return function(e){return ce(e)};case"string":return function(e){return sn(e)}}return null}function d0(a,e){return`${a}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(e))),B(this,"_encoderCache",{}),B(this,"_types",{});let t={},n={},i={};Object.keys(e).forEach(o=>{t[o]={},n[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&bt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let c=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Ld(c)&&(n[c]||bt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),t[o][c]=!0)})}let r=Object.keys(n).filter(o=>n[o].length===0);r.length===0?bt.throwArgumentError("missing primary type","types",e):r.length>1&&bt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),B(this,"primaryType",r[0]);function s(o,l){l[o]&&bt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!n[p]||(s(p,l),Object.keys(l).forEach(c=>{i[c][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=d0(o,e[o])+l.map(p=>d0(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Ld(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(ce)),ce(At(l))}}let n=this.types[e];if(n){let i=sn(this._types[e]);return r=>{let s=n.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?ce(p):p});return s.unshift(i),At(s)}}return bt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||bt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ce(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Ld(e))return n(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,n))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],n),s),{}):bt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new gt(e)}static getPrimaryType(e){return gt.from(e).primaryType}static hashStruct(e,t,n){return gt.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){let i=o0[n];i||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Fd.indexOf(n.name)-Fd.indexOf(i.name)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return At(["0x1901",gt.hashDomain(e),gt.from(t).hash(n)])}static hash(e,t,n){return ce(gt.encode(e,t,n))}static resolveNames(e,t,n,i){return i2(this,void 0,void 0,function*(){e=_e(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=gt.from(t);s.visit(n,(o,l)=>(o==="address"&&!ie(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),n=s.visit(n,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:n}})}static getPayload(e,t,n){gt.hashDomain(e);let i={},r=[];Fd.forEach(l=>{let p=e[l];p!=null&&(i[l]=l2[l](p),r.push({name:l,type:o0[l]}))});let s=gt.from(t),o=_e(t);return o.EIP712Domain?bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,p)=>{if(l.match(/^bytes(\d*)/))return W(j(p));if(l.match(/^u?int/))return F.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(zn);var sr=class extends an{},or=class extends an{},Ud=class extends an{},pa=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},p2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function c0(a,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${a}`);return t.error=e,t}var Da=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,B(this,"fragments",t.map(n=>Kt.from(n)).filter(n=>n!=null)),B(this,"_abiCoder",ht(new.target,"getAbiCoder")()),B(this,"functions",{}),B(this,"errors",{}),B(this,"events",{}),B(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Tt.warn("duplicate definition - constructor");return}B(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=n.format();if(i[r]){Tt.warn("duplicate definition - "+r);return}i[r]=n}),this.deploy||B(this,"deploy",Lt.from({payable:!1,type:"constructor"})),B(this,"_isInterface",!0)}format(e){e||(e=ge.full),e===ge.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(n=>n.format(e));return e===ge.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return es}static getAddress(e){return fe(e)}static getSighash(e){return Ce(sn(e.format()),0,4)}static getEventTopic(e){return sn(e.format())}getFunction(e){if(ie(e)){for(let n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}let t=this.functions[Ut.fromString(e).format()];return t||Tt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ie(e)){let n=e.toLowerCase();for(let i in this.events)if(n===this.getEventTopic(i))return this.events[i];Tt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}let t=this.events[Wt.fromString(e).format()];return t||Tt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ie(e)){let n=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===n(r))return this.errors[i]}Tt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let n=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}let t=this.errors[Ut.fromString(e).format()];return t||Tt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return ht(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ht(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t);return W(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",W(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(ye([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=j(t),i=null,r="",s=null,o=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{let p=W(n.slice(0,4)),c=p2[p];if(c)s=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,l=c.signature,c.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let x=this.getError(p);s=this._abiCoder.decode(x.inputs,n.slice(4)),o=x.name,l=x.format()}catch{}break}}return Tt.throwError("call revert exception"+r,E.errors.CALL_EXCEPTION,{method:e.format(),data:W(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),W(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),E.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?sn(s):r.type==="bytes"?ce(W(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=F.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),me(W(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&&Tt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?Tt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?n.push(r.map(l=>i(o,l))):n.push(i(o,r))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let n=[],i=[],r=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Tt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")n.push(sn(l));else if(s.type==="bytes")n.push(ce(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ie(n[0],32)||n[0].toLowerCase()!==C)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:n[0]}),n=n.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((C,_)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(r.push(C),s.push(!1))});let o=n!=null?this._abiCoder.decode(i,ye(n)):null,l=this._abiCoder.decode(r,t,!0),p=[],c=0,x=0;e.inputs.forEach((C,_)=>{if(C.indexed)if(o==null)p[_]=new pa({_isIndexed:!0,hash:null});else if(s[_])p[_]=new pa({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[c++]}catch(v){p[_]=v}if(C.name&&p[C.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,C.name,{enumerable:!0,get:()=>{throw c0(`property ${JSON.stringify(C.name)}`,v)}}):p[C.name]=v}});for(let C=0;C{throw c0(`index ${C}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new or({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:F.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new sr({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=W(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new Ud({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var f0="abstract-provider/5.7.0";var y2=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},c2=new E(f0),ko=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){c2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return y2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Se({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),n=null,i=null,r=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,r=F.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var m0="abstract-signer/5.7.0";var In=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},fn=new E(m0),f2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],m2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Pt=class{constructor(){fn.checkAbstract(new.target,Pt),B(this,"_isSigner",!0)}getBalance(e){return In(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return In(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return In(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Se(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return In(this,void 0,void 0,function*(){this._checkProvider("call");let n=yield Se(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return In(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return In(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return In(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return In(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return In(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let n in e)f2.indexOf(n)===-1&&fn.throwArgumentError("invalid transaction key: "+n,"transaction",e);let t=_e(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&fn.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return In(this,void 0,void 0,function*(){let t=yield Se(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>In(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&fn.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?fn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&fn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&fn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):fn.throwError("failed to get consistent fee data",E.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(m2.indexOf(i.code)>=0)throw i;return fn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&fn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Se(t)})}_checkProvider(e){this.provider||fn.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},ya=class extends Pt{constructor(e,t){super(),B(this,"address",e),B(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{fn.throwError(e,E.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ya(this.address,e)}};var pe=Mn(cd()),Xn=Mn($d());function mr(a,e,t){return t={path:e,exports:{},require:function(n,i){return L5(n,i??t.path)}},a(t,t.exports),t.exports}function L5(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Zd=Z0;function Z0(a,e){if(!a)throw new Error(e||"Assertion failed")}Z0.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Pn=mr(function(a,e){"use strict";var t=e;function n(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,C=c&255;x?l.push(x,C):l.push(C)}return l}t.toArray=n;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(C>>1)-1?S=(C>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=n;function i(l,p){var c=[[],[]];l=l.clone(),p=p.clone();for(var x=0,C=0,_;l.cmpn(-x)>0||p.cmpn(-C)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+C&3;v===3&&(v=-1),S===3&&(S=-1);var L;(v&1)===0?L=0:(_=l.andln(7)+x&7,(_===3||_===5)&&S===2?L=-v:L=v),c[0].push(L);var O;(S&1)===0?O=0:(_=p.andln(7)+C&7,(_===3||_===5)&&v===2?O=-S:O=S),c[1].push(O),2*x===L+1&&(x=1-x),2*C===O+1&&(C=1-C),l.iushrn(1),p.iushrn(1)}return c}t.getJSF=i;function r(l,p,c){var x="_"+p;l.prototype[p]=function(){return this[x]!==void 0?this[x]:this[x]=c.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new pe.default(l,"hex","le")}t.intFromLE=o}),Co=on.getNAF,U5=on.getJSF,So=on.assert;function Fa(a,e){this.type=a,this.p=new pe.default(e.p,16),this.red=e.prime?pe.default.red(e.prime):pe.default.mont(this.p),this.zero=new pe.default(0).toRed(this.red),this.one=new pe.default(1).toRed(this.red),this.two=new pe.default(2).toRed(this.red),this.n=e.n&&new pe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var hi=Fa;Fa.prototype.point=function(){throw new Error("Not implemented")};Fa.prototype.validate=function(){throw new Error("Not implemented")};Fa.prototype._fixedNafMul=function(e,t){So(e.precomputed);var n=e._getDoubles(),i=Co(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var c=this.jpoint(null,null,null),x=this.jpoint(null,null,null),C=r;C>0;C--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var c=s[l];So(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(r[c-1>>1]):o=o.mixedAdd(r[-c-1>>1].neg()):c>0?o=o.add(r[c-1>>1]):o=o.add(r[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Fa.prototype._wnafMulAdd=function(e,t,n,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,c,x,C;for(c=0;c=1;c-=2){var v=c-1,S=c;if(s[v]!==1||s[S]!==1){l[v]=Co(n[v],s[v],this._bitLength),l[S]=Co(n[S],s[S],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[S].length,p);continue}var L=[t[v],null,null,t[S]];t[v].y.cmp(t[S].y)===0?(L[1]=t[v].add(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg())):t[v].y.cmp(t[S].y.redNeg())===0?(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].add(t[S].neg())):(L[1]=t[v].toJ().mixedAdd(t[S]),L[2]=t[v].toJ().mixedAdd(t[S].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=U5(n[v],n[S]);for(p=Math.max(U[0].length,p),l[v]=new Array(p),l[S]=new Array(p),x=0;x=0;c--){for(var de=0;c>=0;){var T=!0;for(x=0;x=0&&de++,J=J.dblp(de),c<0)break;for(x=0;x0?C=o[x][R-1>>1]:R<0&&(C=o[x][-R-1>>1].neg()),C.type==="affine"?J=J.mixedAdd(C):J=J.add(C))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step):!1};hn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r=0&&(_=p,v=c),x.negative&&(x=x.neg(),C=C.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:C},{a:_,b:v}]};xn.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),l=s.mul(i.a),p=r.mul(n.b),c=s.mul(i.b),x=e.sub(o).sub(l),C=p.add(c).neg();return{k1:x,k2:C}};xn.prototype.pointFromX=function(e,t){e=new pe.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};xn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(r).cmpn(0)===0};xn.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};It.prototype.isInfinity=function(){return this.inf};It.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};It.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};It.prototype.getX=function(){return this.x.fromRed()};It.prototype.getY=function(){return this.y.fromRed()};It.prototype.mul=function(e){return e=new pe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};It.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};It.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};It.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};It.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};It.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Dt(a,e,t,n){hi.BasePoint.call(this,a,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new pe.default(0)):(this.x=new pe.default(e,16),this.y=new pe.default(t,16),this.z=new pe.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}el(Dt,hi.BasePoint);xn.prototype.jpoint=function(e,t,n){return new Dt(this,e,t,n)};Dt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};Dt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Dt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),x=c.redMul(l),C=i.redMul(c),_=p.redSqr().redIAdd(x).redISub(C).redISub(C),v=p.redMul(C.redISub(_)).redISub(s.redMul(x)),S=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(_,v,S)};Dt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),c=p.redMul(o),x=n.redMul(p),C=l.redSqr().redIAdd(c).redISub(x).redISub(x),_=l.redMul(x.redISub(C)).redISub(r.redMul(c)),v=this.z.redMul(o);return this.curve.jpoint(C,_,v)};Dt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Dt.prototype.inspect=function(){return this.isInfinity()?"":""};Dt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Mo=mr(function(a,e){"use strict";var t=e;t.base=hi,t.short=j5,t.mont=null,t.edwards=null}),Io=mr(function(a,e){"use strict";var t=e,n=on.assert;function i(o){o.type==="short"?this.curve=new Mo.short(o):o.type==="edwards"?this.curve=new Mo.edwards(o):this.curve=new Mo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Xn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Xn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Xn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Xn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Xn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Xn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ba(a){if(!(this instanceof Ba))return new Ba(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Pn.toArray(a.entropy,a.entropyEnc||"hex"),t=Pn.toArray(a.nonce,a.nonceEnc||"hex"),n=Pn.toArray(a.pers,a.persEnc||"hex");Zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var ec=Ba;Ba.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ba.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Pn.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length"};var H5=on.assert;function Ro(a,e){if(a instanceof Ro)return a;this._importDER(a,e)||(H5(a.r&&a.s,"Signature without r or s"),this.r=new pe.default(a.r,16),this.s=new pe.default(a.s,16),a.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=a.recoveryParam)}var Po=Ro;function q5(){this.place=0}function Qd(a,e){var t=a[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function X0(a){for(var e=0,t=a.length-1;!a[e]&&!(a[e+1]&128)&&e>>3);for(a.push(t|128);--t;)a.push(e>>>(t<<3)&255);a.push(e)}Ro.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=X0(t),n=X0(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Yd(i,t.length),i=i.concat(t),i.push(2),Yd(i,n.length);var r=i.concat(n),s=[48];return Yd(s,r.length),s=s.concat(r),on.encode(s,e)};var z5=function(){throw new Error("unsupported")},tc=on.assert;function mn(a){if(!(this instanceof mn))return new mn(a);typeof a=="string"&&(tc(Object.prototype.hasOwnProperty.call(Io,a),"Unknown curve "+a),a=Io[a]),a instanceof Io.PresetCurve&&(a={curve:a}),this.curve=a.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=a.curve.g,this.g.precompute(a.curve.n.bitLength()+1),this.hash=a.hash||a.curve.hash}var G5=mn;mn.prototype.keyPair=function(e){return new tl(this,e)};mn.prototype.keyFromPrivate=function(e,t){return tl.fromPrivate(this,e,t)};mn.prototype.keyFromPublic=function(e,t){return tl.fromPublic(this,e,t)};mn.prototype.genKeyPair=function(e){e||(e={});for(var t=new ec({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||z5(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new pe.default(2));;){var r=new pe.default(t.generate(n));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};mn.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};mn.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new pe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new ec({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new pe.default(1)),c=0;;c++){var x=i.k?i.k(c):new pe.default(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(p)>=0)){var C=this.g.mul(x);if(!C.isInfinity()){var _=C.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var S=x.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var L=(C.getY().isOdd()?1:0)|(_.cmp(v)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),L^=1),new Po({r:v,s:S,recoveryParam:L})}}}}}};mn.prototype.verify=function(e,t,n,i){e=this._truncateToN(new pe.default(e,16)),n=this.keyFromPublic(n,i),t=new Po(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,n.getPublic(),p),c.isInfinity()?!1:c.eqXToP(r)):(c=this.g.mulAdd(l,n.getPublic(),p),c.isInfinity()?!1:c.getX().umod(this.n).cmp(r)===0)};mn.prototype.recoverPubKey=function(a,e,t,n){tc((3&t)===t,"The recovery param is more than two bits"),e=new Po(e,n);var i=this.n,r=new pe.default(a),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var c=e.r.invm(i),x=i.sub(r).mul(c).umod(i),C=o.mul(c).umod(i);return this.g.mulAdd(x,s,C)};mn.prototype.getKeyRecoveryParam=function(a,e,t,n){if(e=new Po(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(a,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var W5=mr(function(a,e){"use strict";var t=e;t.version="6.5.4",t.utils=on,t.rand=function(){throw new Error("unsupported")},t.curve=Mo,t.curves=Io,t.ec=G5,t.eddsa=null}),nc=W5.ec;var ac="signing-key/5.7.0";var al=new E(ac),nl=null;function Zn(){return nl||(nl=new nc("secp256k1")),nl}var bn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&al.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Zn().keyFromPrivate(j(this.privateKey));B(this,"publicKey","0x"+t.getPublic(!1,"hex")),B(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),B(this,"_isSigningKey",!0)}_addPoint(e){let t=Zn().keyFromPublic(j(this.publicKey)),n=Zn().keyFromPublic(j(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let t=Zn().keyFromPrivate(j(this.privateKey)),n=j(e);n.length!==32&&al.throwArgumentError("bad digest length","digest",e);let i=t.sign(n,{canonical:!0});return qn({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Zn().keyFromPrivate(j(this.privateKey)),n=Zn().keyFromPublic(j(rs(e)));return me("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function No(a,e){let t=qn(e),n={r:j(t.r),s:j(t.s)};return"0x"+Zn().recoverPubKey(j(a),n,t.recoveryParam).encode("hex",!1)}function rs(a,e){let t=j(a);if(t.length===32){let n=new bn(t);return e?"0x"+Zn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?W(t):"0x"+Zn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Zn().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return al.throwArgumentError("invalid public or private key","key","[REDACTED]")}var ic="transactions/5.7.0";var qt=new E(ic),Do;(function(a){a[a.legacy=0]="legacy",a[a.eip2930=1]="eip2930",a[a.eip1559=2]="eip1559"})(Do||(Do={}));function rl(a){return a==="0x"?null:fe(a)}function Ht(a){return a==="0x"?er:F.from(a)}var K5=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],J5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function gn(a){let e=rs(a);return fe(Ce(ce(Ce(e,1)),12))}function xi(a,e){return gn(No(j(a),e))}function un(a,e){let t=nn(F.from(a).toHexString());return t.length>32&&qt.throwArgumentError("invalid length for "+e,"transaction:"+e,a),t}function il(a,e){return{address:fe(a),storageKeys:(e||[]).map((t,n)=>(Ft(t)!==32&&qt.throwArgumentError("invalid access list storageKey",`accessList[${a}:${n}]`,t),t.toLowerCase()))}}function dn(a){if(Array.isArray(a))return a.map((t,n)=>Array.isArray(t)?(t.length>2&&qt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),il(t[0],t[1])):il(t.address,t.storageKeys));let e=Object.keys(a).map(t=>{let n=a[t].reduce((i,r)=>(i[r]=!0,i),{});return il(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function rc(a){return dn(a).map(e=>[e.address,e.storageKeys])}function sc(a,e){if(a.gasPrice!=null){let n=F.from(a.gasPrice),i=F.from(a.maxFeePerGas||0);n.eq(i)||qt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}let t=[un(a.chainId||0,"chainId"),un(a.nonce||0,"nonce"),un(a.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(a.maxFeePerGas||0,"maxFeePerGas"),un(a.gasLimit||0,"gasLimit"),a.to!=null?fe(a.to):"0x",un(a.value||0,"value"),a.data||"0x",rc(a.accessList||[])];if(e){let n=qn(e);t.push(un(n.recoveryParam,"recoveryParam")),t.push(nn(n.r)),t.push(nn(n.s))}return At(["0x02",la(t)])}function oc(a,e){let t=[un(a.chainId||0,"chainId"),un(a.nonce||0,"nonce"),un(a.gasPrice||0,"gasPrice"),un(a.gasLimit||0,"gasLimit"),a.to!=null?fe(a.to):"0x",un(a.value||0,"value"),a.data||"0x",rc(a.accessList||[])];if(e){let n=qn(e);t.push(un(n.recoveryParam,"recoveryParam")),t.push(nn(n.r)),t.push(nn(n.s))}return At(["0x01",la(t)])}function $5(a,e){Qi(a,J5);let t=[];K5.forEach(function(s){let o=a[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(W(o,l)),s.length&&o.length!==s.length&&o.length>0&&qt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=nn(o),o.length>s.maxLength&&qt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(W(o))});let n=0;if(a.chainId!=null?(n=a.chainId,typeof n!="number"&&qt.throwArgumentError("invalid transaction.chainId","transaction",a)):e&&!oa(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(W(n)),t.push("0x"),t.push("0x")),!e)return la(t);let i=qn(e),r=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),r+=n*2+8,i.v>28&&i.v!==r&&qt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&qt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(W(r)),t.push(nn(j(i.r))),t.push(nn(j(i.s))),la(t)}function ss(a,e){if(a.type==null||a.type===0)return a.accessList!=null&&qt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",a),$5(a,e);switch(a.type){case 1:return oc(a,e);case 2:return sc(a,e);default:break}return qt.throwError(`unsupported transaction type: ${a.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:a.type})}function uc(a,e,t){try{let n=Ht(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");a.v=n}catch{qt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}a.r=me(e[1],32),a.s=me(e[2],32);try{let n=ce(t(a));a.from=xi(n,{r:a.r,s:a.s,recoveryParam:a.v})}catch{}}function Q5(a){let e=Xr(a.slice(1));e.length!==9&&e.length!==12&&qt.throwArgumentError("invalid component count for transaction type: 2","payload",W(a));let t=Ht(e[2]),n=Ht(e[3]),i={type:2,chainId:Ht(e[0]).toNumber(),nonce:Ht(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:Ht(e[4]),to:rl(e[5]),value:Ht(e[6]),data:e[7],accessList:dn(e[8])};return e.length===9||(i.hash=ce(a),uc(i,e.slice(9),sc)),i}function Y5(a){let e=Xr(a.slice(1));e.length!==8&&e.length!==11&&qt.throwArgumentError("invalid component count for transaction type: 1","payload",W(a));let t={type:1,chainId:Ht(e[0]).toNumber(),nonce:Ht(e[1]).toNumber(),gasPrice:Ht(e[2]),gasLimit:Ht(e[3]),to:rl(e[4]),value:Ht(e[5]),data:e[6],accessList:dn(e[7])};return e.length===8||(t.hash=ce(a),uc(t,e.slice(8),oc)),t}function X5(a){let e=Xr(a);e.length!==9&&e.length!==6&&qt.throwArgumentError("invalid raw transaction","rawTransaction",a);let t={nonce:Ht(e[0]).toNumber(),gasPrice:Ht(e[1]),gasLimit:Ht(e[2]),to:rl(e[3]),value:Ht(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=F.from(e[6]).toNumber()}catch{return t}if(t.r=me(e[7],32),t.s=me(e[8],32),F.from(t.r).isZero()&&F.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(W(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);let r=ce(la(i));try{t.from=xi(r,{r:W(t.r),s:W(t.s),recoveryParam:n})}catch{}t.hash=ce(a)}return t.type=null,t}function Oo(a){let e=j(a);if(e[0]>127)return X5(e);switch(e[0]){case 1:return Y5(e);case 2:return Q5(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var dc="contracts/5.7.0";var La=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Re=new E(dc),Z5={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Bo(a,e){return La(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Re.throwArgumentError("invalid address or ENS name","name",t);try{return fe(t)}catch{}a||Re.throwError("a provider or signer is needed to resolve ENS names",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield a.resolveName(t);return n==null&&Re.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function os(a,e,t){return La(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>os(a,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Bo(a,e):t.type==="tuple"?yield os(a,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>os(a,n,t.arrayChildren))):Promise.reject(Re.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Uo(a,e,t){return La(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=_e(t.pop())),Re.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),a.signer?n.from?n.from=Se({override:Bo(a.signer,n.from),signer:a.signer.getAddress()}).then(p=>La(this,void 0,void 0,function*(){return fe(p.signer)!==p.override&&Re.throwError("Contract with a Signer cannot override from",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):n.from=a.signer.getAddress():n.from&&(n.from=Bo(a.provider,n.from));let i=yield Se({args:os(a.signer||a.provider,t,e.inputs),address:a.resolvedAddress,overrides:Se(n)||{}}),r=a.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=F.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=F.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=F.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=F.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=F.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=dn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,c=j(r);for(let x=0;xn[p]!=null);return l.length&&Re.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,E.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function ex(a,e){return function(...t){return Uo(a,e,t)}}function tx(a,e){let t=a.signer||a.provider;return function(...n){return La(this,void 0,void 0,function*(){t||Re.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Uo(a,e,n);return yield t.estimateGas(i)})}}function pc(a,e){let t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(r=>{let s=mt(r),o=null;try{o=a.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>a.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>a.provider,s.getBlock=()=>a.provider.getBlock(i.blockHash),s.getTransaction=()=>a.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function yc(a,e,t){let n=a.signer||a.provider;return function(...i){return La(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=_e(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}a.deployTransaction!=null&&(yield a._deployed(r));let s=yield Uo(a,e,i),o=yield n.call(s,r);try{let l=a.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===E.errors.CALL_EXCEPTION&&(l.address=a.address,l.args=i,l.transaction=s),l}})}}function nx(a,e){return function(...t){return La(this,void 0,void 0,function*(){a.signer||Re.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),a.deployTransaction!=null&&(yield a._deployed());let n=yield Uo(a,e,t),i=yield a.signer.sendTransaction(n);return pc(a,i),i})}}function lc(a,e,t){return e.constant?yc(a,e,t):nx(a,e)}function cc(a){return a.address&&(a.topics==null||a.topics.length===0)?"*":(a.address||"*")+"@"+(a.topics?a.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var bi=class{constructor(e,t){B(this,"tag",e),B(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{let i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}},sl=class extends bi{constructor(){super("error",null)}},Fo=class extends bi{constructor(e,t,n,i){let r={address:e},s=t.getEventTopic(n);i?(s!==i[0]&&Re.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(cc(r),r),B(this,"address",e),B(this,"interface",t),B(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=Xi(e.args);if(t.length)throw t[0].error;let n=(e.args||[]).slice();return n.push(e),n}},Lo=class extends bi{constructor(e,t){super("*",{address:e}),B(this,"address",e),B(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}},hr=class{constructor(e,t,n){B(this,"interface",ht(new.target,"getInterface")(t)),n==null?(B(this,"provider",null),B(this,"signer",null)):Pt.isSigner(n)?(B(this,"provider",n.provider||null),B(this,"signer",n)):Xt.isProvider(n)?(B(this,"provider",n),B(this,"signer",null)):Re.throwArgumentError("invalid signer or provider","signerOrProvider",n),B(this,"callStatic",{}),B(this,"estimateGas",{}),B(this,"functions",{}),B(this,"populateTransaction",{}),B(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];B(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?B(this.filters,o,this.filters[l[0]]):Re.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(B(this,"_runningEvents",{}),B(this,"_wrappedEmits",{}),e==null&&Re.throwArgumentError("invalid contract address or ENS name","addressOrName",e),B(this,"address",e),this.provider)B(this,"resolvedAddress",Bo(this.provider,e));else try{B(this,"resolvedAddress",Promise.resolve(fe(e)))}catch{Re.throwError("provider is required to use ENS name as contract address",E.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Re.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&B(this,s,lc(this,o,!0)),this.functions[s]==null&&B(this.functions,s,lc(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yc(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,ex(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,tx(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&B(this,s,this[l])}catch{}this.functions[s]==null&&B(this.functions,s,this.functions[l]),this.callStatic[s]==null&&B(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&B(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&B(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return ci(e)}static getInterface(e){return Da.isInterface(e)?e:new Da(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Re.throwError("contract not deployed",E.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Re.throwError("sending a transactions require a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=_e(e||{});return["from","to"].forEach(function(n){t[n]!=null&&Re.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new ya(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&B(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return pa.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new sl);if(e==="event")return this._normalizeRunningEvent(new bi("event",null));if(e==="*")return this._normalizeRunningEvent(new Lo(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Fo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");let i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Fo(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new bi(cc(t),t))}return this._normalizeRunningEvent(new Lo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){let i=mt(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||Re.throwError("events require a provider or a signer with a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){let i=this._getRunningEvent(e),r=_e(i.filter);return typeof t=="string"&&ie(t,32)?(n!=null&&Re.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=n??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let n in this._runningEvents){let i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}},oe=class extends hr{},gi=class{constructor(e,t,n){let i=null;typeof t=="string"?i=t:pn(t)?i=W(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!ie(i)||i.length%2)&&Re.throwArgumentError("invalid bytecode","bytecode",t),n&&!Pt.isSigner(n)&&Re.throwArgumentError("invalid signer","signer",n),B(this,"bytecode",i),B(this,"interface",ht(new.target,"getInterface")(e)),B(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=_e(e.pop());for(let n in t)if(!Z5[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&Re.throwError("cannot override "+n,E.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!F.from(t.value).isZero()&&!this.interface.deploy.payable&&Re.throwError("non-payable constructor cannot override value",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Re.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=W(ye([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return La(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Re.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let n=yield os(this.signer,e,this.interface.deploy.inputs);n.push(t);let i=this.getDeployTransaction(...n),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return pc(o,r),B(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Re.throwError("missing compiler output",E.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let n=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return oe.getInterface(e)}static getContractAddress(e){return ci(e)}static getContract(e,t,n){return new oe(e,t,n)}};var Vo=class{constructor(e){B(this,"alphabet",e),B(this,"base",e.length),B(this,"_alphabetMap",{}),B(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[n[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;r>0;)t.push(r&255),r>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=x>>16&255,l[e.length+2]=x>>8&255,l[e.length+3]=x&255;let C=j(xa(i,a,l));r||(r=C.length,c=new Uint8Array(r),s=Math.ceil(n/r),p=n-(s-1)*r),c.set(C);for(let S=1;S=256)throw new Error("Depth too large!");return gc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(xa,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~ga));let n=new Uint8Array(37);if(e&ga){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(V(this.privateKey),1),t&&(t+="'")}else n.set(V(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;let r=V(bi(ei.sha512,this.chainCode,n)),a=r.slice(0,32),s=r.slice(32),o=null,d=null;this.privateKey?o=Vo(F.from(a).add(this.privateKey).mod(s5)):d=new xn(W(a))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new It(xa,o,d,this.fingerprint,Vo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let r=0;r=ga)throw new Error("invalid path index - "+a);n=n._derive(ga+s)}else if(a.match(/^[0-9]+$/)){let s=parseInt(a);if(s>=ga)throw new Error("invalid path index - "+a);n=n._derive(s)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,t){let n=V(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let r=V(bi(ei.sha512,o5,n));return new It(xa,Vo(r.slice(0,32)),null,"0x00000000",Vo(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=dd(n),e=wr(Ta(e,n),n),It._fromSeed(pd(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=hi.decode(e);(t.length!==82||gc(t.slice(0,78))!==e)&&ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],r=W(t.slice(5,9)),a=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(xa,null,W(o),r,s,a,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(xa,W(o.slice(1)),null,r,s,a,n,null)}return ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function pd(i,e){e||(e="");let t=Te("mnemonic"+e,Jt.NFKD);return Tr(Te(i,Jt.NFKD),t,2048,64,"sha512")}function Ta(i,e){e=dd(e),ds.checkNormalize();let t=e.split(i);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=V(new Uint8Array(Math.ceil(11*t.length/8))),r=0;for(let p=0;p>3]|=1<<7-r%8),r++}let a=32*t.length/3,s=t.length/3,o=Tc(s);if((V(en(n.slice(0,a/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,a/8))}function wr(i,e){if(e=dd(e),i=V(i),i.length%4!==0||i.length<16||i.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=i[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=i[s]>>8-n,t.push(i[s]&u5(8-n)),n+=3);let r=i.length/4,a=V(en(i))[0]&Tc(r);return t[t.length-1]<<=r,t[t.length-1]|=a>>8-r,e.join(t.map(s=>e.getWord(s)))}function vc(i,e){try{return Ta(i,e),!0}catch{}return!1}function wc(i){return(typeof i!="number"||i<0||i>=ga||i%1)&&ds.throwArgumentError("invalid account index","index",i),`m/44'/60'/${i}'/0/0`}var _c="random/5.7.0";var yd=new M(_c);function l5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var kc=l5(),qo=kc.crypto||kc.msCrypto;(!qo||!qo.getRandomValues)&&(yd.warn("WARNING: Missing strong random number source"),qo={getRandomValues:function(i){return yd.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ti(i){(i<=0||i>1024||i%1||i!=i)&&yd.throwArgumentError("invalid length","length",i);let e=new Uint8Array(i);return qo.getRandomValues(e),V(e)}function ps(i){i=i.slice();for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=i[e];i[e]=i[t],i[t]=n}return i}var md=En(fd());var Ho="json-wallets/5.7.0";function gi(i){return typeof i=="string"&&i.substring(0,2)!=="0x"&&(i="0x"+i),V(i)}function va(i,e){for(i=String(i);i.length{L=V(L);let O=L.slice(0,16),U=L.slice(16,32),q=L.slice(32,64),E=new Ti.default.Counter(b),J=new Ti.default.ModeOfOperation.ctr(O,E),$=V(J.encrypt(r)),le=ce(ye([U,$])),T={address:i.address.substring(2).toLowerCase(),id:Mc(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(b).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:le.substring(2)}};if(s){let R=ti(16),N=new Ti.default.Counter(R),H=new Ti.default.ModeOfOperation.ctr(q,N),se=V(H.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+va(C.getUTCMonth()+1,2)+"-"+va(C.getUTCDate(),2)+"T"+va(C.getUTCHours(),2)+"-"+va(C.getUTCMinutes(),2)+"-"+va(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:d,version:"0.1"}}return JSON.stringify(T)})}function Oc(i,e,t){if(Go(i)){t&&t(0);let n=bd(i,e);return t&&t(1),Promise.resolve(n)}return zo(i)?Dc(i,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bc(i,e){if(Go(i))return bd(i,e);if(zo(i))return Nc(i,e);throw new Error("invalid JSON wallet")}var Fc="wallet/5.7.0";var Lc=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},wa=new M(Fc);function f5(i){return i!=null&&re(i.privateKey,32)&&i.address!=null}function m5(i){let e=i.mnemonic;return e&&e.phrase}var Nn=class extends Pt{constructor(e,t){if(super(),f5(e)){let n=new xn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",gn(this.publicKey)),this.address!==fe(e.address)&&wa.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),m5(e)){let r=e.mnemonic;B(this,"_mnemonic",()=>({phrase:r.phrase,path:r.path||xi,locale:r.locale||"en"}));let a=this.mnemonic,s=It.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);gn(s.privateKey)!==this.address&&wa.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(xn.isSigningKey(e))e.curve!=="secp256k1"&&wa.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new xn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",gn(this.publicKey))}t&&!Xt.isProvider(t)&&wa.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Nn(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&wa.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(ss(t)));return ss(t,n)})}signMessage(e){return Lc(this,void 0,void 0,function*(){return Ga(this._signingKey().signDigest(aa(e)))})}_signTypedData(e,t,n){return Lc(this,void 0,void 0,function*(){let r=yield xt.resolveNames(e,t,n,a=>(this.provider==null&&wa.throwError("cannot resolve ENS names without a provider",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Ga(this._signingKey().signDigest(xt.hash(r.domain,t,r.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),wd(this,e,t,n)}static createRandom(e){let t=ti(16);e||(e={}),e.extraEntropy&&(t=V(Ce(ce(ye([t,e.extraEntropy])),0,16)));let n=wr(t,e.locale);return Nn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Oc(e,t,n).then(r=>new Nn(r))}static fromEncryptedJsonSync(e,t){return new Nn(Bc(e,t))}static fromMnemonic(e,t,n){return t||(t=xi),new Nn(It.fromMnemonic(e,null,n).derivePath(t))}};function Uc(i,e){return br(aa(i),e)}function jc(i,e,t,n){return br(xt.hash(i,e,t),n)}var ri={};Kr(ri,{AlchemyProvider:()=>Ca,AlchemyWebSocketProvider:()=>_s,AnkrProvider:()=>ks,BaseProvider:()=>ii,CloudflareProvider:()=>As,EtherscanProvider:()=>Ms,FallbackProvider:()=>Cs,Formatter:()=>X,InfuraProvider:()=>Sa,InfuraWebSocketProvider:()=>Ss,IpcProvider:()=>Od,JsonRpcBatchProvider:()=>ou,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Ma,NodesmithProvider:()=>Rs,PocketProvider:()=>Ps,Provider:()=>Xt,Resolver:()=>Aa,StaticJsonRpcProvider:()=>ws,UrlJsonRpcProvider:()=>St,Web3Provider:()=>Ns,WebSocketProvider:()=>_i,getDefaultProvider:()=>uu,getNetwork:()=>cs,isCommunityResourcable:()=>Ad,isCommunityResource:()=>hs,showThrottleMessage:()=>ni});var Vc="networks/5.7.1";var qc=new M(Vc);function h5(i){return i&&typeof i.renetwork=="function"}function vi(i){let e=function(t,n){n==null&&(n={});let r=[];if(t.InfuraProvider&&n.infura!=="-")try{r.push(new t.InfuraProvider(i,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{r.push(new t.EtherscanProvider(i,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{r.push(new t.AlchemyProvider(i,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let a=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(i,n.pocket);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{r.push(new t.CloudflareProvider(i))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let a=["ropsten"],s=new t.AnkrProvider(i,n.ankr);s.network&&a.indexOf(s.network.name)===-1&&r.push(s)}catch{}if(r.length===0)return null;if(t.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:i==="homestead"&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return e.renetwork=function(t){return vi(t)},e}function Jo(i,e){let t=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(i,e):null};return t.renetwork=function(n){return Jo(i,n)},t}var Hc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:vi("homestead")},Gc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:vi("ropsten")},zc={chainId:63,name:"classicMordor",_defaultProvider:Jo("https://www.ethercluster.com/mordor","classicMordor")},Ko={unspecified:{chainId:0,name:"unspecified"},homestead:Hc,mainnet:Hc,morden:{chainId:2,name:"morden"},ropsten:Gc,testnet:Gc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:vi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:vi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:vi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:vi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zc,classicTestnet:zc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:vi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:vi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function cs(i){if(i==null)return null;if(typeof i=="number"){for(let n in Ko){let r=Ko[n];if(r.chainId===i)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:i,name:"unknown"}}if(typeof i=="string"){let n=Ko[i];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Ko[i.name];if(!e)return typeof i.chainId!="number"&&qc.throwArgumentError("invalid network chainId","network",i),i;i.chainId!==0&&i.chainId!==e.chainId&&qc.throwArgumentError("network chainId mismatch","network",i);let t=i._defaultProvider||null;return t==null&&e._defaultProvider&&(h5(e._defaultProvider)?t=e._defaultProvider.renetwork(i):t=e._defaultProvider),{name:i.name,chainId:e.chainId,ensAddress:i.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Wc="web/5.7.1";var b5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})};function Kc(i,e){return b5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(i,t),r=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach((s,o)=>{a[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{a[s.toLowerCase()]=n.headers.get(s)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:V(new Uint8Array(r))}})}var x5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Dn=new M(Wc);function Jc(i){return new Promise(e=>{setTimeout(e,i)})}function Ui(i,e){if(i==null)return null;if(typeof i=="string")return i;if(oi(i)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(i)}catch{}return W(i)}return i}function g5(i){return Te(i.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function _d(i,e,t){let n=typeof i=="object"&&i.throttleLimit!=null?i.throttleLimit:12;Dn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let r=typeof i=="object"?i.throttleCallback:null,a=typeof i=="object"&&typeof i.throttleSlotInterval=="number"?i.throttleSlotInterval:100;Dn.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);let s=typeof i=="object"?!!i.errorPassThrough:!1,o={},d=null,p={method:"GET"},c=!1,b=2*60*1e3;if(typeof i=="string")d=i;else if(typeof i=="object"){if((i==null||i.url==null)&&Dn.throwArgumentError("missing URL","connection.url",i),d=i.url,typeof i.timeout=="number"&&i.timeout>0&&(b=i.timeout),i.headers)for(let O in i.headers)o[O.toLowerCase()]={key:O,value:String(i.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!i.allowGzip,i.user!=null&&i.password!=null){d.substring(0,6)!=="https:"&&i.allowInsecureAuthentication!==!0&&Dn.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:d,user:i.user,password:"[REDACTED]"});let O=i.user+":"+i.password;o.authorization={key:"Authorization",value:"Basic "+ra(Te(O))}}i.skipFetchSetup!=null&&(p.skipFetchSetup=!!i.skipFetchSetup),i.fetchOptions!=null&&(p.fetchOptions=we(i.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=d?d.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ia(_[3]):g5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Dn.throwError("processing response error",M.errors.SERVER_ERROR,{body:Ui(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:d})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(E,J){b&&(O=setTimeout(()=>{O!=null&&(O=null,J(Dn.makeError("timeout",M.errors.TIMEOUT,{requestBody:Ui(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:d})))},b))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return x5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Dn.throwError("bad response",M.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Ui(q,U.headers?U.headers["content-type"]:null),requestBody:Ui(p.body,v["content-type"]),requestMethod:p.method,url:d})),t)try{let E=yield t(q,U);return S.cancel(),E}catch(E){if(E.throttleRetry&&O{let o=null;if(a!=null)try{o=JSON.parse(Yt(a))}catch(d){Dn.throwError("invalid JSON",M.errors.SERVER_ERROR,{body:a,error:d})}return t&&(o=t(o,s)),o},r=null;if(e!=null){r=Te(e);let a=typeof i=="string"?{url:i}:we(i);a.headers?Object.keys(a.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(a.headers=we(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},i=a}return _d(i,r,n)}function Bn(i,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let r=null,a=!1,s=()=>a?!1:(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,d=0;function p(){return i().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!a){if(d++,d>o){s()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,d)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(c){s()&&n(c)})}p()})}var Id=En(Xc());var ke="providers/5.7.2";var ms=new M(ke),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),d=this.number.bind(this),p=this.type.bind(this),c=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(d,null),transactionIndex:X.allowNull(d,null),confirmations:X.allowNull(d,null),from:t,gasPrice:X.allowNull(n),maxPriorityFeePerGas:X.allowNull(n),maxFeePerGas:X.allowNull(n),gasLimit:n,to:X.allowNull(t,null),value:n,nonce:d,data:a,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(d),creates:X.allowNull(t,null),raw:X.allowNull(a)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(d),gasLimit:X.allowNull(n),gasPrice:X.allowNull(n),maxPriorityFeePerGas:X.allowNull(n),maxFeePerGas:X.allowNull(n),to:X.allowNull(t),value:X.allowNull(n),data:X.allowNull(c),type:X.allowNull(d),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:d,blockNumber:d,transactionHash:s,address:t,topics:X.arrayOf(s),data:a,logIndex:d,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:d,root:X.allowNull(o),gasUsed:n,logsBloom:X.allowNull(a),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:d,confirmations:X.allowNull(d,null),cumulativeGasUsed:n,effectiveGasPrice:X.allowNull(n),status:X.allowNull(d),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:d,timestamp:d,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:X.allowNull(t),extraData:a,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(n)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(r,void 0),toBlock:X.allowNull(r,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(d),blockHash:X.allowNull(s),transactionIndex:d,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(a,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:d},e}accessList(e){return ln(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),re(e))?e.toLowerCase():ms.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!re(e,32))return null;let t=fe(Ce(e,12));return t===co?null:t}contractAddress(e){return cr(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||re(e))return qn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Ft(n)!==32?ms.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!re(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,r=X.check(t,e);return r._difficulty=n==null?null:F.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;re(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),re(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Oo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ms.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ms.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ms.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let r in e)try{let a=e[r](t[r]);a!==void 0&&(n[r]=a)}catch(a){throw a.checkKey=r,a.checkValue=t[r],a}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(r){n.push(e(r))}),n}}};function Ad(i){return i&&typeof i.isCommunityResource=="function"}function hs(i){return Ad(i)&&i.isCommunityResource()}var Zc=!1;function ni(){Zc||(Zc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},he=new M(ke),E5=10;function ef(i){return i==null?"null":(Ft(i)!==32&&he.throwArgumentError("invalid topic","topic",i),i.toLowerCase())}function tf(i){for(i=i.slice();i.length>0&&i[i.length-1]==null;)i.pop();return i.map(e=>{if(Array.isArray(e)){let t={};e.forEach(r=>{t[ef(r)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return ef(e)}).join("&")}function C5(i){return i===""?[]:i.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function ka(i){if(typeof i=="string"){if(i=i.toLowerCase(),Ft(i)===32)return"tx:"+i;if(i.indexOf(":")===-1)return i}else{if(Array.isArray(i))return"filter:*:"+tf(i);if(ko.isForkEvent(i))throw he.warn("not implemented"),new Error("not implemented");if(i&&typeof i=="object")return"filter:"+(i.address||"*")+":"+tf(i.topics||[])}throw new Error("invalid event - "+i)}function bs(){return new Date().getTime()}function nf(i){return new Promise(e=>{setTimeout(e,i)})}var I5=["block","network","pending","poll"],Sd=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=C5(e[2]),r={};return n.length>0&&(r.topics=n),t&&t!=="*"&&(r.address=t),r}pollable(){return this.tag.indexOf(":")>=0||I5.indexOf(this.tag)>=0}},S5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Md(i){return me(F.from(i).toHexString(),32)}function rf(i){return hi.encode(ye([i,Ce(en(en(i)),0,4)]))}var of=new RegExp("^(ipfs)://(.*)$","i"),af=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),of,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Xo(i,e){try{return Yt(xs(i,e))}catch{}return null}function xs(i,e){if(i==="0x")return null;let t=F.from(Ce(i,e,e+32)).toNumber(),n=F.from(Ce(i,t,t+32)).toNumber();return Ce(i,t+32,t+32+n)}function Ed(i){return i.match(/^ipfs:\/\/ipfs\//i)?i=i.substring(12):i.match(/^ipfs:\/\//i)?i=i.substring(7):he.throwArgumentError("unsupported IPFS format","link",i),`https://gateway.ipfs.io/ipfs/${i}`}function sf(i){let e=V(i);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function R5(i){if(i.length%32===0)return i;let e=new Uint8Array(Math.ceil(i.length/32)*32);return e.set(i),e}function uf(i){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===M.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:kt([e,Ni(this.name),t||"0x"])},r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=kt(["0x9061b923",uf([ns(this.name),n.data])]));try{let a=yield this.provider.call(n);return V(a).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:n,data:a}),r&&(a=xs(a,0)),a}catch(a){if(a.code===M.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?xs(n,0):null})}_getAddress(e,t){let n=S5[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let r=V(t);if(n.p2pkh!=null){let a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return rf(ye([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){let a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){let s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75)return rf(ye([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){let a=r[1],s=r[0];if(s===0?a!==20&&a!==32&&(s=-1):s=-1,s>=0&&r.length===2+a&&a>=1&&a<=75){let o=Id.default.toWords(r.slice(2));return o.unshift(s),Id.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let r=yield this._fetch("0x3b3b57de");return r==="0x"||r===ta?null:this.provider.formatter.callAddress(r)}catch(r){if(r.code===M.errors.CALL_EXCEPTION)return null;throw r}let t=yield this._fetchBytes("0xf1cb7e06",Md(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",M.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[d]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",M.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=Te(e);t=ye([Md(64),Md(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Yt(n)})}},Cd=null,P5=1,ii=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Bn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Cd==null&&(Cd=new X),Cd}static getNetwork(e){return cs(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let r=e.to.toLowerCase(),a=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:a,sender:r}),b=yield On({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(b.data)return b.data;let I=b.message||"unknown error";if(b.status>=400&&b.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:d,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,M.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let r=this._internalBlockNumber;try{let a=yield r;if(bs()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===r)break}}let t=bs(),n=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(r=>null,r=>r)}).then(({blockNumber:r,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;let s=bs();return r=F.from(r).toNumber(),r{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=P5++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(r){this.emit("error",r);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",M.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let r=this._emitted.block+1;r<=n;r++)this.emit("block",r);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(r=>{if(r==="block")return;let a=this._emitted[r];a!=="pending"&&n-a>12&&delete this._emitted[r]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(r=>{switch(r.type){case"tx":{let a=r.hash,s=this.getTransactionReceipt(a).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+a]=o.blockNumber,this.emit(a,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!r._inflight){r._inflight=!0,r._lastBlockNumber===-2&&(r._lastBlockNumber=n-1);let a=r.filter;a.fromBlock=r._lastBlockNumber+1,a.toBlock=n;let s=a.toBlock-this._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);let o=this.getLogs(a).then(d=>{r._inflight=!1,d.length!==0&&d.forEach(p=>{p.blockNumber>r._lastBlockNumber&&(r._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(a,p)})}).catch(d=>{this.emit("error",d),r._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(r=>{this.emit("error",r)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",M.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield nf(0),this._network;let n=he.makeError("underlying network changed",M.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=bs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,r){return ue(this,void 0,void 0,function*(){let a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=t?a:new Promise((s,o)=>{let d=[],p=!1,c=function(){return p?!0:(p=!0,d.forEach(I=>{I()}),!1)},b=I=>{I.confirmations{this.removeListener(e,b)}),r){let I=r.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nf(1e3),this.getTransactionCount(r.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=r.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),d.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let I=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:n}))},n);I.unref&&I.unref(),d.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return F.from(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:a})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return F.from(r).toNumber()}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:a})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return W(r)}catch(a){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:a})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>qn(s))}),a=yield this.perform("getStorageAt",r);try{return W(a)}catch(s){return he.throwError("bad result from backend",M.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:a,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let r=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",M.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(a,s)=>ue(this,void 0,void 0,function*(){a==null&&(a=1),s==null&&(s=0);let o;a!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let d=yield this._waitForTransaction(e.hash,a,s,o);return d==null&&a===0?null:(this._emitted["t:"+e.hash]=d.blockNumber,d.status===0&&he.throwError("transaction failed",M.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:d}),d)}),r}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(a=>W(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let a=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,a,r)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?F.from(a):null))}),["type"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(r=>{t[r]!=null&&(n[r]=Promise.resolve(t[r]).then(a=>a?W(a):null))}),this.formatter.transactionRequest(yield Ie(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=E5&&he.throwError("CCIP read exceeded maximum redirections",M.errors.SERVER_ERROR,{redirects:n,transaction:e});let r=e.to,a=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&r!=null&&a.substring(0,10)==="0x556f1830"&&Ft(a)%32===4)try{let s=Ce(a,4),o=Ce(s,0,32);F.from(o).eq(r)||he.throwError("CCIP Read sender did not match",M.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});let d=[],p=F.from(Ce(s,32,64)).toNumber(),c=F.from(Ce(s,p,p+32)).toNumber(),b=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let a=yield this.perform("getBlock",r);if(a==null)return r.blockHash!=null&&this._emitted["b:"+r.blockHash]==null||r.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let d=0;dthis._wrapTransaction(d)),o}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let r=this.formatter.transactionResponse(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return this._wrapTransaction(r)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let r=this.formatter.receipt(n);if(r.blockNumber==null)r.confirmations=0;else if(r.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;s<=0&&(s=1),r.confirmations=s}return r}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(r=>{r.removed==null&&(r.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let r=new Aa(this,n,e);return t!==e&&!(yield r.supportsWildcard())?null:r}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let r=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ni(e).substring(2)});return this.formatter.callAddress(r)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(re(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let r=Xo(yield this.call({to:n,data:"0x691f3431"+Ni(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(re(e)){let a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(a,"getAvatar");if(!s)return null;t=new Aa(this,s,a);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o}try{let o=Xo(yield this.call({to:s,data:"0x691f3431"+Ni(a).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==M.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let r=new Sd(ka(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],a=ka(e);return this._events=this._events.filter(s=>s.tag!==a?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(r.push(s),!1):!0)),r.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=ka(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=ka(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],r=!1,a=ka(e);return this._events=this._events.filter(s=>s.tag!==a||s.listener!=t||r?!0:(r=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=ka(e);this._events=this._events.filter(r=>r.tag!==n?!0:(t.push(r),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var wi=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Mt=new M(ke),N5=["call","estimateGas"];function Ts(i,e){if(i==null)return null;if(typeof i.message=="string"&&i.message.match("reverted")){let t=re(i.data)?i.data:null;if(!e||t)return{message:i.message,data:t}}if(typeof i=="object"){for(let t in i){let n=Ts(i[t],e);if(n)return n}return null}if(typeof i=="string")try{return Ts(JSON.parse(i),e)}catch{}return null}function df(i,e,t){let n=t.transaction||t.signedTransaction;if(i==="call"){let a=Ts(e,!0);if(a)return a.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(i==="estimateGas"){let a=Ts(e.body,!1);a==null&&(a=Ts(e,!1)),a&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:i,transaction:n,error:e})}let r=e.message;throw e.code===M.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?r=e.error.message:typeof e.body=="string"?r=e.body:typeof e.responseText=="string"&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:n}),r.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:n}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:n}),r.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:i,transaction:n}),N5.indexOf(i)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:n}),e}function lf(i){return new Promise(function(e){setTimeout(e,i)})}function D5(i){if(i.error){let e=new Error(i.error.message);throw e.code=i.error.code,e.data=i.error.data,e}return i.result}function gs(i){return i&&i.toLowerCase()}var Rd={},Ma=class extends Pt{constructor(e,t,n){if(super(),e!==Rd)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Pd(Rd,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,M.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=we(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>wi(this,void 0,void 0,function*(){if(n==null)return null;let r=yield this.provider.resolveName(n);return r==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),r}))),Ie({tx:Ie(e),sender:t}).then(({tx:n,sender:r})=>{n.from!=null?n.from.toLowerCase()!==r&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=r;let a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),df("sendTransaction",s,a)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return wi(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Bn(()=>wi(this,void 0,void 0,function*(){let r=yield this.provider.getTransaction(n);if(r!==null)return this.provider._wrapTransaction(r,n,t)}),{oncePoll:this.provider})}catch(r){throw r.transactionHash=n,r}})}signMessage(e){return wi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),r}})}_legacySignMessage(e){return wi(this,void 0,void 0,function*(){let t=typeof e=="string"?Te(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),r}})}_signTypedData(e,t,n){return wi(this,void 0,void 0,function*(){let r=yield xt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(xt.getPayload(r.domain,t,r.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:r.domain,types:t,value:r.value}}),s}})}unlock(e){return wi(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Pd=class extends Ma{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},O5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends ii{constructor(e,t){let n=t;n==null&&(n=new Promise((r,a)=>{setTimeout(()=>{this.detectNetwork().then(s=>{r(s)},s=>{a(s)})},0)})),super(n),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return wi(this,void 0,void 0,function*(){yield lf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Ma(Rd,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ft(n),provider:this});let r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];let a=On(this.connection,JSON.stringify(n),D5).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return r&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[gs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[gs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[gs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[gs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=gs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return wi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&F.from(r.type).isZero()&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){let a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(r),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(r){return df(e,r,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function r(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return a.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(d){return e.emit("pending",d),null})})}),s.then(function(){return lf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){r()},0),null}).catch(a=>{})}return r(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=we(O5);if(t)for(let a in t)t[a]&&(n[a]=!0);Qr(e,n);let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;let s=qn(F.from(e[a]));a==="gasLimit"&&(a="gas"),r[a]=s}),["from","to","data"].forEach(function(a){e[a]!=null&&(r[a]=W(e[a]))}),e.accessList&&(r.accessList=ln(e.accessList)),r}};var Ea=null;try{if(Ea=WebSocket,Ea==null)throw new Error("inject please")}catch{let e=new M(ke);Ea=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Nd=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},Zo=new M(ke),B5=1,_i=class extends tn{constructor(e,t){t==="any"&&Zo.throwError("WebSocketProvider does not support 'any' network yet",M.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Ea(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(r=>{this.websocket.send(this._requests[r].payload)})},this.websocket.onmessage=r=>{let a=r.data,s=JSON.parse(a);if(s.id!=null){let o=String(s.id),d=this._requests[o];if(delete this._requests[o],s.result!==void 0)d.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(d.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",a)):p=new Error("unknown error"),d.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(d.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Zo.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Zo.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Nd(this,void 0,void 0,function*(){return null})}set polling(e){!e||Zo.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=B5++;return new Promise((r,a)=>{function s(d,p){return d?a(d):r(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Nd(this,void 0,void 0,function*(){let r=this._subIds[e];r==null&&(r=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=r);let a=yield r;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let r=n.hash;this.getTransactionReceipt(r).then(a=>{!a||this.emit(r,a)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(r=>r.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(r=>r.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(r=>{!this._subs[r]||(delete this._subs[r],this.send("eth_unsubscribe",[r]))}))}destroy(){return Nd(this,void 0,void 0,function*(){this.websocket.readyState===Ea.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var F5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},vs=new M(ke),ws=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return F5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||vs.throwError("no network detected",M.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},St=class extends ws{constructor(e,t){vs.checkAbstract(new.target,St),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let n=mt(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(r=>{B(this,r,t[r])})}_startPending(){vs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return vs.throwError("API provider does not support signing",M.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return vs.throwError("not implemented; sub-classes must override getUrl",M.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var pf=new M(ke),eu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",_s=class extends _i{constructor(e,t){let n=new Ca(e,t),r=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(r,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===eu}},Ca=class extends St{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){return e==null?eu:(e&&typeof e!="string"&&pf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:pf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(r,a)=>(t===eu&&ni(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===eu}};var L5=new M(ke),tu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function U5(i){switch(i){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return L5.throwArgumentError("unsupported network","name",i)}var ks=class extends St{isCommunityResource(){return this.apiKey===tu}static getApiKey(e){return e??tu}static getUrl(e,t){t==null&&(t=tu);let n={allowGzip:!0,url:"https://"+U5(e.name)+t,throttleCallback:(r,a)=>(t.apiKey===tu&&ni(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var j5=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},yf=new M(ke),As=class extends St{static getApiKey(e){return e!=null&&yf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:yf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return j5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var nu=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},ji=new M(ke);function cf(i){let e={};for(let t in i){if(i[t]==null)continue;let n=i[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=qn(W(n)):t==="accessList"?n="["+ln(n).map(r=>`{address:"${r.address}",storageKeys:["${r.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function V5(i){if(i.status==0&&(i.message==="No records found"||i.message==="No transactions found"))return i.result;if(i.status!=1||typeof i.message!="string"||!i.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(i),(i.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return i.result}function ff(i){if(i&&i.status==0&&i.message=="NOTOK"&&(i.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(i),e.throttleRetry=!0,e}if(i.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(i),e}if(i.error){let e=new Error(i.error.message||"unknown error");throw i.error.code&&(e.code=i.error.code),i.error.data&&(e.data=i.error.data),e}return i.result}function mf(i){if(i==="pending")throw new Error("pending not supported");return i==="latest"?i:parseInt(i.substring(2),16)}function Dd(i,e,t){if(i==="call"&&e.code===M.errors.SERVER_ERROR){let r=e.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){let a=r.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),re(a))return a;ji.throwError("missing revert data in call exception",M.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===M.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&ji.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:i,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ji.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:i,transaction:t}),n.match(/another transaction with same nonce/)&&ji.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:i,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&ji.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:i,transaction:t}),e}var Ms=class extends ii{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return ji.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((a,s)=>{let o=t[s];return o!=null&&(a+=`&${s}=${o}`),a},""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return nu(this,void 0,void 0,function*(){let r=n?this.getPostUrl():this.getUrl(e,t),a=n?this.getPostData(e,t):null,s=e==="proxy"?ff:V5;this.emit("debug",{action:"request",request:r,provider:this});let o={url:r,throttleSlotInterval:1e3,throttleCallback:(c,b)=>(this.isCommunityResource()&&ni(),Promise.resolve(!0))},d=null;a&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},d=Object.keys(a).map(c=>`${c}=${a[c]}`).join("&"));let p=yield On(o,d,s||ff);return this.emit("debug",{action:"response",request:r,response:ft(p),provider:this}),p})}detectNetwork(){return nu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return nu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(r=>Dd("sendTransaction",r,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let r=cf(t.transaction);r.module="proxy",r.action="eth_call";try{return yield this.fetch("proxy",r,!0)}catch(a){return Dd("call",a,t.transaction)}}case"estimateGas":{let r=cf(t.transaction);r.module="proxy",r.action="eth_estimateGas";try{return yield this.fetch("proxy",r,!0)}catch(a){return Dd("estimateGas",a,t.transaction)}}case"getLogs":{let r={action:"getLogs"};if(t.filter.fromBlock&&(r.fromBlock=mf(t.filter.fromBlock)),t.filter.toBlock&&(r.toBlock=mf(t.filter.toBlock)),t.filter.address&&(r.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&ji.throwError("unsupported topic count",M.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&ji.throwError("unsupported topic format",M.errors.UNSUPPORTED_OPERATION,{topic0:o}),r.topic0=o}let a=yield this.fetch("logs",r),s={};for(let o=0;o{["contractAddress","to"].forEach(function(d){s[d]==""&&delete s[d]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var au=function(i,e,t,n){function r(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(c){try{p(n.next(c))}catch(b){s(b)}}function d(c){try{p(n.throw(c))}catch(b){s(b)}}function p(c){c.done?a(c.value):r(c.value).then(o,d)}p((n=n.apply(i,e||[])).next())})},_r=new M(ke);function iu(){return new Date().getTime()}function hf(i){let e=null;for(let t=0;te?null:(n+r)/2}function Ia(i){if(i===null)return"null";if(typeof i=="number"||typeof i=="boolean")return JSON.stringify(i);if(typeof i=="string")return i;if(F.isBigNumber(i))return i.toString();if(Array.isArray(i))return JSON.stringify(i.map(e=>Ia(e)));if(typeof i=="object"){let e=Object.keys(i);return e.sort(),"{"+e.map(t=>{let n=i[t];return typeof n=="function"?n="[function]":n=Ia(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof i)}var q5=1;function xf(i){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,i)}),r=s=>(n=n.then(s),n);function a(){return n}return{cancel:e,getPromise:a,wait:r}}var H5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],G5=["address","args","errorArgs","errorSignature","method","transaction"];function ru(i,e){let t={weight:i.weight};return Object.defineProperty(t,"provider",{get:()=>i.provider}),i.start&&(t.start=i.start),e&&(t.duration=e-i.start),i.done&&(i.error?t.error=i.error:t.result=i.result||null),t}function z5(i,e){return function(t){let n={};t.forEach(a=>{let s=i(a.result);n[s]||(n[s]={count:0,result:a.result}),n[s].count++});let r=Object.keys(n);for(let a=0;a=e)return s.result}}}function W5(i,e,t){let n=Ia;switch(e){case"getBlockNumber":return function(r){let a=r.map(o=>o.result),s=bf(r.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),a.indexOf(s+1)>=0&&s++,s>=i._highestBlockNumber&&(i._highestBlockNumber=s),i._highestBlockNumber};case"getGasPrice":return function(r){let a=r.map(s=>s.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(r){return bf(r.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(r){return r==null?null:(r=we(r),r.confirmations=-1,Ia(r))};break;case"getBlock":t.includeTransactions?n=function(r){return r==null?null:(r=we(r),r.transactions=r.transactions.map(a=>(a=we(a),a.confirmations=-1,a)),Ia(r))}:n=function(r){return r==null?null:Ia(r)};break;default:throw new Error("unknown method: "+e)}return z5(n,i.quorum)}function Es(i,e){return au(this,void 0,void 0,function*(){let t=i.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Bn(()=>new Promise((n,r)=>{setTimeout(function(){return t.blockNumber>=e?n(t):i.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function K5(i,e,t,n){return au(this,void 0,void 0,function*(){let r=i.provider;switch(t){case"getBlockNumber":case"getGasPrice":return r[t]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&re(n.blockTag)&&(r=yield Es(i,e)),r[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&re(n.blockTag)&&(r=yield Es(i,e)),r.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&re(n.blockTag)&&(r=yield Es(i,e)),r[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&re(n.blockTag)&&(r=yield Es(i,e)),t==="call"&&n.blockTag?r[t](n.transaction,n.blockTag):r[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return r[t](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&re(a.fromBlock)||a.toBlock&&re(a.toBlock))&&(r=yield Es(i,e)),r.getLogs(a)}}return _r.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:n})})}var Cs=class extends ii{constructor(e,t){e.length===0&&_r.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if(Xt.isProvider(s)){let c=hs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let d=we(s);d.priority==null&&(d.priority=1),d.stallTimeout==null&&(d.stallTimeout=hs(s)?2e3:750),d.weight==null&&(d.weight=1);let p=d.weight;return(p%1||p>512||p<1)&&_r.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(d)}),r=n.reduce((s,o)=>s+o.weight,0);t==null?t=r/2:t>r&&_r.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let a=hf(n.map(s=>s.provider.network));a==null&&(a=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(a),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return au(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return hf(e)})}perform(e,t){return au(this,void 0,void 0,function*(){if(e==="sendTransaction"){let d=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pd.priority-p.priority);let a=this._highestBlockNumber,s=0,o=!0;for(;;){let d=iu(),p=r.filter(_=>_.runner&&d-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=K5(_,a,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:ru(_,iu()),request:{method:e,params:ft(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:ru(_,iu()),request:{method:e,params:ft(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:ru(_,null),request:{method:e,params:ft(t)},provider:this}),p+=_.weight}let c=[];r.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let b=r.filter(_=>_.done&&_.error==null);if(b.length>=this.quorum){let _=n(b);if(_!==void 0)return r.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xf(100).getPromise()),o=!1}let I=r.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return H5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};G5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),_r.throwError(S.reason||S.message,_,L)}),r.filter(_=>!_.done).length===0)break}return r.forEach(d=>{d.staller&&d.staller.cancel(),d.cancelled=!0}),_r.throwError("failed to meet quorum",M.errors.SERVER_ERROR,{method:e,params:t,results:r.map(d=>ru(d)),provider:this})})}};var Od=null;var su=new M(ke),Is="84842078b09946638c03157f83405213",Ss=class extends _i{constructor(e,t){let n=new Sa(e,t),r=n.connection;r.password&&su.throwError("INFURA WebSocket project secrets unsupported",M.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let a=r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===Is}},Sa=class extends St{static getWebSocketProvider(e,t){return new Ss(e,t)}static getApiKey(e){let t={apiKey:Is,projectId:Is,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(su.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),su.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:su.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(a,s)=>(t.projectId===Is&&ni(),Promise.resolve(!0))};return t.projectSecret!=null&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===Is}};var ou=class extends tn{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let r={request:n,resolve:null,reject:null},a=new Promise((s,o)=>{r.resolve=s,r.reject=o});return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(d=>d.request);return this.emit("debug",{action:"requestBatch",request:ft(o),provider:this}),On(this.connection,JSON.stringify(o)).then(d=>{this.emit("debug",{action:"response",request:o,response:d,provider:this}),s.forEach((p,c)=>{let b=d[c];if(b.error){let I=new Error(b.error.message);I.code=b.error.code,I.data=b.error.data,p.reject(I)}else p.resolve(b.result)})},d=>{this.emit("debug",{action:"response",error:d,request:o,provider:this}),s.forEach(p=>{p.reject(d)})})},10)),a}};var Bd=new M(ke),J5="ETHERS_JS_SHARED",Rs=class extends St{static getApiKey(e){return e&&typeof e!="string"&&Bd.throwArgumentError("invalid apiKey","apiKey",e),e||J5}static getUrl(e,t){Bd.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Bd.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var gf=new M(ke),Tf="62e1ad51b37b8e00394bda3b",Ps=class extends St{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Tf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:gf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:gf.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let r=`https://${n}/v1/lb/${t.applicationId}`,a={headers:{},url:r};return t.applicationSecretKey!=null&&(a.user="",a.password=t.applicationSecretKey),a}isCommunityResource(){return this.applicationId===Tf}};var vf=new M(ke),$5=1;function wf(i,e){let t="Web3LegacyFetcher";return function(n,r){let a={method:n,params:r,id:$5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ft(a),provider:this}),e(a,(d,p)=>{if(d)return this.emit("debug",{action:"response",fetcher:t,error:d,request:a,provider:this}),o(d);if(this.emit("debug",{action:"response",fetcher:t,request:a,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function Q5(i){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ft(n),provider:this}),i.request(n).then(r=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:r,provider:this}),r})}}var Ns=class extends tn{constructor(e,t){e==null&&vf.throwArgumentError("missing provider","provider",e);let n=null,r=null,a=null;typeof e=="function"?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),r=Q5(e)):e.sendAsync?r=wf(e,e.sendAsync.bind(e)):e.send?r=wf(e,e.send.bind(e)):vf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",r),B(this,"provider",a)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var _f=new M(ke);function uu(i,e){if(i==null&&(i="homestead"),typeof i=="string"){let n=i.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new tn(i);case"ws":case"wss":return new _i(i);default:_f.throwArgumentError("unsupported URL scheme","network",i)}}let t=cs(i);return(!t||!t._defaultProvider)&&_f.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:i}),t._defaultProvider({FallbackProvider:Cs,AlchemyProvider:Ca,AnkrProvider:ks,CloudflareProvider:As,EtherscanProvider:Ms,InfuraProvider:Sa,JsonRpcProvider:tn,NodesmithProvider:Rs,PocketProvider:Ps,Web3Provider:Ns,IpcProvider:null},e)}var te={};Kr(te,{AbiCoder:()=>na,ConstructorFragment:()=>Lt,ErrorFragment:()=>an,EventFragment:()=>Wt,FormatTypes:()=>xe,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>It,Indexed:()=>pi,Interface:()=>Di,LogDescription:()=>sa,Logger:()=>M,ParamType:()=>pt,RLP:()=>ro,SigningKey:()=>xn,SupportedAlgorithm:()=>ei,TransactionDescription:()=>oa,TransactionTypes:()=>Do,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>xo,Utf8ErrorReason:()=>jt,_TypedDataEncoder:()=>xt,_fetchData:()=>_d,_toEscapedUtf8String:()=>Cl,accessListify:()=>ln,arrayify:()=>V,base58:()=>hi,base64:()=>Dl,checkProperties:()=>Qr,checkResultErrors:()=>Xr,commify:()=>Rf,computeAddress:()=>gn,computeHmac:()=>bi,computePublicKey:()=>as,concat:()=>ye,deepCopy:()=>ft,defaultAbiCoder:()=>es,defaultPath:()=>xi,defineReadOnly:()=>B,dnsEncode:()=>ns,entropyToMnemonic:()=>wr,fetchJson:()=>On,formatBytes32String:()=>Il,formatEther:()=>Pf,formatUnits:()=>Fd,getAccountPath:()=>wc,getAddress:()=>fe,getContractAddress:()=>cr,getCreate2Address:()=>B0,getIcapAddress:()=>O0,getJsonWalletAddress:()=>xd,getStatic:()=>mt,hashMessage:()=>aa,hexConcat:()=>kt,hexDataLength:()=>Ft,hexDataSlice:()=>Ce,hexStripZeros:()=>bl,hexValue:()=>qn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>D0,isBytes:()=>pn,isBytesLike:()=>oi,isHexString:()=>re,isValidMnemonic:()=>vc,isValidName:()=>Bl,joinSignature:()=>Ga,keccak256:()=>ce,mnemonicToEntropy:()=>Ta,mnemonicToSeed:()=>pd,namehash:()=>Ni,nameprep:()=>Nl,parseBytes32String:()=>Sl,parseEther:()=>Nf,parseTransaction:()=>Oo,parseUnits:()=>Ld,poll:()=>Bn,randomBytes:()=>ti,recoverAddress:()=>br,recoverPublicKey:()=>No,resolveProperties:()=>Ie,ripemd160:()=>us,serializeTransaction:()=>ss,sha256:()=>en,sha512:()=>od,shallowCopy:()=>we,shuffled:()=>ps,solidityKeccak256:()=>Mf,solidityPack:()=>lu,soliditySha256:()=>Ef,splitSignature:()=>Hn,stripZeros:()=>nn,toUtf8Bytes:()=>Te,toUtf8CodePoints:()=>Pi,toUtf8String:()=>Yt,verifyMessage:()=>Uc,verifyTypedData:()=>jc,zeroPad:()=>lr});var kf="solidity/5.7.0";var Y5=new RegExp("^bytes([0-9]+)$"),X5=new RegExp("^(u?int)([0-9]*)$"),Z5=new RegExp("^(.*)\\[([0-9]*)\\]$"),e1="0000000000000000000000000000000000000000000000000000000000000000",Ra=new M(kf);function Af(i,e,t){switch(i){case"address":return t?lr(e,32):V(e);case"string":return Te(e);case"bytes":return V(e);case"bool":return e=e?"0x01":"0x00",t?lr(e,32):V(e)}let n=i.match(X5);if(n){let r=parseInt(n[2]||"256");return(n[2]&&String(r)!==n[2]||r%8!==0||r===0||r>256)&&Ra.throwArgumentError("invalid number type","type",i),t&&(r=256),e=F.from(e).toTwos(r),lr(e,r/8)}if(n=i.match(Y5),n){let r=parseInt(n[1]);return(String(r)!==n[1]||r===0||r>32)&&Ra.throwArgumentError("invalid bytes type","type",i),V(e).byteLength!==r&&Ra.throwArgumentError(`invalid value for ${i}`,"value",e),t?V((e+e1).substring(0,66)):e}if(n=i.match(Z5),n&&Array.isArray(e)){let r=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ra.throwArgumentError(`invalid array length for ${i}`,"value",e);let s=[];return e.forEach(function(o){s.push(Af(r,o,!0))}),ye(s)}return Ra.throwArgumentError("invalid type","type",i)}function lu(i,e){i.length!=e.length&&Ra.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return i.forEach(function(n,r){t.push(Af(n,e[r]))}),W(ye(t))}function Mf(i,e){return ce(lu(i,e))}function Ef(i,e){return en(lu(i,e))}var Cf="units/5.7.0";var If=new M(Cf),Sf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Rf(i){let e=String(i).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||i==="."||i==="-.")&&If.throwArgumentError("invalid value","value",i);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let r="";for(e.length===2&&(r="."+(e[1]||"0"));r.length>2&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);let a=[];for(;t.length;)if(t.length<=3){a.unshift(t);break}else{let s=t.length-3;a.unshift(t.substring(s)),t=t.substring(0,s)}return n+a.join(",")+r}function Fd(i,e){if(typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return $r(i,e??18)}function Ld(i,e){if(typeof i!="string"&&If.throwArgumentError("value must be a string","value",i),typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return cn(i,e??18)}function Pf(i){return Fd(i,18)}function Nf(i){return Ld(i,18)}var du="ethers/5.7.2";var Df=new M(du);try{let i=window;i._ethers==null&&(i._ethers=Ud)}catch{}var Fn;(function(i){i.Mainnet="Mainnet",i.Custom="Custom",i.Gnosis="Xdai",i.Goerli="Goerli",i.Xdai="Xdai",i.XdaiQa="XdaiQa"})(Fn||(Fn={}));var pu;(function(i){i.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",i.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",i.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",i.Custom=""})(pu||(pu={}));var Pa;(function(i){i.Mainnet="https://colony.io/reputation/mainnet",i.Goerli="https://colony.io/reputation/goerli",i.Xdai="https://xdai.colony.io/reputation/xdai",i.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",i.Custom="http://localhost:3000"})(Pa||(Pa={}));var yu;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/metatransaction/xdai",i.Xdai="https://xdai.colony.io/metatransaction/xdai",i.XdaiQa="https://xdai.colony.io/metatransaction/xdai",i.Custom=""})(yu||(yu={}));var jd;(function(i){i.Mainnet="",i.Goerli="",i.Gnosis="https://xdai.colony.io/rpc/",i.Xdai="https://xdai.colony.io/rpc/",i.XdaiQa="https://xdai.colony.io/rpc/",i.Custom=""})(jd||(jd={}));var Ds;(function(i){i.Mainnet=".colony.joincolony.eth",i.Goerli=".colony.joincolony.test",i.Gnosis=".colony.joincolony.colonyxdai",i.Xdai=".colony.joincolony.colonyxdai",i.XdaiQa=".colony.joincolony.colonyxdai",i.Custom=".colony.joincolony.test"})(Ds||(Ds={}));var Os;(function(i){i.Mainnet=".user.joincolony.eth",i.Goerli=".user.joincolony.test",i.Gnosis=".user.joincolony.colonyxdai",i.Xdai=".user.joincolony.colonyxdai",i.XdaiQa=".user.joincolony.colonyxdai",i.Custom=".user.joincolony.test"})(Os||(Os={}));var Vd;(function(i){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=i.Mainnet||(i.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=i.Gnosis||(i.Gnosis={}))})(Vd||(Vd={}));var _e;(function(i){i[i.RootDomain=1]="RootDomain",i[i.RootTeam=1]="RootTeam",i[i.RootPot=1]="RootPot",i[i.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var Ot;(function(i){i[i.Null=0]="Null",i[i.Staking=1]="Staking",i[i.Submit=2]="Submit",i[i.Reveal=3]="Reveal",i[i.Closed=4]="Closed",i[i.Finalizable=5]="Finalizable",i[i.Finalized=6]="Finalized",i[i.Failed=7]="Failed"})(Ot||(Ot={}));var Hd="0x12345678",qd;(function(i){i[i.Unassigned=0]="Unassigned",i[i.Domain=1]="Domain",i[i.Task=2]="Task",i[i.Payment=3]="Payment",i[i.Expenditure=4]="Expenditure"})(qd||(qd={}));var vt;(function(i){i[i.Recovery=0]="Recovery",i[i.Root=1]="Root",i[i.Arbitration=2]="Arbitration",i[i.Architecture=3]="Architecture",i[i.ArchitectureSubdomain=4]="ArchitectureSubdomain",i[i.Funding=5]="Funding",i[i.Administration=6]="Administration",i[i.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var ve;(function(i){i.CoinMachine="CoinMachine",i.EvaluatedExpenditure="EvaluatedExpenditure",i.FundingQueue="FundingQueue",i.IVotingReputation="IVotingReputation",i.OneTxPayment="OneTxPayment",i.ReputationBootstrapper="ReputationBootstrapper",i.StagedExpenditure="StagedExpenditure",i.StakedExpenditure="StakedExpenditure",i.StreamingPayments="StreamingPayments",i.TokenSupplier="TokenSupplier",i.VotingReputation="VotingReputation",i.Whitelist="Whitelist"})(ve||(ve={}));var Gd=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],kr=class{static createInterface(){return new te.Interface(Gd)}static connect(e,t){return new oe(e,Gd,t)}};Et(kr,"abi",Gd);var zd=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ar=class{static createInterface(){return new te.Interface(zd)}static connect(e,t){return new oe(e,zd,t)}};Et(Ar,"abi",zd);var Of=(i,e)=>{throw new Error(`${e}: ${i}`)},Wd=i=>i!=null;var{keccak256:n1,toUtf8Bytes:i1}=te,{MaxUint256:r1}=ht;var Na=i=>te.formatEther(i),Da=i=>te.parseEther(i);var Kd=i=>{let e=i.reduce((t,n)=>t|1<{let e=F.from(i);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Wd)},Mr=async(i,e,t,n)=>{if(F.from(t).eq(F.from(n)))return r1;let{skillId:r}=await e.getDomain(t),{skillId:a}=await e.getDomain(n),{children:s}=await i.getSkill(r),o=s.findIndex(d=>d.eq(a));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},Vi=i=>n1(i1(i));var Oa=async(i,e)=>(await Ar.connect(i,e).version()).toNumber(),Jd=(i,e)=>i.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Wd);var{hexDataSlice:$d}=te,{MaxUint256:a1}=ht,Bf=i=>{let e=$d(i,0,3),t=F.from($d(i,4,35)),n=F.from($d(i,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ff=async(i,e,t,n,r)=>{let a=r||await e.signer?.getAddress();if(!a)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(a,t,n))return[F.from(t),a1,a];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(a,o,n))throw new Error(`${a} does not have the permission ${n} in any parent domain`);let p=await Mr(i,e,o,t);if(p.lt(0))throw new Error(`${a} does not have the permission ${n} in any parent domain`);return[o,p,a]},s1=async(i,e,t,n,r)=>{let a=await Promise.all(n.map(s=>Ff(i,e,t,s,r)));for(let s=0;sArray.isArray(n)?n.length===1?ai(i,e,t,n[0],r):s1(i,e,t,n,r):Ff(i,e,t,n,r);var{MaxUint256:Lf}=ht,{AddressZero:o1}=ht;async function u1(i,e){let t;try{return t=await i.getCapabilityRoles(te.hexZeroPad(e,4)),cu(t)}catch{return[]}}async function Bs(i,e,t,n,r,a,s){let o,{skillId:d}=await e.getDomain(r),{sig:p,permissionDomainId:c,childSkillIndex:b}=Bf(s),I=kr.connect(a,n.signer||n.provider),_=await u1(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(r).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Lf}else{let{skillId:U}=await e.getDomain(c),q=await i.getChildSkillId(U,b);if(q.eq(d))o=Lf;else{let{children:E}=await i.getSkill(d),J=E.findIndex($=>$.eq(q));if(J<0)throw new Error(`Could not find ${q} as a child of ${d}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(d,o1);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:l1}=ht,si=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let r=n?.network||Fn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Pa[r]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}/noProof`,o=await si.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let r=await this.getBaseEndpoint(n),a=F.from(e||0).toString(),s=`${r}/${a}/${t}`,o=await si.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let r=`${await this.getBaseEndpoint(t)}/${e}/all`,a=await si.fetchReputation(r),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(d,p)=>{let c=p+1,b=await this.colony.getDomain(c);return{domainId:c,skillId:b.skillId.toNumber()}}))||[]).map(d=>{let p,c=(a?.reputations||[]).find(({skill_id:b})=>b===d.skillId);return c&&(p=c?.reputationAmount),{...d,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}`;return si.fetchReputation(a)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),r=F.from(e||0).toString(),a=`${n}/${r}/${l1}/noProof`,s=await si.fetchReputation(a);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,r=3){let{reputationAmount:a}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return a.mul(F.from(10).pow(r)).div(s).toNumber()/10**r}};var _t=i=>Array.from(Array(i-1)).map(e=>e+1);var Uf=10,Gk=_t(Uf),jf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vf=Uf-1;var qf=6,Kk=_t(qf),Hf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},Gf=qf-1;var zf=7,Qk=_t(zf),Wf={1:[],2:[],3:[],4:[],5:[],6:[]},Kf=zf-1;var Jf=7,Zk=_t(Jf),$f={1:[],2:[],3:[],4:[],5:[],6:[]},Qf=Jf-1;var Yf=4,nA=_t(Yf),Xf={1:[],2:[],3:[]},Zf=Yf-1;var em=5,aA=_t(em),tm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},nm=em-1;var im=2,uA=_t(im),rm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},am=im-1;var sm=4,pA=_t(sm),om={1:[1,2,3],2:[1,2,3],3:[1,2,3]},um=sm-1;var lm=7,fA=_t(lm),dm={1:[],2:[],3:[],4:[],5:[],6:[]},pm=lm-1;var ym=11,bA=_t(ym),Qd={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Yd=ym-1;var cm=6,TA=_t(cm),fm={1:[],2:[],3:[],4:[],5:[]},mm=cm-1;var qi=(i,e,t)=>{switch(i){case ve.CoinMachine:{let n=jf[e];return!!n&&!n.includes(t)}case ve.EvaluatedExpenditure:{let n=Hf[e];return!!n&&!n.includes(t)}case ve.FundingQueue:{let n=Wf[e];return!!n&&!n.includes(t)}case ve.IVotingReputation:{let n=Qd[e];return!!n&&!n.includes(t)}case ve.OneTxPayment:{let n=$f[e];return!!n&&!n.includes(t)}case ve.ReputationBootstrapper:{let n=Xf[e];return!!n&&!n.includes(t)}case ve.StagedExpenditure:{let n=rm[e];return!!n&&!n.includes(t)}case ve.StakedExpenditure:{let n=tm[e];return!!n&&!n.includes(t)}case ve.StreamingPayments:{let n=om[e];return!!n&&!n.includes(t)}case ve.TokenSupplier:{let n=dm[e];return!!n&&!n.includes(t)}case ve.VotingReputation:{let n=Qd[e];return!!n&&!n.includes(t)}case ve.Whitelist:{let n=fm[e];return!!n&&!n.includes(t)}default:return Of(i,"Could not find extension with name")}};var d1={[ve.CoinMachine]:Vf,[ve.EvaluatedExpenditure]:Gf,[ve.FundingQueue]:Kf,[ve.IVotingReputation]:Yd,[ve.OneTxPayment]:Qf,[ve.ReputationBootstrapper]:Zf,[ve.StagedExpenditure]:am,[ve.StakedExpenditure]:nm,[ve.StreamingPayments]:um,[ve.TokenSupplier]:pm,[ve.VotingReputation]:Yd,[ve.Whitelist]:mm};var Fh=En(hm(),1);var gp=En(Dh(),1);var Re;(function(i){i.DEFAULT="default",i.Annotation="annotation",i.Colony="colony",i.Decision="decision",i.Domain="domain",i.Misc="misc"})(Re||(Re={}));var xp=2,bp;(function(i){i[i.LightPink=0]="LightPink",i[i.Pink=1]="Pink",i[i.Black=2]="Black",i[i.EmeraldGreen=3]="EmeraldGreen",i[i.Blue=4]="Blue",i[i.Yellow=5]="Yellow",i[i.Red=6]="Red",i[i.Green=7]="Green",i[i.Periwinkle=8]="Periwinkle",i[i.Gold=9]="Gold",i[i.Aqua=10]="Aqua",i[i.BlueGrey=11]="BlueGrey",i[i.Purple=12]="Purple",i[i.Orange=13]="Orange",i[i.Magenta=14]="Magenta",i[i.PurpleGrey=15]="PurpleGrey"})(bp||(bp={}));var Oh=i=>`Validation error(s): -${i.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,_x=i=>({...i,isWhitelistActivated:i.isWhitelistActivated||!1,colonySafes:i.colonySafes||[],colonyTokens:i.colonyTokens||[],verifiedAddresses:i.verifiedAddresses||[]}),Tp=(i,e)=>{let t=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=gp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})(i);if(t.success){if(t.data.version!==xp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Oh(t.errors);throw new Error(n)};var Bh=(i,e)=>{let t=i===Re.Colony?_x(e):e,n=(r=>{let a=p=>{let c=E=>E.name==="colony"&&typeof E.data=="object"&&E.data!==null&&b(E.data)&&typeof E.version=="number",b=E=>typeof E.colonyName=="string"&&(E.colonyDisplayName===void 0||typeof E.colonyDisplayName=="string")&&(E.colonyAvatarHash===void 0||typeof E.colonyAvatarHash=="string")&&(E.colonyTokens===void 0||Array.isArray(E.colonyTokens)&&E.colonyTokens.every(J=>typeof J=="string"))&&(E.verifiedAddresses===void 0||Array.isArray(E.verifiedAddresses)&&E.verifiedAddresses.every(J=>typeof J=="string"))&&(E.isWhitelistActivated===void 0||typeof E.isWhitelistActivated=="boolean")&&(E.colonySafes===void 0||Array.isArray(E.colonySafes)&&E.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=E=>typeof E.chainId=="string"&&typeof E.contractAddress=="string"&&typeof E.moduleContractAddress=="string"&&typeof E.safeName=="string",_=E=>E.name==="domain"&&typeof E.data=="object"&&E.data!==null&&Array.isArray(E.data)===!1&&v(E.data)&&typeof E.version=="number",v=E=>(E.domainName===void 0||typeof E.domainName=="string")&&(E.domainColor===void 0||E.domainColor===0||E.domainColor===1||E.domainColor===2||E.domainColor===3||E.domainColor===4||E.domainColor===5||E.domainColor===6||E.domainColor===7||E.domainColor===8||E.domainColor===9||E.domainColor===10||E.domainColor===11||E.domainColor===12||E.domainColor===13||E.domainColor===14||E.domainColor===15)&&(E.domainPurpose===void 0||typeof E.domainPurpose=="string"),S=E=>E.name==="annotation"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.annotationMsg=="string"&&typeof E.version=="number",L=E=>E.name==="decision"&&typeof E.data=="object"&&E.data!==null&&O(E.data)&&typeof E.version=="number",O=E=>typeof E.title=="string"&&(E.description===void 0||typeof E.description=="string")&&typeof E.motionDomainId=="number",U=E=>E.name==="misc"&&typeof E.data=="object"&&E.data!==null&&typeof E.data.name=="string"&&typeof E.data.value=="string"&&typeof E.version=="number";return typeof p=="object"&&p!==null&&(E=>(()=>E.name==="colony"?c(E):E.name==="domain"?_(E):E.name==="annotation"?S(E):E.name==="decision"?L(E):E.name==="misc"?U(E):!1)())(p)},s=[],o=gp.default.validate.report(s);a(r)===!1&&((p,c,b=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((H,se)=>typeof H=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((H,se)=>typeof H=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:H})).every(H=>H)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((H,se)=>(typeof H=="object"&&H!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H}))&&v(H,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:H})).every(H=>H)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(H=>H),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(H=>H),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(H=>H),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(H=>H),q=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&E(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),E=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(H=>H),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(H=>H),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(H=>H),le=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?q(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&le(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(r,"$input",!0);let d=s.length===0;return{success:d,errors:s,data:d?r:void 0}})({type:i,data:t,version:xp});if(!n.success){let r=Oh(n.errors);throw new Error(r)}return n.data};var vp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},wp=vp;var _p=(0,Fh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Gs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},ja=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(Gs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),a=await(await _p(n)).json();return Tp(a,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),a=await(await _p(n)).json(),s=Object.entries(Gs).find(([,d])=>d===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return Tp(a,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await _p(t);try{return await n.json()}catch(r){throw new Error(`Could not parse IPFS metadata. Original error: ${r.message}`)}}async uploadMetadata(e,t){let n=Bh(e,t),r=JSON.stringify(n);return this.adapter.uploadJson(r)}};var KM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var kp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Et(kn,"abi",kp);var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],An=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Et(An,"abi",Ap);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Et(Pr,"abi",Mp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Lh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",Ex=i=>i.length>1,Ln=class extends gr{constructor(...e){Ex(e)?super(...e):super(Ku,Lh,e[0])}deploy(e,t,n,r){return super.deploy(e,t,n,r||{})}getDeployTransaction(e,t,n,r){return super.getDeployTransaction(e,t,n,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};Et(Ln,"bytecode",Lh),Et(Ln,"abi",Ku);var Ep=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Nr=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Et(Nr,"abi",Ep);var Cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Dr=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Et(Dr,"abi",Cp);var Or;(function(i){i.TokenClient="TokenClient",i.TokenLockingClient="TokenLockingClient"})(Or||(Or={}));var Mn;(function(i){i.Colony="Colony",i.ColonyLegacy="ColonyLegacy",i.Erc20="Erc20",i.Erc2612="Erc2612",i.Sai="Sai"})(Mn||(Mn={}));var{AddressZero:Uh}=ht;async function Sx(i){try{await i.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Rx=async(i,e)=>{let t,n=!0,r=!0,a=!0;t=Ln.connect(i,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await Sx(t)}catch{n=!1}try{await t.getMetatransactionNonce(Uh)}catch{r=!1}try{await t.nonces(Uh)}catch{a=!1}return n?r?t.tokenClientType=Mn.Colony:(t=Nr.connect(i,e),t.tokenClientType=Mn.ColonyLegacy):a?(t=An.connect(i,e),t.tokenClientType=Mn.Erc2612):(t=kn.connect(i,e),t.tokenClientType=Mn.Erc20),t.clientType=Or.TokenClient,t},Ip=Rx;var Px=(i,e)=>{let t=Dr.connect(i,e);return t.clientType=Or.TokenLockingClient,t},Sp=Px;var{AddressZero:Rp}=ht,Nx=kn.connect(Rp,new ri.BaseProvider(3656691)).interface,Dx=Pr.connect(Rp,new ri.BaseProvider(3656691)).interface,Ox=An.connect(Rp,new ri.BaseProvider(3656691)).interface;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],zs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};zs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Ws.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Br=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Br.abi=Dp;var ki=class{constructor({colonyNetwork:e,contract:t,method:n,args:r,eventData:a,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=r,this.eventData=a,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,Gs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let a=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(a.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${a.data.reason}`);if(!a.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(a.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jd(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Fx,solidityKeccak256:Lx,splitSignature:Ux}=te,Fr=class extends ki{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:r}=n;if(!r)throw new Error("No provider found");let a;this.colonyNetwork.network===Fn.Custom?a=1:a=(await r.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),d=Lx(["uint256","address","uint256","bytes"],[o.toString(),t,a,e]),p=Fx(d),c=await n.signMessage(p),{r:b,s:I,v:_}=Ux(c),v={target:t,payload:e,userAddress:s,r:b,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(i,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===i);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===i);if(t?.args)return t.args}},Ju=(i,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let r=0;r{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Lr=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Lr.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ur=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ur.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],jr=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};jr.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Vr=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Vr.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qr=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};qr.abi=Up;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hr=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Hr.abi=jp;var{AddressZero:Wx}=ht,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Vi(Un.extensionType),e.address);if(t===Wx)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let n=await Oa(t,e.colonyNetwork.signerOrProvider);if(!qi(Un.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Un.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Un(e,a,n)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,r){let a=[].concat(e),s=n||_e.RootDomain,o=r?[].concat(r):Array(a.length).fill(this.colony.token.address),d=[].concat(t);if(a.length!==d.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==d.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(a.keys());p.sort((_,v)=>a[_].localeCompare(a[v]));let c=p.map(_=>a[_]),b=p.map(_=>d[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ai(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ai(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,c,I,b,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Vi(ve.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},zi=Un;zi.supportedVersions=[{version:3,factory:Vr},{version:4,factory:qr},{version:5,factory:Hr}],zi.extensionType=ve.OneTxPayment;var jn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async r=>({...ne("Transfer",r)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Ks=class extends jn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Ln.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Js=class extends jn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=An.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let r=await this.colonyNetwork.getTokenLocking();return[n||r.address,t]},async r=>({...ne("Approval",r)}))}};var jh=async(i,e)=>{let t=await Ip(e,i.signerOrProvider);switch(t.tokenClientType){case Mn.Colony:return new Ks(i,t);case Mn.Erc20:return new jn(i,t);case Mn.Erc2612:return new Js(i,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gr=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Gr.abi=Vp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zr=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};zr.abi=qp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wr=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Wr.abi=Hp;var{AddressZero:Gp}=ht;var $u=F.from(10).pow(18),Vn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Vi(Vn.extensionType),e.address);if(t===Gp)throw new Error(`${Vn.extensionType} extension is not installed for this Colony`);let n=await Oa(t,e.colonyNetwork.signerOrProvider);if(!qi(Vn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Vn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let r=Vn.supportedVersions.find(s=>s.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the ${Vn.extensionType} contract is not supported in the SDK as of now`);let a=r.connect(t,e.colonyNetwork.signerOrProvider);return new Vn(e,a,n)}static getLatestSupportedVersion(){return Vn.supportedVersions[Vn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),r=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,a=await this.colony.getInternalColonyContract().signer.signMessage(r);return te.keccak256(a)}async getSideVoted(e,t,n){let{key:r,value:a,branchMask:s,siblings:o}=n,d;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,r,a,s,o),d=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,r,a,s,o),d=1}catch{}}return d}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,r,a,s,o,d){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,r,a,s,o,d],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:r,branchMask:a,siblings:s}=await Bs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Gp,Hd);return[e,t,Gp,Hd,n,r,a,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Re.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let r=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",n,r.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let r=async()=>{let a=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Ot.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Ot[s]}" state`);let o=await this.getMotion(e),d=await this.colony.colonyNetwork.getTokenLocking();if((await d.getUserDeposit(this.colony.token.address,a)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await d.getUserApproval(this.colony.token.address,a,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(a,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(n).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Na(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ai(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:q,branchMask:E,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,a,v);return[e,S,L,F.from(t),n,U,q,E,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",r,async a=>({...ne("MotionStaked",a),...ne("MotionEventSet",a)}))}submitVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Ot.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Ot[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:b,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,d,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,b,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async r=>({...ne("MotionVoteSubmitted",r)}))}revealVote(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Ot.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Ot[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(a),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,d,s),c=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,c,p);if(!b)throw new Error(`Could not find a vote cast by ${d} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(b),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async r=>({...ne("MotionVoteRevealed",r)}))}escalateMotion(e,t){let n=async()=>{let r=await this.votingReputationContract.getMotionState(e);if(r!==Ot.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Ot[r]}" state`);let{domainId:a,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),d=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Mr(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,a),{key:c,value:b,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,d,s);return[e,t,p,c,b,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async r=>({...ne("MotionEscalated",r)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Vi(ve.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,r,a,s,o,d,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:r,endVoteThreshold:a,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:d,escalationPhaseDuration:p}}},Wi=Vn;Wi.supportedVersions=[{version:7,factory:Gr},{version:8,factory:zr},{version:9,factory:Wr}],Wi.extensionType=ve.VotingReputation;var Qx={["motion"]:Wi,["oneTx"]:zi},qa=class{static async connect(e,t){let n=await Oa(t,e.signerOrProvider),r=qa.supportedVersions.find(p=>p.version===n)?.factory;if(!r)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let a=r.connect(t,e.signerOrProvider),s=await a.getToken(),o=await jh(e,s),d=new qa(e,a,o,n);return await d.updateExtensions(),d}static getLatestSupportedVersion(){return qa.supportedVersions[qa.supportedVersions.length-1].version}constructor(e,t,n,r){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new si(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=r}createColonyTxCreator(e,t,n,r,a){return new Va({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:r,txConfig:a})}createPermissionedColonyTxCreator(e,t,n,r,a,s){return new Va({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:r,eventData:a,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Wi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await zi.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:r}=await this.colony.getDomain(t),a=r,s=e||this.token.address;return this.colony.getFundingPotBalance(a,s)}return(e?new jn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,r){let a=_e.RootDomain,s=n||_e.RootDomain,o=r||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ai(this.colonyNetwork.getInternalNetworkContract(),this.colony,a,vt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),I=await Mr(b,this.colony,a,s),_=await Mr(b,this.colony,a,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,a,I,_,v,S,e,o]},async d=>({...ne("ColonyFundsMovedBetweenFundingPots",d)}))}async getReputation(e,t=_e.RootDomain,n=3){let{skillId:r}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(r,e,void 0,n)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:r}=await this.reputation.getReputation(n,e);return r}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Re.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Re.Annotation})}installExtension(e){let t=Qx[e],n=t.getLatestSupportedVersion(),{extensionType:r}=t;if(!qi(r,n,this.version))throw new Error(`v${n} of ${r} extension is not compatible with colony v${this.version}`);let a=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Vi(r),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,a.interface)}))}async getRoles(e,t=_e.RootDomain){let n=await this.colony.getUserRoles(e,t);return cu(n)}setRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=await this.getRoles(e,n),a=Array.from(new Set([...r,...[].concat(t)])),s=Kd(a);return[e,n,s]},{roles:vt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}unsetRoles(e,t,n=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let a=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Kd(a);return[e,n,s]},{roles:vt.Architecture,domain:n},async r=>({...ne("ColonyRoleSet",r),...ne("RecoveryRoleSet",r)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],r=await t.getTokenLocking();return e?n=[...e,r]:n=[r],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async r=>({...ne("ArbitraryReputationUpdate",r)}))}smiteReputation(e,t,n=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:vt.Arbitration},async r=>({...ne("ArbitraryReputationUpdate",r)}))}},Ha=qa;Ha.supportedVersions=[{version:11,factory:Lr},{version:12,factory:Ur},{version:13,factory:jr}];var{splitSignature:Yx}=te,Qu=class extends ki{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let r=this.colonyNetwork.getSigner(),{provider:a}=r;if(!a)throw new Error("No provider found");let s;this.colonyNetwork.network===Fn.Custom?s=1:s=(await a.getNetwork()).chainId;let o=await r.getAddress(),d=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,b=await r._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:d.toString(),deadline:c}),{r:I,s:_,v}=Yx(b),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var $s=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Sp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:Vh}=te,{AddressZero:zp}=ht,Qs=class{constructor(e,t){this.network=t?.network||Fn.Gnosis,this.ipfs=new ja(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||yu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Pa[this.network]},this.networkContract=Br.connect(t?.customNetworkAddress||pu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new $s(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,r,a){return new ki({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createMetaTxCreator(e,t,n,r,a){return new Fr({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createEip2612TxCreator(e,t,n,r,a){return new Qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:r,txConfig:a})}createColony(e,t,n){let r=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[zp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let a=await r();return typeof n=="string"?a[6]=n:a[6]=await this.ipfs.uploadMetadata(Re.Colony,n),a},async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",r,async a=>({...ne("TokenDeployed",a),...ne("ColonyAdded",a),...ne("TokenAuthorityDeployed",a)}))}async getColony(e){return Ha.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.network],""):null}async getColonyAddress(e){let t=Vh(`${e}${Ds[this.network]}`),n=await this.networkContract.addr(t);return n!==zp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.network],""):null}async getUserAddress(e){let t=Vh(`${e}${Os[this.network]}`),n=await this.networkContract.addr(t);return n!==zp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async r=>({...ne("TokenDeployed",r)}))}};var{isAddress:Zx}=te,qh=new ri.Web3Provider(window.ethereum),zh,Hh,Rt,dn,Kp,eg=async()=>(await qh.send("eth_requestAccounts",[]),qh.getSigner()),tg=async i=>{let e=await eg();zh=await e.getAddress(),Hh=new Qs(e),Rt=await Hh.getColony(i)},ng=async i=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Da(i)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},ig=async i=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(i);dn=F.from(i);let t=await Rt.ext.motions.getRemainingStakes(i),n=await Rt.ext.motions.getMotionState(i);return{...e,motionState:Ot[n],remainingStakes:t}},rg=async i=>{await Rt.ext.motions?.approveStake(Da(i)).tx().mined()},ag=async i=>{await Rt.ext.motions?.stakeMotion(dn,1,i).tx().mined()},sg=async i=>{await Rt.ext.motions?.stakeMotion(dn,0,i).tx().mined()},og=async()=>{await Rt.ext.motions?.submitVote(dn,1).tx().mined(),Kp=1},ug=async()=>{await Rt.ext.motions?.submitVote(dn,0).tx().mined(),Kp=0},lg=async()=>{await Rt.ext.motions?.revealVote(dn,Kp).tx().mined()},dg=async()=>{await Rt.ext.motions?.finalizeMotion(dn).tx().mined()},Gh=document.querySelector("#current-wallet-address"),Yu=document.querySelector("#address"),Wh=document.querySelector("#stake_clny_amount"),Wp=document.querySelector("#payment_amount"),Jp=document.querySelector("#stake_amount"),Kh=document.querySelector("#button_create_motion"),Jh=document.querySelector("#motion_id"),$h=document.querySelector("#button_connect"),Qh=document.querySelector("#button_stake_clny"),Yh=document.querySelector("#button_get_motion"),Xh=document.querySelector("#button_stake_yay"),Zh=document.querySelector("#button_stake_nay"),e6=document.querySelector("#button_vote_yay"),t6=document.querySelector("#button_vote_nay"),n6=document.querySelector("#button_reveal"),i6=document.querySelector("#button_finalize"),$p=document.querySelector("#error"),r6=document.querySelector("#result");if(!Yu||!Wh||!Wp||!Jh||!Jp||!$p||!r6||!$h||!Qh||!Kh||!Yh||!Xh||!Zh||!e6||!t6||!n6||!i6)throw new Error("Could not find all required HTML elements");var Bt=i=>{$p.innerText=`Found an error: ${i.message}`,console.error(i)},Ai=()=>{$p.innerText=""},Ee=i=>{r6.innerText=i};$h.addEventListener("click",async()=>{Ai();let i=Yu.value;if(!Zx(i))return Bt(new Error("This is not a valid address"));Ee("Processing...");try{await tg(Yu.value),Gh&&(Gh.innerText=zh),Ee(` +`)}static register(e,t){if(t||(t=e.locale),ix)try{let n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[t]||B(n._ethers.wordlists,t,e))}catch{}}};var rx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ds=null;function xc(a){if(ds==null&&(ds=rx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Tn.check(a)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ds=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ul=class extends Tn{constructor(){super("en")}getWord(e){return xc(this),ds[e]}getWordIndex(e){return xc(this),ds.indexOf(e)}},dl=new ul;Tn.register(dl);var vi={en:dl};var bc="hdnode/5.7.0";var ls=new E(bc),sx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ox=ve("Bitcoin seed"),gr=2147483648;function Tc(a){return(1<=256)throw new Error("Depth too large!");return gc(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(br,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~gr));let n=new Uint8Array(37);if(e&gr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(j(this.privateKey),1),t&&(t+="'")}else n.set(j(this.publicKey));for(let x=24;x>=0;x-=8)n[33+(x>>3)]=e>>24-x&255;let i=j(xa(ea.sha512,this.chainCode,n)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=jo(F.from(r).add(this.privateKey).mod(sx)):l=new bn(W(r))._addPoint(this.publicKey);let p=t,c=this.mnemonic;return c&&(p=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Ct(br,o,l,this.fingerprint,jo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=gr)throw new Error("invalid path index - "+r);n=n._derive(gr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=gr)throw new Error("invalid path index - "+r);n=n._derive(s)}else throw new Error("invalid path component - "+r)}return n}static _fromSeed(e,t){let n=j(e);if(n.length<16||n.length>64)throw new Error("invalid seed");let i=j(xa(ea.sha512,ox,n));return new Ct(br,jo(i.slice(0,32)),null,"0x00000000",jo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=ll(n),e=wi(Tr(e,n),n),Ct._fromSeed(pl(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ha.decode(e);(t.length!==82||gc(t.slice(0,78))!==e)&&ls.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let n=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(br,null,W(o),i,s,r,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(br,W(o.slice(1)),null,i,s,r,n,null)}return ls.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function pl(a,e){e||(e="");let t=ve("mnemonic"+e,Jt.NFKD);return Ti(ve(a,Jt.NFKD),t,2048,64,"sha512")}function Tr(a,e){e=ll(e),ls.checkNormalize();let t=e.split(a);if(t.length%3!==0)throw new Error("invalid mnemonic");let n=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=Tc(s);if((j(en(n.slice(0,r/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return W(n.slice(0,r/8))}function wi(a,e){if(e=ll(e),a=j(a),a.length%4!==0||a.length<16||a.length>32)throw new Error("invalid entropy");let t=[0],n=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=a[s],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=a[s]>>8-n,t.push(a[s]&ux(8-n)),n+=3);let i=a.length/4,r=j(en(a))[0]&Tc(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vc(a,e){try{return Tr(a,e),!0}catch{}return!1}function wc(a){return(typeof a!="number"||a<0||a>=gr||a%1)&&ls.throwArgumentError("invalid account index","index",a),`m/44'/60'/${a}'/0/0`}var _c="random/5.7.0";var yl=new E(_c);function dx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var kc=dx(),Ho=kc.crypto||kc.msCrypto;(!Ho||!Ho.getRandomValues)&&(yl.warn("WARNING: Missing strong random number source"),Ho={getRandomValues:function(a){return yl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ta(a){(a<=0||a>1024||a%1||a!=a)&&yl.throwArgumentError("invalid length","length",a);let e=new Uint8Array(a);return Ho.getRandomValues(e),j(e)}function ps(a){a=a.slice();for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),n=a[e];a[e]=a[t],a[t]=n}return a}var ml=Mn(fl());var qo="json-wallets/5.7.0";function ga(a){return typeof a=="string"&&a.substring(0,2)!=="0x"&&(a="0x"+a),j(a)}function vr(a,e){for(a=String(a);a.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new Ta.default.Counter(x),J=new Ta.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=ce(ye([U,$])),T={address:a.address.substring(2).toLowerCase(),id:Ec(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(c).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=ta(16),N=new Ta.default.Counter(R),q=new Ta.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),I=new Date,u=I.getUTCFullYear()+"-"+vr(I.getUTCMonth()+1,2)+"-"+vr(I.getUTCDate(),2)+"T"+vr(I.getUTCHours(),2)+"-"+vr(I.getUTCMinutes(),2)+"-"+vr(I.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Oc(a,e,t){if(zo(a)){t&&t(0);let n=xl(a,e);return t&&t(1),Promise.resolve(n)}return Go(a)?Dc(a,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bc(a,e){if(zo(a))return xl(a,e);if(Go(a))return Nc(a,e);throw new Error("invalid JSON wallet")}var Fc="wallet/5.7.0";var Lc=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},wr=new E(Fc);function fx(a){return a!=null&&ie(a.privateKey,32)&&a.address!=null}function mx(a){let e=a.mnemonic;return e&&e.phrase}var Nn=class extends Pt{constructor(e,t){if(super(),fx(e)){let n=new bn(e.privateKey);if(B(this,"_signingKey",()=>n),B(this,"address",gn(this.publicKey)),this.address!==fe(e.address)&&wr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),mx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ba,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);gn(s.privateKey)!==this.address&&wr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(bn.isSigningKey(e))e.curve!=="secp256k1"&&wr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let n=new bn(e);B(this,"_signingKey",()=>n)}B(this,"_mnemonic",()=>null),B(this,"address",gn(this.publicKey))}t&&!Xt.isProvider(t)&&wr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Nn(this,e)}signTransaction(e){return Se(e).then(t=>{t.from!=null&&(fe(t.from)!==this.address&&wr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let n=this._signingKey().signDigest(ce(ss(t)));return ss(t,n)})}signMessage(e){return Lc(this,void 0,void 0,function*(){return zr(this._signingKey().signDigest(rr(e)))})}_signTypedData(e,t,n){return Lc(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,n,r=>(this.provider==null&&wr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return zr(this._signingKey().signDigest(gt.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),wl(this,e,t,n)}static createRandom(e){let t=ta(16);e||(e={}),e.extraEntropy&&(t=j(Ce(ce(ye([t,e.extraEntropy])),0,16)));let n=wi(t,e.locale);return Nn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Oc(e,t,n).then(i=>new Nn(i))}static fromEncryptedJsonSync(e,t){return new Nn(Bc(e,t))}static fromMnemonic(e,t,n){return t||(t=ba),new Nn(Ct.fromMnemonic(e,null,n).derivePath(t))}};function Uc(a,e){return xi(rr(a),e)}function Vc(a,e,t,n){return xi(gt.hash(a,e,t),n)}var ia={};Ki(ia,{AlchemyProvider:()=>Ir,AlchemyWebSocketProvider:()=>_s,AnkrProvider:()=>ks,BaseProvider:()=>aa,CloudflareProvider:()=>As,EtherscanProvider:()=>Es,FallbackProvider:()=>Is,Formatter:()=>X,InfuraProvider:()=>Sr,InfuraWebSocketProvider:()=>Ss,IpcProvider:()=>Ol,JsonRpcBatchProvider:()=>ou,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Er,NodesmithProvider:()=>Rs,PocketProvider:()=>Ps,Provider:()=>Xt,Resolver:()=>Ar,StaticJsonRpcProvider:()=>ws,UrlJsonRpcProvider:()=>St,Web3Provider:()=>Ns,WebSocketProvider:()=>_a,getDefaultProvider:()=>uu,getNetwork:()=>cs,isCommunityResourcable:()=>Al,isCommunityResource:()=>hs,showThrottleMessage:()=>na});var jc="networks/5.7.1";var Hc=new E(jc);function hx(a){return a&&typeof a.renetwork=="function"}function va(a){let e=function(t,n){n==null&&(n={});let i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(a,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(a,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(a,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(a,n.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(a))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(a,n.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return n.quorum!=null?r=n.quorum:a==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return va(t)},e}function Jo(a,e){let t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(a,e):null};return t.renetwork=function(n){return Jo(a,n)},t}var qc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:va("homestead")},zc={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:va("ropsten")},Gc={chainId:63,name:"classicMordor",_defaultProvider:Jo("https://www.ethercluster.com/mordor","classicMordor")},Ko={unspecified:{chainId:0,name:"unspecified"},homestead:qc,mainnet:qc,morden:{chainId:2,name:"morden"},ropsten:zc,testnet:zc,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:va("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:va("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:va("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:va("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Gc,classicTestnet:Gc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:va("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:va("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function cs(a){if(a==null)return null;if(typeof a=="number"){for(let n in Ko){let i=Ko[n];if(i.chainId===a)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:a,name:"unknown"}}if(typeof a=="string"){let n=Ko[a];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}let e=Ko[a.name];if(!e)return typeof a.chainId!="number"&&Hc.throwArgumentError("invalid network chainId","network",a),a;a.chainId!==0&&a.chainId!==e.chainId&&Hc.throwArgumentError("network chainId mismatch","network",a);let t=a._defaultProvider||null;return t==null&&e._defaultProvider&&(hx(e._defaultProvider)?t=e._defaultProvider.renetwork(a):t=e._defaultProvider),{name:a.name,chainId:e.chainId,ensAddress:a.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Wc="web/5.7.1";var xx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})};function Kc(a,e){return xx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let n=yield fetch(a,t),i=yield n.arrayBuffer(),r={};return n.headers.forEach?n.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):n.headers.keys().forEach(s=>{r[s.toLowerCase()]=n.headers.get(s)}),{headers:r,statusCode:n.status,statusMessage:n.statusText,body:j(new Uint8Array(i))}})}var bx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Dn=new E(Wc);function Jc(a){return new Promise(e=>{setTimeout(e,a)})}function Ua(a,e){if(a==null)return null;if(typeof a=="string")return a;if(oa(a)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(a)}catch{}return W(a)}return a}function gx(a){return ve(a.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function _l(a,e,t){let n=typeof a=="object"&&a.throttleLimit!=null?a.throttleLimit:12;Dn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);let i=typeof a=="object"?a.throttleCallback:null,r=typeof a=="object"&&typeof a.throttleSlotInterval=="number"?a.throttleSlotInterval:100;Dn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof a=="object"?!!a.errorPassThrough:!1,o={},l=null,p={method:"GET"},c=!1,x=2*60*1e3;if(typeof a=="string")l=a;else if(typeof a=="object"){if((a==null||a.url==null)&&Dn.throwArgumentError("missing URL","connection.url",a),l=a.url,typeof a.timeout=="number"&&a.timeout>0&&(x=a.timeout),a.headers)for(let O in a.headers)o[O.toLowerCase()]={key:O,value:String(a.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(c=!0);if(p.allowGzip=!!a.allowGzip,a.user!=null&&a.password!=null){l.substring(0,6)!=="https:"&&a.allowInsecureAuthentication!==!0&&Dn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:a.user,password:"[REDACTED]"});let O=a.user+":"+a.password;o.authorization={key:"Authorization",value:"Basic "+ir(ve(O))}}a.skipFetchSetup!=null&&(p.skipFetchSetup=!!a.skipFetchSetup),a.fetchOptions!=null&&(p.fetchOptions=_e(a.fetchOptions))}let C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(C):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ar(_[3]):gx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Dn.throwError("processing response error",E.errors.SERVER_ERROR,{body:Ua(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Dn.makeError("timeout",E.errors.TIMEOUT,{requestBody:Ua(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return bx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Dn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Ua(H,U.headers?U.headers["content-type"]:null),requestBody:Ua(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Yt(r))}catch(l){Dn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof a=="string"?{url:a}:_e(a);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},a=r}return _l(a,i,n)}function Bn(a,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return a().then(function(c){if(c!==void 0)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&n(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(c){s()&&n(c)})}p()})}var Cl=Mn(Xc());var Ae="providers/5.7.2";var ms=new E(Ae),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),c=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(n),maxPriorityFeePerGas:X.allowNull(n),maxFeePerGas:X.allowNull(n),gasLimit:n,to:X.allowNull(t,null),value:n,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(n),gasPrice:X.allowNull(n),maxPriorityFeePerGas:X.allowNull(n),maxFeePerGas:X.allowNull(n),to:X.allowNull(t),value:X.allowNull(n),data:X.allowNull(c),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:n,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:X.allowNull(n),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(n)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return dn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():ms.throwArgumentError("invalid hash","value",e)}data(e,t){let n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return fe(e)}callAddress(e){if(!ie(e,32))return null;let t=fe(Ce(e,12));return t===co?null:t}contractAddress(e){return ci(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Hn(e);throw new Error("invalid blockTag")}hash(e,t){let n=this.hex(e,t);return Ft(n)!==32?ms.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let n=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=n==null?null:F.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ie(n)&&(n=F.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),ie(n)&&(n=F.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Oo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let n=F.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&ms.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):ms.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ms.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let n={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(n[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let n=[];return t.forEach(function(i){n.push(e(i))}),n}}};function Al(a){return a&&typeof a.isCommunityResource=="function"}function hs(a){return Al(a)&&a.isCommunityResource()}var Zc=!1;function na(){Zc||(Zc=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},he=new E(Ae),Mx=10;function ef(a){return a==null?"null":(Ft(a)!==32&&he.throwArgumentError("invalid topic","topic",a),a.toLowerCase())}function tf(a){for(a=a.slice();a.length>0&&a[a.length-1]==null;)a.pop();return a.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[ef(i)]=!0});let n=Object.keys(t);return n.sort(),n.join("|")}else return ef(e)}).join("&")}function Ix(a){return a===""?[]:a.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function kr(a){if(typeof a=="string"){if(a=a.toLowerCase(),Ft(a)===32)return"tx:"+a;if(a.indexOf(":")===-1)return a}else{if(Array.isArray(a))return"filter:*:"+tf(a);if(ko.isForkEvent(a))throw he.warn("not implemented"),new Error("not implemented");if(a&&typeof a=="object")return"filter:"+(a.address||"*")+":"+tf(a.topics||[])}throw new Error("invalid event - "+a)}function xs(){return new Date().getTime()}function nf(a){return new Promise(e=>{setTimeout(e,a)})}var Cx=["block","network","pending","poll"],Sl=class{constructor(e,t,n){B(this,"tag",e),B(this,"listener",t),B(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],n=Ix(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Cx.indexOf(this.tag)>=0}},Sx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function El(a){return me(F.from(a).toHexString(),32)}function af(a){return ha.encode(ye([a,Ce(en(en(a)),0,4)]))}var of=new RegExp("^(ipfs)://(.*)$","i"),rf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),of,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Xo(a,e){try{return Yt(bs(a,e))}catch{}return null}function bs(a,e){if(a==="0x")return null;let t=F.from(Ce(a,e,e+32)).toNumber(),n=F.from(Ce(a,t,t+32)).toNumber();return Ce(a,t+32,t+32+n)}function Ml(a){return a.match(/^ipfs:\/\/ipfs\//i)?a=a.substring(12):a.match(/^ipfs:\/\//i)?a=a.substring(7):he.throwArgumentError("unsupported IPFS format","link",a),`https://gateway.ipfs.io/ipfs/${a}`}function sf(a){let e=j(a);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Rx(a){if(a.length%32===0)return a;let e=new Uint8Array(Math.ceil(a.length/32)*32);return e.set(a),e}function uf(a){let e=[],t=0;for(let n=0;nF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let n={to:this.address,ccipReadEnabled:!0,data:At([e,Na(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=At(["0x9061b923",uf([ns(this.name),n.data])]));try{let r=yield this.provider.call(n);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:n,data:r}),i&&(r=bs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let n=yield this._fetch(e,t);return n!=null?bs(n,0):null})}_getAddress(e,t){let n=Sx[String(e)];if(n==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(n.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return af(ye([[n.p2pkh],"0x"+r[2]]))}}if(n.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return af(ye([[n.p2sh],"0x"+r[2]]))}}if(n.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Cl.default.toWords(i.slice(2));return o.unshift(s),Cl.default.encode(n.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===tr?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",El(e));if(t==null||t==="0x")return null;let n=this._getAddress(e,t);return n==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let n=0;ns[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([El(64),El(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let n=yield this._fetchBytes("0x59d1d43c",W(t));return n==null||n==="0x"?null:Yt(n)})}},Il=null,Px=1,aa=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Bn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Il==null&&(Il=new X),Il}static getNetwork(e){return cs(e??"homestead")}ccipReadFetch(e,t,n){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield On({url:p,errorPassThrough:!0},c,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let C=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${C}`,E.errors.SERVER_ERROR,{url:l,errorMessage:C});s.push(C)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(xs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=xs(),n=Se({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;let s=xs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=Px++,t=[],n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&n-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=n;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield nf(0),this._network;let n=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=xs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,n||0,null)})}_waitForTransaction(e,t,n,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,c=function(){return p?!0:(p=!0,l.forEach(C=>{C()}),!1)},x=C=>{C.confirmations{this.removeListener(e,x)}),i){let C=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)C=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=C-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){let C=setTimeout(()=>{c()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:n}))},n);C.unref&&C.unref(),l.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r})}})}getStorageAt(e,t,n){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(s=>Hn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,n){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,r,i)}catch(r){throw r.transaction=n,r.transactionHash=n.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Se(n))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Se(t))})}_call(e,t,n){return ue(this,void 0,void 0,function*(){n>=Mx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:n,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Ft(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),c=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;let i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Se({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let n=yield this._getResolver(t,"getResolver");if(n!=null){let i=new Ar(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let n=yield this.getNetwork();n.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{let i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Na(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ie(e))throw n}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;let i=Xo(yield this.call({to:n,data:"0x691f3431"+Na(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Ar(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=Xo(yield this.call({to:s,data:"0x691f3431"+Na(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){let i=new Sl(kr(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],r=kr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let t=kr(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=kr(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let n=[],i=!1,r=kr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let n=kr(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}};var wa=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Mt=new E(Ae),Nx=["call","estimateGas"];function Ts(a,e){if(a==null)return null;if(typeof a.message=="string"&&a.message.match("reverted")){let t=ie(a.data)?a.data:null;if(!e||t)return{message:a.message,data:t}}if(typeof a=="object"){for(let t in a){let n=Ts(a[t],e);if(n)return n}return null}if(typeof a=="string")try{return Ts(JSON.parse(a),e)}catch{}return null}function lf(a,e,t){let n=t.transaction||t.signedTransaction;if(a==="call"){let r=Ts(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(a==="estimateGas"){let r=Ts(e.body,!1);r==null&&(r=Ts(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:a,transaction:n,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:n}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:n}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:a,transaction:n}),Nx.indexOf(a)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:n}),e}function df(a){return new Promise(function(e){setTimeout(e,a)})}function Dx(a){if(a.error){let e=new Error(a.error.message);throw e.code=a.error.code,e.data=a.error.data,e}return a.result}function gs(a){return a&&a.toLowerCase()}var Rl={},Er=class extends Pt{constructor(e,t,n){if(super(),e!==Rl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),n==null&&(n=0),typeof n=="string"?(B(this,"_address",this.provider.formatter.address(n)),B(this,"_index",null)):typeof n=="number"?(B(this,"_index",n),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Pl(Rl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){let n=_e(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>wa(this,void 0,void 0,function*(){if(n==null)return null;let i=yield this.provider.resolveName(n);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Se({tx:Se(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):n.from=i;let r=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),lf("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return wa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Bn(()=>wa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,t,n){return wa(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,n,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return wa(this,void 0,void 0,function*(){let t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}},Pl=class extends Er{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}},Ox={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends aa{constructor(e,t){let n=t;n==null&&(n=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(n),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return wa(this,void 0,void 0,function*(){yield df(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(n){return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Er(Rl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(n),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=On(this.connection,JSON.stringify(n),Dx).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[gs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[gs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[gs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[gs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let n=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=gs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return wa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let n=this.prepareRequest(e,t);n==null&&Mt.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return lf(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return df(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let n=_e(Ox);if(t)for(let r in t)t[r]&&(n[r]=!0);Qi(e,n);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Hn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=dn(e.accessList)),i}};var Mr=null;try{if(Mr=WebSocket,Mr==null)throw new Error("inject please")}catch{let e=new E(Ae);Mr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Nl=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Zo=new E(Ae),Bx=1,_a=class extends tn{constructor(e,t){t==="any"&&Zo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Mr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Zo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Zo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Nl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Zo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let n=Bx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return Nl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let n=F.from(t.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=n=>{let i=n.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let n=this._subIds[t];!n||(delete this._subIds[t],n.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Nl(this,void 0,void 0,function*(){this.websocket.readyState===Mr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var Fx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},vs=new E(Ae),ws=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Fx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||vs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},St=class extends ws{constructor(e,t){vs.checkAbstract(new.target,St),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let n=ht(new.target,"getUrl")(e,t);super(n,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){vs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return vs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return vs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var pf=new E(Ae),eu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",_s=class extends _a{constructor(e,t){let n=new Ir(e,t),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),B(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===eu}},Ir=class extends St{static getWebSocketProvider(e,t){return new _s(e,t)}static getApiKey(e){return e==null?eu:(e&&typeof e!="string"&&pf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:pf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(i,r)=>(t===eu&&na(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===eu}};var Lx=new E(Ae),tu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Ux(a){switch(a){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Lx.throwArgumentError("unsupported network","name",a)}var ks=class extends St{isCommunityResource(){return this.apiKey===tu}static getApiKey(e){return e??tu}static getUrl(e,t){t==null&&(t=tu);let n={allowGzip:!0,url:"https://"+Ux(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===tu&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(n.user="",n.password=t.projectSecret),n}};var Vx=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},yf=new E(Ae),As=class extends St{static getApiKey(e){return e!=null&&yf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:yf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return Vx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)})}};var nu=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},Va=new E(Ae);function cf(a){let e={};for(let t in a){if(a[t]==null)continue;let n=a[t];t==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?n=Hn(W(n)):t==="accessList"?n="["+dn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=W(n),e[t]=n)}return e}function jx(a){if(a.status==0&&(a.message==="No records found"||a.message==="No transactions found"))return a.result;if(a.status!=1||typeof a.message!="string"||!a.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(a),(a.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return a.result}function ff(a){if(a&&a.status==0&&a.message=="NOTOK"&&(a.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(a),e.throttleRetry=!0,e}if(a.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(a),e}if(a.error){let e=new Error(a.error.message||"unknown error");throw a.error.code&&(e.code=a.error.code),a.error.data&&(e.data=a.error.data),e}return a.result}function mf(a){if(a==="pending")throw new Error("pending not supported");return a==="latest"?a:parseInt(a.substring(2),16)}function Dl(a,e,t){if(a==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Va.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Va.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:a,transaction:t}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Va.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:a,transaction:t}),n.match(/another transaction with same nonce/)&&Va.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:a,transaction:t}),n.match(/execution failed due to an exception|execution reverted/)&&Va.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:a,transaction:t}),e}var Es=class extends aa{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Va.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let n=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return nu(this,void 0,void 0,function*(){let i=n?this.getPostUrl():this.getUrl(e,t),r=n?this.getPostData(e,t):null,s=e==="proxy"?ff:jx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(c,x)=>(this.isCommunityResource()&&na(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(c=>`${c}=${r[c]}`).join("&"));let p=yield On(o,l,s||ff);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return nu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let n=Object.create(null,{perform:{get:()=>super.perform}});return nu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Dl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=cf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Dl("call",r,t.transaction)}}case"estimateGas":{let i=cf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Dl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=mf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=mf(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Va.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Va.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var ru=function(a,e,t,n){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(c){try{p(n.next(c))}catch(x){s(x)}}function l(c){try{p(n.throw(c))}catch(x){s(x)}}function p(c){c.done?r(c.value):i(c.value).then(o,l)}p((n=n.apply(a,e||[])).next())})},_i=new E(Ae);function au(){return new Date().getTime()}function hf(a){let e=null;for(let t=0;te?null:(n+i)/2}function Cr(a){if(a===null)return"null";if(typeof a=="number"||typeof a=="boolean")return JSON.stringify(a);if(typeof a=="string")return a;if(F.isBigNumber(a))return a.toString();if(Array.isArray(a))return JSON.stringify(a.map(e=>Cr(e)));if(typeof a=="object"){let e=Object.keys(a);return e.sort(),"{"+e.map(t=>{let n=a[t];return typeof n=="function"?n="[function]":n=Cr(n),JSON.stringify(t)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof a)}var Hx=1;function bf(a){let e=null,t=null,n=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,a)}),i=s=>(n=n.then(s),n);function r(){return n}return{cancel:e,getPromise:r,wait:i}}var qx=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],zx=["address","args","errorArgs","errorSignature","method","transaction"];function iu(a,e){let t={weight:a.weight};return Object.defineProperty(t,"provider",{get:()=>a.provider}),a.start&&(t.start=a.start),e&&(t.duration=e-a.start),a.done&&(a.error?t.error=a.error:t.result=a.result||null),t}function Gx(a,e){return function(t){let n={};t.forEach(r=>{let s=a(r.result);n[s]||(n[s]={count:0,result:r.result}),n[s].count++});let i=Object.keys(n);for(let r=0;r=e)return s.result}}}function Wx(a,e,t){let n=Cr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=xf(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=a._highestBlockNumber&&(a._highestBlockNumber=s),a._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return xf(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Cr(i))};break;case"getBlock":t.includeTransactions?n=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Cr(i))}:n=function(i){return i==null?null:Cr(i)};break;default:throw new Error("unknown method: "+e)}return Gx(n,a.quorum)}function Ms(a,e){return ru(this,void 0,void 0,function*(){let t=a.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Bn(()=>new Promise((n,i)=>{setTimeout(function(){return t.blockNumber>=e?n(t):a.cancelled?n(null):n(void 0)},0)}),{oncePoll:t})})}function Kx(a,e,t,n){return ru(this,void 0,void 0,function*(){let i=a.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ie(n.blockTag)&&(i=yield Ms(a,e)),i[t](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ie(n.blockTag)&&(i=yield Ms(a,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ie(n.blockTag)&&(i=yield Ms(a,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ie(n.blockTag)&&(i=yield Ms(a,e)),t==="call"&&n.blockTag?i[t](n.transaction,n.blockTag):i[t](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Ms(a,e)),i.getLogs(r)}}return _i.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:n})})}var Is=class extends aa{constructor(e,t){e.length===0&&_i.throwArgumentError("missing providers","providers",e);let n=e.map((s,o)=>{if(Xt.isProvider(s)){let c=hs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:c,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=hs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&_i.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=n.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&_i.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=hf(n.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(n)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return ru(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return hf(e)})}perform(e,t){return ru(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(c=>c.hash,c=>c)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=au(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=Kx(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,au()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,au()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let c=[];i.forEach(_=>{_.done||!_.runner||(c.push(_.runner),_.staller&&c.push(_.staller.getPromise()))}),c.length&&(yield Promise.race(c));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=n(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield bf(100).getPromise()),o=!1}let C=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return qx.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(C).forEach(_=>{let v=C[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};zx.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),_i.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),_i.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>iu(l)),provider:this})})}};var Ol=null;var su=new E(Ae),Cs="84842078b09946638c03157f83405213",Ss=class extends _a{constructor(e,t){let n=new Sr(e,t),i=n.connection;i.password&&su.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",n.projectId),B(this,"projectId",n.projectId),B(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===Cs}},Sr=class extends St{static getWebSocketProvider(e,t){return new Ss(e,t)}static getApiKey(e){let t={apiKey:Cs,projectId:Cs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(su.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),su.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:su.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Cs&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Cs}};var ou=class extends tn{send(e,t){let n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:n,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),On(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,c)=>{let x=l[c];if(x.error){let C=new Error(x.error.message);C.code=x.error.code,C.data=x.error.data,p.reject(C)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Bl=new E(Ae),Jx="ETHERS_JS_SHARED",Rs=class extends St{static getApiKey(e){return e&&typeof e!="string"&&Bl.throwArgumentError("invalid apiKey","apiKey",e),e||Jx}static getUrl(e,t){Bl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Bl.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}};var gf=new E(Ae),Tf="62e1ad51b37b8e00394bda3b",Ps=class extends St{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Tf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:gf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:gf.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${n}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===Tf}};var vf=new E(Ae),$x=1;function wf(a,e){let t="Web3LegacyFetcher";return function(n,i){let r={method:n,params:i,id:$x++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let c=new Error(p.error.message);return c.code=p.error.code,c.data=p.error.data,o(c)}s(p.result)})})}}function Qx(a){return function(e,t){t==null&&(t=[]);let n={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(n),provider:this}),a.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}var Ns=class extends tn{constructor(e,t){e==null&&vf.throwArgumentError("missing provider","provider",e);let n=null,i=null,r=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),r=e,e.request?(n===""&&(n="eip-1193:"),i=Qx(e)):e.sendAsync?i=wf(e,e.sendAsync.bind(e)):e.send?i=wf(e,e.send.bind(e)):vf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var _f=new E(Ae);function uu(a,e){if(a==null&&(a="homestead"),typeof a=="string"){let n=a.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new tn(a);case"ws":case"wss":return new _a(a);default:_f.throwArgumentError("unsupported URL scheme","network",a)}}let t=cs(a);return(!t||!t._defaultProvider)&&_f.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:a}),t._defaultProvider({FallbackProvider:Is,AlchemyProvider:Ir,AnkrProvider:ks,CloudflareProvider:As,EtherscanProvider:Es,InfuraProvider:Sr,JsonRpcProvider:tn,NodesmithProvider:Rs,PocketProvider:Ps,Web3Provider:Ns,IpcProvider:null},e)}var te={};Ki(te,{AbiCoder:()=>nr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>ge,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>Ct,Indexed:()=>pa,Interface:()=>Da,LogDescription:()=>sr,Logger:()=>E,ParamType:()=>yt,RLP:()=>io,SigningKey:()=>bn,SupportedAlgorithm:()=>ea,TransactionDescription:()=>or,TransactionTypes:()=>Do,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>bo,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>gt,_fetchData:()=>_l,_toEscapedUtf8String:()=>Id,accessListify:()=>dn,arrayify:()=>j,base58:()=>ha,base64:()=>Dd,checkProperties:()=>Qi,checkResultErrors:()=>Xi,commify:()=>Rf,computeAddress:()=>gn,computeHmac:()=>xa,computePublicKey:()=>rs,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>es,defaultPath:()=>ba,defineReadOnly:()=>B,dnsEncode:()=>ns,entropyToMnemonic:()=>wi,fetchJson:()=>On,formatBytes32String:()=>Cd,formatEther:()=>Pf,formatUnits:()=>Fl,getAccountPath:()=>wc,getAddress:()=>fe,getContractAddress:()=>ci,getCreate2Address:()=>By,getIcapAddress:()=>Oy,getJsonWalletAddress:()=>bl,getStatic:()=>ht,hashMessage:()=>rr,hexConcat:()=>At,hexDataLength:()=>Ft,hexDataSlice:()=>Ce,hexStripZeros:()=>xd,hexValue:()=>Hn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Dy,isBytes:()=>pn,isBytesLike:()=>oa,isHexString:()=>ie,isValidMnemonic:()=>vc,isValidName:()=>Bd,joinSignature:()=>zr,keccak256:()=>ce,mnemonicToEntropy:()=>Tr,mnemonicToSeed:()=>pl,namehash:()=>Na,nameprep:()=>Nd,parseBytes32String:()=>Sd,parseEther:()=>Nf,parseTransaction:()=>Oo,parseUnits:()=>Ll,poll:()=>Bn,randomBytes:()=>ta,recoverAddress:()=>xi,recoverPublicKey:()=>No,resolveProperties:()=>Se,ripemd160:()=>us,serializeTransaction:()=>ss,sha256:()=>en,sha512:()=>ol,shallowCopy:()=>_e,shuffled:()=>ps,solidityKeccak256:()=>Ef,solidityPack:()=>du,soliditySha256:()=>Mf,splitSignature:()=>qn,stripZeros:()=>nn,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Pa,toUtf8String:()=>Yt,verifyMessage:()=>Uc,verifyTypedData:()=>Vc,zeroPad:()=>di});var kf="solidity/5.7.0";var Yx=new RegExp("^bytes([0-9]+)$"),Xx=new RegExp("^(u?int)([0-9]*)$"),Zx=new RegExp("^(.*)\\[([0-9]*)\\]$"),eb="0000000000000000000000000000000000000000000000000000000000000000",Rr=new E(kf);function Af(a,e,t){switch(a){case"address":return t?di(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?di(e,32):j(e)}let n=a.match(Xx);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Rr.throwArgumentError("invalid number type","type",a),t&&(i=256),e=F.from(e).toTwos(i),di(e,i/8)}if(n=a.match(Yx),n){let i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Rr.throwArgumentError("invalid bytes type","type",a),j(e).byteLength!==i&&Rr.throwArgumentError(`invalid value for ${a}`,"value",e),t?j((e+eb).substring(0,66)):e}if(n=a.match(Zx),n&&Array.isArray(e)){let i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Rr.throwArgumentError(`invalid array length for ${a}`,"value",e);let s=[];return e.forEach(function(o){s.push(Af(i,o,!0))}),ye(s)}return Rr.throwArgumentError("invalid type","type",a)}function du(a,e){a.length!=e.length&&Rr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return a.forEach(function(n,i){t.push(Af(n,e[i]))}),W(ye(t))}function Ef(a,e){return ce(du(a,e))}function Mf(a,e){return en(du(a,e))}var If="units/5.7.0";var Cf=new E(If),Sf=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Rf(a){let e=String(a).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||a==="."||a==="-.")&&Cf.throwArgumentError("invalid value","value",a);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return n+r.join(",")+i}function Fl(a,e){if(typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return $i(a,e??18)}function Ll(a,e){if(typeof a!="string"&&Cf.throwArgumentError("value must be a string","value",a),typeof e=="string"){let t=Sf.indexOf(e);t!==-1&&(e=3*t)}return cn(a,e??18)}function Pf(a){return Fl(a,18)}function Nf(a){return Ll(a,18)}var lu="ethers/5.7.2";var Df=new E(lu);try{let a=window;a._ethers==null&&(a._ethers=Ul)}catch{}var Fn;(function(a){a.Mainnet="Mainnet",a.Custom="Custom",a.Gnosis="Xdai",a.Goerli="Goerli",a.Xdai="Xdai",a.XdaiQa="XdaiQa"})(Fn||(Fn={}));var pu;(function(a){a.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",a.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",a.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",a.Custom=""})(pu||(pu={}));var Pr;(function(a){a.Mainnet="https://colony.io/reputation/mainnet",a.Goerli="https://colony.io/reputation/goerli",a.Xdai="https://xdai.colony.io/reputation/xdai",a.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",a.Custom="http://localhost:3000"})(Pr||(Pr={}));var yu;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/metatransaction/xdai",a.Xdai="https://xdai.colony.io/metatransaction/xdai",a.XdaiQa="https://xdai.colony.io/metatransaction/xdai",a.Custom=""})(yu||(yu={}));var Vl;(function(a){a.Mainnet="",a.Goerli="",a.Gnosis="https://xdai.colony.io/rpc/",a.Xdai="https://xdai.colony.io/rpc/",a.XdaiQa="https://xdai.colony.io/rpc/",a.Custom=""})(Vl||(Vl={}));var Ds;(function(a){a.Mainnet=".colony.joincolony.eth",a.Goerli=".colony.joincolony.test",a.Gnosis=".colony.joincolony.colonyxdai",a.Xdai=".colony.joincolony.colonyxdai",a.XdaiQa=".colony.joincolony.colonyxdai",a.Custom=".colony.joincolony.test"})(Ds||(Ds={}));var Os;(function(a){a.Mainnet=".user.joincolony.eth",a.Goerli=".user.joincolony.test",a.Gnosis=".user.joincolony.colonyxdai",a.Xdai=".user.joincolony.colonyxdai",a.XdaiQa=".user.joincolony.colonyxdai",a.Custom=".user.joincolony.test"})(Os||(Os={}));var jl;(function(a){let e;(function(n){n.ETH="0x0000000000000000000000000000000000000000",n.Mainnet="0x3E828ac5C480069D4765654Fb4b8733b910b13b2"})(e=a.Mainnet||(a.Mainnet={}));let t;(function(n){n.XDAI="0x0000000000000000000000000000000000000000",n.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C"})(t=a.Gnosis||(a.Gnosis={}))})(jl||(jl={}));var ke;(function(a){a[a.RootDomain=1]="RootDomain",a[a.RootTeam=1]="RootTeam",a[a.RootPot=1]="RootPot",a[a.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var Ot;(function(a){a[a.Null=0]="Null",a[a.Staking=1]="Staking",a[a.Submit=2]="Submit",a[a.Reveal=3]="Reveal",a[a.Closed=4]="Closed",a[a.Finalizable=5]="Finalizable",a[a.Finalized=6]="Finalized",a[a.Failed=7]="Failed"})(Ot||(Ot={}));var ql="0x12345678",Hl;(function(a){a[a.Unassigned=0]="Unassigned",a[a.Domain=1]="Domain",a[a.Task=2]="Task",a[a.Payment=3]="Payment",a[a.Expenditure=4]="Expenditure"})(Hl||(Hl={}));var wt;(function(a){a[a.Recovery=0]="Recovery",a[a.Root=1]="Root",a[a.Arbitration=2]="Arbitration",a[a.Architecture=3]="Architecture",a[a.ArchitectureSubdomain=4]="ArchitectureSubdomain",a[a.Funding=5]="Funding",a[a.Administration=6]="Administration",a[a.LAST_ROLE=7]="LAST_ROLE"})(wt||(wt={}));var we;(function(a){a.CoinMachine="CoinMachine",a.EvaluatedExpenditure="EvaluatedExpenditure",a.FundingQueue="FundingQueue",a.IVotingReputation="IVotingReputation",a.OneTxPayment="OneTxPayment",a.ReputationBootstrapper="ReputationBootstrapper",a.StagedExpenditure="StagedExpenditure",a.StakedExpenditure="StakedExpenditure",a.StreamingPayments="StreamingPayments",a.TokenSupplier="TokenSupplier",a.VotingReputation="VotingReputation",a.Whitelist="Whitelist"})(we||(we={}));var zl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],ki=class{static createInterface(){return new te.Interface(zl)}static connect(e,t){return new oe(e,zl,t)}};xe(ki,"abi",zl);var Gl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ai=class{static createInterface(){return new te.Interface(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(Ai,"abi",Gl);var Of=(a,e)=>{throw new Error(`${e}: ${a}`)},Wl=a=>a!=null;var{keccak256:nb,toUtf8Bytes:ab}=te,{MaxUint256:ib}=xt;var Nr=a=>te.formatEther(a),Dr=a=>te.parseEther(a);var Kl=a=>{let e=a.reduce((t,n)=>t|1<{let e=F.from(a);return[...Array(wt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Wl)},Ei=async(a,e,t,n)=>{if(F.from(t).eq(F.from(n)))return ib;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(n),{children:s}=await a.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${n} as a child of ${t}`);return F.from(o)},ja=a=>nb(ab(a));var Or=async(a,e)=>(await Ai.connect(a,e).version()).toNumber(),Jl=(a,e)=>a.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Wl);var{hexDataSlice:$l}=te,{MaxUint256:rb}=xt,Bf=a=>{let e=$l(a,0,3),t=F.from($l(a,4,35)),n=F.from($l(a,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:n}},Ff=async(a,e,t,n,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,n))return[F.from(t),rb,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,n))throw new Error(`${r} does not have the permission ${n} in any parent domain`);let p=await Ei(a,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${n} in any parent domain`);return[o,p,r]},sb=async(a,e,t,n,i)=>{let r=await Promise.all(n.map(s=>Ff(a,e,t,s,i)));for(let s=0;sArray.isArray(n)?n.length===1?ra(a,e,t,n[0],i):sb(a,e,t,n,i):Ff(a,e,t,n,i);var{MaxUint256:Lf}=xt,{AddressZero:ob}=xt;async function ub(a,e){let t;try{return t=await a.getCapabilityRoles(te.hexZeroPad(e,4)),cu(t)}catch{return[]}}async function Bs(a,e,t,n,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:c,childSkillIndex:x}=Bf(s),C=ki.connect(r,n.signer||n.provider),_=await ub(C,p);if(_.includes(wt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Lf}else{let{skillId:U}=await e.getDomain(c),H=await a.getChildSkillId(U,x);if(H.eq(l))o=Lf;else{let{children:M}=await a.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,ob);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:db}=xt,sa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,n){this.colony=t,this.network=e;let i=n?.network||Fn.Gnosis;this.endpointUrl=n?.customEndpointUrl||Pr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await sa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,n){let i=await this.getBaseEndpoint(n),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await sa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await sa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let c=p+1,x=await this.colony.getDomain(c);return{domainId:c,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,c=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return c&&(p=c?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}`;return sa.fetchReputation(r)}async getTotalReputation(e,t){let n=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${n}/${i}/${db}/noProof`,s=await sa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,n,i=3){let{reputationAmount:r}=await this.getReputation(e,t,n),{reputationAmount:s}=await this.getTotalReputation(e,n);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var kt=a=>Array.from(Array(a-1)).map(e=>e+1);var Uf=10,dA=kt(Uf),Vf={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jf=Uf-1;var Hf=6,yA=kt(Hf),qf={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3]},zf=Hf-1;var Gf=7,mA=kt(Gf),Wf={1:[],2:[],3:[],4:[],5:[],6:[]},Kf=Gf-1;var Jf=7,bA=kt(Jf),$f={1:[],2:[],3:[],4:[],5:[],6:[]},Qf=Jf-1;var Yf=4,vA=kt(Yf),Xf={1:[],2:[],3:[]},Zf=Yf-1;var em=5,kA=kt(em),tm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3]},nm=em-1;var am=2,MA=kt(am),im={1:[1,2,3,4,5,6,7,8,9,10,11,12,13]},rm=am-1;var sm=4,SA=kt(sm),om={1:[1,2,3],2:[1,2,3],3:[1,2,3]},um=sm-1;var dm=7,NA=kt(dm),lm={1:[],2:[],3:[],4:[],5:[],6:[]},pm=dm-1;var ym=11,BA=kt(ym),Ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6]},Yl=ym-1;var cm=6,UA=kt(cm),fm={1:[],2:[],3:[],4:[],5:[]},mm=cm-1;var Ha=(a,e,t)=>{switch(a){case we.CoinMachine:{let n=Vf[e];return!!n&&!n.includes(t)}case we.EvaluatedExpenditure:{let n=qf[e];return!!n&&!n.includes(t)}case we.FundingQueue:{let n=Wf[e];return!!n&&!n.includes(t)}case we.IVotingReputation:{let n=Ql[e];return!!n&&!n.includes(t)}case we.OneTxPayment:{let n=$f[e];return!!n&&!n.includes(t)}case we.ReputationBootstrapper:{let n=Xf[e];return!!n&&!n.includes(t)}case we.StagedExpenditure:{let n=im[e];return!!n&&!n.includes(t)}case we.StakedExpenditure:{let n=tm[e];return!!n&&!n.includes(t)}case we.StreamingPayments:{let n=om[e];return!!n&&!n.includes(t)}case we.TokenSupplier:{let n=lm[e];return!!n&&!n.includes(t)}case we.VotingReputation:{let n=Ql[e];return!!n&&!n.includes(t)}case we.Whitelist:{let n=fm[e];return!!n&&!n.includes(t)}default:return Of(a,"Could not find extension with name")}};var lb={[we.CoinMachine]:jf,[we.EvaluatedExpenditure]:zf,[we.FundingQueue]:Kf,[we.IVotingReputation]:Yl,[we.OneTxPayment]:Qf,[we.ReputationBootstrapper]:Zf,[we.StagedExpenditure]:rm,[we.StakedExpenditure]:nm,[we.StreamingPayments]:um,[we.TokenSupplier]:pm,[we.VotingReputation]:Yl,[we.Whitelist]:mm};var Fh=Mn(hm(),1);var gp=Mn(Dh(),1);var Pe;(function(a){a.DEFAULT="default",a.Annotation="annotation",a.Colony="colony",a.Decision="decision",a.Domain="domain",a.Misc="misc"})(Pe||(Pe={}));var bp=2,xp;(function(a){a[a.LightPink=0]="LightPink",a[a.Pink=1]="Pink",a[a.Black=2]="Black",a[a.EmeraldGreen=3]="EmeraldGreen",a[a.Blue=4]="Blue",a[a.Yellow=5]="Yellow",a[a.Red=6]="Red",a[a.Green=7]="Green",a[a.Periwinkle=8]="Periwinkle",a[a.Gold=9]="Gold",a[a.Aqua=10]="Aqua",a[a.BlueGrey=11]="BlueGrey",a[a.Purple=12]="Purple",a[a.Orange=13]="Orange",a[a.Magenta=14]="Magenta",a[a.PurpleGrey=15]="PurpleGrey"})(xp||(xp={}));var Oh=a=>`Validation error(s): +${a.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` +`)}`,_1=a=>({...a,isWhitelistActivated:a.isWhitelistActivated||!1,colonySafes:a.colonySafes||[],colonyTokens:a.colonyTokens||[],verifiedAddresses:a.verifiedAddresses||[]}),Tp=(a,e)=>{let t=(i=>{let r=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,c,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(a);if(t.success){if(t.data.version!==bp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Pe.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let n=Oh(t.errors);throw new Error(n)};var Bh=(a,e)=>{let t=a===Pe.Colony?_1(e):e,n=(i=>{let r=p=>{let c=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&C(J))),C=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?c(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,c,x=!0)=>{let C=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?C(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,c+"",!0)||o(!0,{path:c+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({type:a,data:t,version:bp});if(!n.success){let i=Oh(n.errors);throw new Error(i)}return n.data};var vp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},wp=vp;var _p=(0,Fh.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),zs={[Pe.Annotation]:"Annotation(address,bytes32,string)",[Pe.Colony]:"ColonyMetadata(address,string)",[Pe.Decision]:"Annotation(address,bytes32,string)",[Pe.Domain]:"DomainMetadata(address,uint256,string)",[Pe.Misc]:"",[Pe.DEFAULT]:""},Vr=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(zs).includes(e)}async getMetadata(e,t){let n=this.adapter.getIpfsUrl(e),r=await(await _p(n)).json();return Tp(r,t)}async getMetadataForEvent(e,t){let n=this.adapter.getIpfsUrl(t),r=await(await _p(n)).json(),s=Object.entries(zs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return Tp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),n=await _p(t);try{return await n.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let n=Bh(e,t),i=JSON.stringify(n);return this.adapter.uploadJson(i)}};var yM=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var kp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};xe(kn,"abi",kp);var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{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:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{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:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:"amount",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:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",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:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],An=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(An,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(Pi,"abi",Ep);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{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:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",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"}],Lh="0x60c06040523480156200001157600080fd5b50604051620020ca380380620020ca83398101604081905262000034916200032b565b60008060018162000044620001bd565b6001600160a01b031681526020810191909152604001600090812091909155556200006e620001bd565b600480546001600160a01b0319166001600160a01b039290921691909117905562000098620001bd565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a26006620000db848262000441565b506005620000ea838262000441565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9062000134906006906200050d565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a052506200058b92505050565b6000363330148015620001d1575060348110155b156200025c57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146200024b5733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028b57600080fd5b81516001600160401b0380821115620002a857620002a862000263565b604051601f8301601f19908116603f01168101908282118183101715620002d357620002d362000263565b8160405283815260209250866020858801011115620002f157600080fd5b600091505b83821015620003155785820183015181830184015290820190620002f6565b6000602085830101528094505050505092915050565b6000806000606084860312156200034157600080fd5b83516001600160401b03808211156200035957600080fd5b620003678783880162000279565b945060208601519150808211156200037e57600080fd5b506200038d8682870162000279565b925050604084015160ff81168114620003a557600080fd5b809150509250925092565b600181811c90821680620003c557607f821691505b602082108103620003e657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200043c576000816000526020600020601f850160051c81016020861015620004175750805b601f850160051c820191505b81811015620004385782815560010162000423565b5050505b505050565b81516001600160401b038111156200045d576200045d62000263565b62000475816200046e8454620003b0565b84620003ec565b602080601f831160018114620004ad5760008415620004945750858301515b600019600386901b1c1916600185901b17855562000438565b600085815260208120601f198616915b82811015620004de57888601518255948401946001909101908401620004bd565b5085821015620004fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200051d81620003b0565b600182811680156200053857600181146200054e576200057f565b60ff19841687528215158302870194506200057f565b8760005260208060002060005b85811015620005765781548a8201529084019082016200055b565b50505082870194505b50929695505050505050565b60805160a051611b12620005b86000396000818161030f0152610fb7015260006102b60152611b126000f3fe60806040526004361061019c5760003560e01c806370a08231116100ec578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104df578063cf309012146104ff578063d505accf14610519578063dd62ed3e1461053957600080fd5b8063a69df4b5146104aa578063a9059cbb146104bf578063b3eac1d8146103e757600080fd5b80638da5cb5b116100c65780638da5cb5b1461041d57806395d89b41146104555780639dc29fac1461046a578063a0712d681461048a57600080fd5b806370a08231146103915780637a9e5e4b146103c75780637ecebe00146103e757600080fd5b806330adf81f116101595780633644e515116101335780633644e515146102fd57806340c10f191461033157806342966c68146103515780636281133d1461037157600080fd5b806330adf81f14610270578063313ce567146102a45780633408e470146102ea57600080fd5b806306fdde03146101a1578063095ea7b3146101cc5780630c53c51c146101fc57806313af40351461020f57806318160ddd1461023157806323b872dd14610250575b600080fd5b3480156101ad57600080fd5b506101b661057f565b6040516101c391906115e0565b60405180910390f35b3480156101d857600080fd5b506101ec6101e7366004611608565b61060d565b60405190151581526020016101c3565b6101b661020a3660046116ed565b6106a0565b34801561021b57600080fd5b5061022f61022a366004611761565b610889565b005b34801561023d57600080fd5b506000545b6040519081526020016101c3565b34801561025c57600080fd5b506101ec61026b36600461177e565b61090c565b34801561027c57600080fd5b506102427f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156102b057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b3480156102f657600080fd5b5046610242565b34801561030957600080fd5b506102427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d57600080fd5b5061022f61034c366004611608565b610980565b34801561035d57600080fd5b5061022f61036c3660046117bf565b610a6f565b34801561037d57600080fd5b506101ec61038c3660046117d8565b610a83565b34801561039d57600080fd5b506102426103ac366004611761565b6001600160a01b031660009081526001602052604090205490565b3480156103d357600080fd5b5061022f6103e2366004611761565b610bd7565b3480156103f357600080fd5b50610242610402366004611761565b6001600160a01b031660009081526008602052604090205490565b34801561042957600080fd5b5060045461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b34801561046157600080fd5b506101b6610c48565b34801561047657600080fd5b5061022f610485366004611608565b610c55565b34801561049657600080fd5b5061022f6104a53660046117bf565b610e4c565b3480156104b657600080fd5b5061022f610e84565b3480156104cb57600080fd5b506101ec6104da366004611608565b610eb7565b3480156104eb57600080fd5b5060035461043d906001600160a01b031681565b34801561050b57600080fd5b506007546101ec9060ff1681565b34801561052557600080fd5b5061022f61053436600461185f565b610ed2565b34801561054557600080fd5b506102426105543660046118cd565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461058c90611906565b80601f01602080910402602001604051908101604052809291908181526020018280546105b890611906565b80156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b505050505081565b6000816002600061061c6111c1565b6001600160a01b03908116825260208083019390935260409182016000908120918816808252919093529120919091556106546111c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068e91815260200190565b60405180910390a35060015b92915050565b60606106cf866106c5886001600160a01b031660009081526008602052604090205490565b4688888888610a83565b6107325760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61073b86611264565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161077d93929190611940565b60408051601f198184030181529082905261079791611979565b6000604051808303816000865af19150503d80600081146107d4576040519150601f19603f3d011682016040523d82523d6000602084013e6107d9565b606091505b50915091508161083c5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b6064820152608401610729565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b886108666111c1565b8960405161087693929190611995565b60405180910390a1979650505050505050565b6108a66108946111c1565b6000356001600160e01b031916611290565b6108c25760405162461bcd60e51b8152600401610729906119ca565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561096d576109256108946111c1565b61096d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b61097884848461136b565b949350505050565b61098b6108946111c1565b6109a75760405162461bcd60e51b8152600401610729906119ca565b6001600160a01b038216600090815260016020526040812080548392906109cf908490611a0e565b92505081905550806000808282546109e79190611a0e565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a80610a7a6111c1565b82610c55565b50565b600080610b0088308989604051602001610aa09493929190611a21565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bbb5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e6174757265006044820152606401610729565b6001600160a01b038a8116911614915050979650505050505050565b610be26108946111c1565b610bfe5760405162461bcd60e51b8152600401610729906119ca565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461058c90611906565b610c5d6111c1565b6001600160a01b0316826001600160a01b031614610d5d576001600160a01b03821660009081526002602052604081208291610c976111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610d065760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b03821660009081526002602052604081208291610d286111c1565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d579190611a67565b90915550505b6001600160a01b038216600090815260016020526040902054811115610dc55760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03821660009081526001602052604081208054839290610ded908490611a67565b9250508190555080600080828254610e059190611a67565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e576108946111c1565b610e735760405162461bcd60e51b8152600401610729906119ca565b610a80610e7e6111c1565b82610980565b610e8f6108946111c1565b610eab5760405162461bcd60e51b8152600401610729906119ca565b6007805460ff19169055565b6000610ecb610ec46111c1565b848461090c565b9392505050565b60075460ff1615610f3057610ee86108946111c1565b610f305760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b6044820152606401610729565b42841015610f805760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e650000006044820152606401610729565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918861100983611a7a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161106d93929190611a93565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110d8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061110e5750886001600160a01b0316816001600160a01b0316145b61115a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e617475726500006044820152606401610729565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111d4575060348110155b1561125d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461124c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161128883611a7a565b919050555050565b6000306001600160a01b038416036112aa5750600161069a565b6004546001600160a01b03908116908416036112c85750600161069a565b6003546001600160a01b03166112e05750600061069a565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611aba565b905061069a565b60006113756111c1565b6001600160a01b0316846001600160a01b031614611475576001600160a01b038416600090815260026020526040812083916113af6111c1565b6001600160a01b03166001600160a01b0316815260200190815260200160002054101561141e5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c00006044820152606401610729565b6001600160a01b038416600090815260026020526040812083916114406111c1565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461146f9190611a67565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114dd5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e63650000006044820152606401610729565b6001600160a01b03841660009081526001602052604081208054849290611505908490611a67565b90915550506001600160a01b03831660009081526001602052604081208054849290611532908490611a0e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161157e91815260200190565b60405180910390a35060019392505050565b60005b838110156115ab578181015183820152602001611593565b50506000910152565b600081518084526115cc816020860160208601611590565b601f01601f19169290920160200192915050565b602081526000610ecb60208301846115b4565b6001600160a01b0381168114610a8057600080fd5b6000806040838503121561161b57600080fd5b8235611626816115f3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261165b57600080fd5b813567ffffffffffffffff8082111561167657611676611634565b604051601f8301601f19908116603f0116810190828211818310171561169e5761169e611634565b816040528381528660208588010111156116b757600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146116e857600080fd5b919050565b600080600080600060a0868803121561170557600080fd5b8535611710816115f3565b9450602086013567ffffffffffffffff81111561172c57600080fd5b6117388882890161164a565b9450506040860135925060608601359150611755608087016116d7565b90509295509295909350565b60006020828403121561177357600080fd5b8135610ecb816115f3565b60008060006060848603121561179357600080fd5b833561179e816115f3565b925060208401356117ae816115f3565b929592945050506040919091013590565b6000602082840312156117d157600080fd5b5035919050565b600080600080600080600060e0888a0312156117f357600080fd5b87356117fe816115f3565b96506020880135955060408801359450606088013567ffffffffffffffff81111561182857600080fd5b6118348a828b0161164a565b9450506080880135925060a0880135915061185160c089016116d7565b905092959891949750929550565b600080600080600080600060e0888a03121561187a57600080fd5b8735611885816115f3565b96506020880135611895816115f3565b955060408801359450606088013593506118b1608089016116d7565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118e057600080fd5b82356118eb816115f3565b915060208301356118fb816115f3565b809150509250929050565b600181811c9082168061191a57607f821691505b60208210810361193a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611952818460208901611590565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161198b818460208701611590565b9190910192915050565b6001600160a01b038481168252831660208201526060604082018190526000906119c1908301846115b4565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069a5761069a6119f8565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a57816054850160208701611590565b9190910160540195945050505050565b8181038181111561069a5761069a6119f8565b600060018201611a8c57611a8c6119f8565b5060010190565b60008451611aa5818460208901611590565b91909101928352506020820152604001919050565b600060208284031215611acc57600080fd5b81518015158114610ecb57600080fdfea2646970667358221220b7b9a606b195aca0708557af077c8e46e084718c5656fc19aa4f97b00b0bfb8b64736f6c63430008170033",W1=a=>a.length>1,Ln=class extends gi{constructor(...e){W1(e)?super(...e):super(Ku,Lh,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Ln,"bytecode",Lh),xe(Ln,"abi",Ku);var Mp=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],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:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",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"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",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:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{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"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Ni,"abi",Mp);var Ip=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Di,"abi",Ip);var Oi;(function(a){a.TokenClient="TokenClient",a.TokenLockingClient="TokenLockingClient"})(Oi||(Oi={}));var En;(function(a){a.Colony="Colony",a.ColonyLegacy="ColonyLegacy",a.Erc20="Erc20",a.Erc2612="Erc2612",a.Sai="Sai"})(En||(En={}));var{AddressZero:Uh}=xt;async function $1(a){try{await a.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Q1=async(a,e)=>{let t,n=!0,i=!0,r=!0;t=Ln.connect(a,e);try{await t.totalSupply()}catch(s){throw new Error(`Token is probably not a valid ERC20 token, got ${s.message}`)}try{await t.locked(),await $1(t)}catch{n=!1}try{await t.getMetatransactionNonce(Uh)}catch{i=!1}try{await t.nonces(Uh)}catch{r=!1}return n?i?t.tokenClientType=En.Colony:(t=Ni.connect(a,e),t.tokenClientType=En.ColonyLegacy):r?(t=An.connect(a,e),t.tokenClientType=En.Erc2612):(t=kn.connect(a,e),t.tokenClientType=En.Erc20),t.clientType=Oi.TokenClient,t},Cp=Q1;var Y1=(a,e)=>{let t=Di.connect(a,e);return t.clientType=Oi.TokenLockingClient,t},Sp=Y1;var{AddressZero:Rp}=xt,X1=kn.connect(Rp,new ia.BaseProvider(3656691)).interface,Z1=Pi.connect(Rp,new ia.BaseProvider(3656691)).interface,eg=An.connect(Rp,new ia.BaseProvider(3656691)).interface;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Gs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Ws.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"deprecateSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Bi.abi=Dp;var ka=class{constructor({colonyNetwork:e,contract:t,method:n,args:i,eventData:r,txConfig:s}){this.colonyNetwork=e,this.contract=t,this.method=n,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let n=this.colonyNetwork.ipfs.getMetadataForEvent.bind(this.colonyNetwork.ipfs,zs[this.txConfig.metadataType],t.metadata);return[t,e,n]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let t=this.colonyNetwork.getSigner(),{provider:n}=t;if(!n)throw new Error("No provider found");let r=await(await fetch(`${this.colonyNetwork.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(r.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${r.data.reason}`);if(!r.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return n.getTransaction(r.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:ng,solidityKeccak256:ag,splitSignature:ig}=te,Fi=class extends ka{async sendMetaTransaction(e,t){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let n=this.colonyNetwork.getSigner(),{provider:i}=n;if(!i)throw new Error("No provider found");let r;this.colonyNetwork.network===Fn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await n.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=ag(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=ng(l),c=await n.signMessage(p),{r:x,s:C,v:_}=ig(c),v={target:t,payload:e,userAddress:s,r:x,s:C,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(a,e)=>{if("events"in e&&e.events){let t=e.events.find(n=>n.event===a);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(n=>n.name===a);if(t?.args)return t.args}},Ju=(a,e,t)=>{let n;"events"in e&&e.events?n=e.events:"logs"in e&&e.logs?n=e.logs:n=[];for(let i=0;i{let n=await this.getMotionTx(t);return[n,this.getMotionMined.bind(this,n)]},mined:async()=>{let n=await this.getMotionTx(t);return this.getMotionMined(n)},encode:async()=>{let[n]=await this.getEncodedMotionTx(t);return n}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let n=await this.getMetaMotionTx(t);return[n,this.getMetaMotionMinded.bind(this,n)]},mined:async()=>{let n=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(n)}}}};var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Li=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Li.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ui.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Vi.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};ji.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Hi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};qi.abi=Vp;var{AddressZero:pg}=xt,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(Un.extensionType),e.address);if(t===pg)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let n=await Or(t,e.colonyNetwork.signerOrProvider);if(!Ha(Un.extensionType,n,e.version))throw new Error(`Version ${n} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Un.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new Un(e,r,n)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=n}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,n,i){let r=[].concat(e),s=n||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let c=p.map(_=>r[_]),x=p.map(_=>l[_]),C=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding],this.oneTxPaymentContract.address),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding]);return[_,v,S,L,c,C,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(we.OneTxPayment),t],async n=>({...ne("ExtensionUpgraded",n)}))}},Ga=Un;Ga.supportedVersions=[{version:3,factory:ji},{version:4,factory:Hi},{version:5,factory:qi}],Ga.extensionType=we.OneTxPayment;var Vn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async n=>({...ne("Transfer",n)}))}transferFrom(e,t,n){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,n],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let n=await this.colonyNetwork.getTokenLocking();return[t||n.address,e]},async n=>({...ne("Approval",n)}))}};var Ks=class extends Vn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=Ln.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async n=>({...ne("LogSetAuthority",n)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async n=>({...ne("LogSetOwner",n)}))}};var Js=class extends Vn{constructor(t,n){super(t,n);typeof n=="string"?this.tokenClient=An.connect(n,t.signerOrProvider):this.tokenClient=n,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,n){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[n||i.address,t]},async i=>({...ne("Approval",i)}))}};var Vh=async(a,e)=>{let t=await Cp(e,a.signerOrProvider);switch(t.tokenClientType){case En.Colony:return new Ks(a,t);case En.Erc20:return new Vn(a,t);case En.Erc2612:return new Js(a,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var jp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};zi.abi=jp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Gi.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Wi.abi=qp;var{AddressZero:zp}=xt;var $u=F.from(10).pow(18),jn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(jn.extensionType),e.address);if(t===zp)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let n=await Or(t,e.colonyNetwork.signerOrProvider);if(!Ha(jn.extensionType,n,e.version))throw new Error(`Version ${n} of the ${jn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=jn.supportedVersions.find(s=>s.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the ${jn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.colonyNetwork.signerOrProvider);return new jn(e,r,n)}static getLatestSupportedVersion(){return jn.supportedVersions[jn.supportedVersions.length-1]?.version}constructor(e,t,n){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=n}async createMotionSalt(e){let{address:t}=this.votingReputationContract,n=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${n}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,n){let{key:i,value:r,branchMask:s,siblings:o}=n,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,n,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,n,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:n,value:i,branchMask:r,siblings:s}=await Bs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,ql);return[e,t,zp,ql,n,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colony.colonyNetwork.ipfs.uploadMetadata(Pe.Decision,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Pe.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async n=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",n,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,n){let i=async()=>{let r=await this.colony.colonyNetwork.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Ot.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Ot[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(n))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(n))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(n))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let C=await this.getMinStake(o,t);if(F.from(n).lt(C))throw new Error(`The staked amount is too small. Please stake at least ${Nr(C)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,wt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),n,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),{key:p,value:c,branchMask:x,siblings:C}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,c,x,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",n,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),c=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,c,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:C,value:_,branchMask:v,siblings:S}=p;return[e,c,F.from(x),C,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",n,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let n=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.colonyNetwork.getSigner().getAddress(),p=await Ei(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:c,value:x,branchMask:C,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,c,x,C,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",n,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let n=await this.votingReputationContract.getMotionState(e);if(n!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[n]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async n=>({...ne("MotionFinalized",n)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(we.VotingReputation),t],async n=>({...ne("ExtensionUpgraded",n)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,n,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:n,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Wa=jn;Wa.supportedVersions=[{version:7,factory:zi},{version:8,factory:Gi},{version:9,factory:Wi}],Wa.extensionType=we.VotingReputation;var mg={["motion"]:Wa,["oneTx"]:Ga},Hr=class{static async connect(e,t){let n=await Or(t,e.signerOrProvider),i=Hr.supportedVersions.find(p=>p.version===n)?.factory;if(!i)throw new Error(`Version ${n} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.signerOrProvider),s=await r.getToken(),o=await Vh(e,s),l=new Hr(e,r,o,n);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Hr.supportedVersions[Hr.supportedVersions.length-1].version}constructor(e,t,n,i){this.colony=t,this.colonyNetwork=e,this.address=t.address,this.ext={},this.reputation=new sa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=n,this.version=i}createColonyTxCreator(e,t,n,i,r){return new jr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,n,i,r,s){return new jr({colony:this,colonyNetwork:this.colonyNetwork,contract:e,method:t,args:n,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ga.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Vn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Pe.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Domain,e),[ke.RootDomain,t]},{roles:wt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:wt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Domain,e),[ke.RootDomain,t]},{roles:wt.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Pe.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:wt.Architecture,domain:e},async n=>({...ne("DomainDeprecated",n)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async n=>({...ne("ColonyFundsClaimed",n)}))}moveFundsToTeam(e,t,n,i){let r=ke.RootDomain,s=n||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,c]=await ra(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,wt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),C=await Ei(x,this.colony,r,s),_=await Ei(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,c,r,C,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,n=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,n)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:n}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(n,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async n=>({...ne("ArbitraryTransaction",n)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let n;return typeof t=="string"?n=t:n=await this.colonyNetwork.ipfs.uploadMetadata(Pe.Annotation,t),[e,n]},async n=>({...ne("Annotation",n)}),{metadataType:Pe.Annotation})}installExtension(e){let t=mg[e],n=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ha(i,n,this.version))throw new Error(`v${n} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[ja(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let n=await this.colony.getUserRoles(e,t);return cu(n)}setRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,n),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,n,s]},{roles:wt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,n=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,n)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,n,s]},{roles:wt.Architecture,domain:n},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let n=[],i=await t.getTokenLocking();return e?n=[...e,i]:n=[i],[this.token.address,this.address,n]},async n=>({...ne("TokenAuthorityDeployed",n)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async n=>({...ne("ColonyUpgraded",n)}))}awardReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[n,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,n=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[n,e,F.from(0).sub(t)],{domain:n,roles:wt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},qr=Hr;qr.supportedVersions=[{version:11,factory:Li},{version:12,factory:Ui},{version:13,factory:Vi}];var{splitSignature:hg}=te,Qu=class extends ka{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,n]){if(!this.colonyNetwork.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.colonyNetwork.network}`);let i=this.colonyNetwork.getSigner(),{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.colonyNetwork.network===Fn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),c=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:n,nonce:l.toString(),deadline:c}),{r:C,s:_,v}=hg(x),S={target:e,owner:o,spender:t,value:n.toString(),deadline:c,r:C,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var $s=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Sp(this.address,e.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenDeposited",n)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async n=>({...ne("UserTokenWithdrawn",n)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,n){return this.tokenLockingContract.getApproval(t,e,n)}};var{namehash:jh}=te,{AddressZero:Gp}=xt,Qs=class{constructor(e,t){this.network=t?.network||Fn.Gnosis,this.ipfs=new Vr(t?.ipfsAdapter),this.config={metaTxBroadcasterEndpoint:t?.metaTxBroadcasterEndpoint||yu[this.network],reputationOracleEndpoint:t?.reputationOracleEndpoint||Pr[this.network]},this.networkContract=Bi.connect(t?.customNetworkAddress||pu[this.network],e),this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}async getTokenLocking(){if(!this.locking){let e=await this.networkContract.getTokenLocking();this.locking=new $s(this,e)}return this.locking}getInternalNetworkContract(){return this.networkContract}createTxCreator(e,t,n,i,r){return new ka({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createMetaTxCreator(e,t,n,i,r){return new Fi({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,n,i,r){return new Qu({colonyNetwork:this,contract:e,method:t,args:n,eventData:i,txConfig:r})}createColony(e,t,n){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Gp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return n?this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",async()=>{let r=await i();return typeof n=="string"?r[6]=n:r[6]=await this.ipfs.uploadMetadata(Pe.Colony,n),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.networkContract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return qr.connect(this,e)}async getMetaColony(){let e=await this.networkContract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.network],""):null}async getColonyAddress(e){let t=jh(`${e}${Ds[this.network]}`),n=await this.networkContract.addr(t);return n!==Gp?n:null}async getUsername(e){let t=await this.networkContract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.network],""):null}async getUserAddress(e){let t=jh(`${e}${Os[this.network]}`),n=await this.networkContract.addr(t);return n!==Gp?n:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.networkContract,"registerUserLabel",t,async n=>({...ne("UserLabelRegistered",n)}))}deployToken(e,t,n=18){return this.createMetaTxCreator(this.networkContract,"deployTokenViaNetwork",[e,t,n],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:bg}=te,Hh=new ia.Web3Provider(window.ethereum),Gh,qh,Rt,ln,Kp,gg=async()=>(await Hh.send("eth_requestAccounts",[]),Hh.getSigner()),Tg=async a=>{let e=await gg();Gh=await e.getAddress(),qh=new Qs(e),Rt=await qh.getColony(a)},vg=async a=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Dr(a)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},wg=async a=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(a);ln=F.from(a);let t=await Rt.ext.motions.getRemainingStakes(a),n=await Rt.ext.motions.getMotionState(a);return{...e,motionState:Ot[n],remainingStakes:t}},_g=async a=>{await Rt.ext.motions?.approveStake(Dr(a)).tx().mined()},kg=async a=>{await Rt.ext.motions?.stakeMotion(ln,1,a).tx().mined()},Ag=async a=>{await Rt.ext.motions?.stakeMotion(ln,0,a).tx().mined()},Eg=async()=>{await Rt.ext.motions?.submitVote(ln,1).tx().mined(),Kp=1},Mg=async()=>{await Rt.ext.motions?.submitVote(ln,0).tx().mined(),Kp=0},Ig=async()=>{await Rt.ext.motions?.revealVote(ln,Kp).tx().mined()},Cg=async()=>{await Rt.ext.motions?.finalizeMotion(ln).tx().mined()},zh=document.querySelector("#current-wallet-address"),Yu=document.querySelector("#address"),Wh=document.querySelector("#stake_clny_amount"),Wp=document.querySelector("#payment_amount"),Jp=document.querySelector("#stake_amount"),Kh=document.querySelector("#button_create_motion"),Jh=document.querySelector("#motion_id"),$h=document.querySelector("#button_connect"),Qh=document.querySelector("#button_stake_clny"),Yh=document.querySelector("#button_get_motion"),Xh=document.querySelector("#button_stake_yay"),Zh=document.querySelector("#button_stake_nay"),e6=document.querySelector("#button_vote_yay"),t6=document.querySelector("#button_vote_nay"),n6=document.querySelector("#button_reveal"),a6=document.querySelector("#button_finalize"),$p=document.querySelector("#error"),i6=document.querySelector("#result");if(!Yu||!Wh||!Wp||!Jh||!Jp||!$p||!i6||!$h||!Qh||!Kh||!Yh||!Xh||!Zh||!e6||!t6||!n6||!a6)throw new Error("Could not find all required HTML elements");var Bt=a=>{$p.innerText=`Found an error: ${a.message}`,console.error(a)},Aa=()=>{$p.innerText=""},Ie=a=>{i6.innerText=a};$h.addEventListener("click",async()=>{Aa();let a=Yu.value;if(!bg(a))return Bt(new Error("This is not a valid address"));Ie("Processing...");try{await Tg(Yu.value),zh&&(zh.innerText=Gh),Ie(` Connected to Colony with address: ${Rt.address}. Colony version: ${Rt.version}. Motions & Disputes extension is ${Rt.ext.motions?"installed":"not installed"} - `)}catch(e){Bt(e),Ee("")}finally{Yu.value=""}return null});Qh.addEventListener("click",async()=>{Ai(),Ee("Processing...");try{await rg(Wh.value)}catch(i){Bt(i),Ee("")}Ee("Successfully approved tokens for use in staking")});Kh.addEventListener("click",async()=>{Ai(),Ee("Processing...");try{let i=Wp.value,e=await ng(i);Ee(`Motion created! Motion ID is: ${e}`)}catch(i){Bt(i),Ee("")}finally{Wp.value=""}return null});Yh.addEventListener("click",async()=>{let i=Jh.value;Ee("Processing...");try{let{domainId:e,altTarget:t,motionState:n,remainingStakes:r}=await ig(i),a={domainId:e.toString(),altTarget:t,motionState:n,remainingYayStakes:Na(r.remainingToFullyYayStaked),remainingNayStakes:Na(r.remainingToFullyNayStaked)};Ee(JSON.stringify(a))}catch(e){Bt(e),Ee("")}});Xh.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");let i=Da(Jp.value);try{await ag(i)}catch(e){Bt(e),Ee("");return}Ee("Staked! Feel free to refresh the motion to see the new values")});Zh.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");let i=Da(Jp.value);try{await sg(i)}catch(e){Bt(e),Ee("");return}Ee("Staked! Feel free to refresh the motion to see the new values")});e6.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");try{await og()}catch(i){Bt(i),Ee("");return}Ee("Voted yay!")});t6.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");try{await ug()}catch(i){Bt(i),Ee("");return}Ee("Voted nay!")});n6.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");try{await lg()}catch(i){Bt(i),Ee("");return}Ee("Vote successfully revealed!")});i6.addEventListener("click",async()=>{if(Ai(),!dn){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ee("Processing...");try{await dg()}catch(i){Bt(i),Ee("");return}Ee("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); + `)}catch(e){Bt(e),Ie("")}finally{Yu.value=""}return null});Qh.addEventListener("click",async()=>{Aa(),Ie("Processing...");try{await _g(Wh.value)}catch(a){Bt(a),Ie("")}Ie("Successfully approved tokens for use in staking")});Kh.addEventListener("click",async()=>{Aa(),Ie("Processing...");try{let a=Wp.value,e=await vg(a);Ie(`Motion created! Motion ID is: ${e}`)}catch(a){Bt(a),Ie("")}finally{Wp.value=""}return null});Yh.addEventListener("click",async()=>{let a=Jh.value;Ie("Processing...");try{let{domainId:e,altTarget:t,motionState:n,remainingStakes:i}=await wg(a),r={domainId:e.toString(),altTarget:t,motionState:n,remainingYayStakes:Nr(i.remainingToFullyYayStaked),remainingNayStakes:Nr(i.remainingToFullyNayStaked)};Ie(JSON.stringify(r))}catch(e){Bt(e),Ie("")}});Xh.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");let a=Dr(Jp.value);try{await kg(a)}catch(e){Bt(e),Ie("");return}Ie("Staked! Feel free to refresh the motion to see the new values")});Zh.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");let a=Dr(Jp.value);try{await Ag(a)}catch(e){Bt(e),Ie("");return}Ie("Staked! Feel free to refresh the motion to see the new values")});e6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");try{await Eg()}catch(a){Bt(a),Ie("");return}Ie("Voted yay!")});t6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");try{await Mg()}catch(a){Bt(a),Ie("");return}Ie("Voted nay!")});n6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");try{await Ig()}catch(a){Bt(a),Ie("");return}Ie("Vote successfully revealed!")});a6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ie("Processing...");try{await Cg()}catch(a){Bt(a),Ie("");return}Ie("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} *